Do application initialization work, e.g. define application globals.
(self)
| 9 | |
| 10 | class PyfaApp(wx.App): |
| 11 | def OnInit(self): |
| 12 | """ |
| 13 | Do application initialization work, e.g. define application globals. |
| 14 | """ |
| 15 | |
| 16 | # Name for my application. |
| 17 | self.appName = "pyfa" |
| 18 | |
| 19 | #------------ |
| 20 | |
| 21 | # # Simplified init method. |
| 22 | # self.DoConfig() |
| 23 | # self.Init() # InspectionMixin |
| 24 | # # work around for Python stealing "_". |
| 25 | # sys.displayhook = _displayHook |
| 26 | # |
| 27 | # #------------ |
| 28 | |
| 29 | |
| 30 | # Return locale folder. |
| 31 | localeDir = os.path.join(config.pyfaPath, "locale") |
| 32 | |
| 33 | # Set language stuff and update to last used language. |
| 34 | self.locale = None |
| 35 | wx.Locale.AddCatalogLookupPathPrefix(localeDir) |
| 36 | # Set language stuff and update to last used language. |
| 37 | self.UpdateLanguage(config.language) |
| 38 | |
| 39 | return True |
| 40 | |
| 41 | #----------------------------------------------------------------------- |
| 42 |
nothing calls this directly
no test coverage detected