def __init__(self): BrandedFrame.__init__(self, None, title=_("CSV import")) # Necessary to be able to preview imports since OLV looks for this attribute on its GrandParent. self.searchActive = False self.dateFormats = ['%Y/%m/%d', '%d/%m/%Y', '%m/%d/%Y'] self.encodings = ['cp1250', 'iso8859-1', 'iso8859-2', 'utf-8'] self.profileManager = CsvImporterProfileManager() self.transactionContainer = None topPanel = wx.Panel(self) topHorizontalSizer = wx.BoxSizer(wx.VERTICAL) topSizer = wx.BoxSizer(wx.VERTICAL) topSizer.AddSpacer(6) horizontalSizer = wx.BoxSizer(wx.HORIZONTAL) topSizer.Add(horizontalSizer, flag=wx.EXPAND) self.initSettingsControls(topPanel, horizontalSizer) self.initSettingsProfilesControl(topPanel, horizontalSizer) self.initFileAndActionControls(topPanel, topSizer) self.initTransactionCtrl(topPanel, topSizer) self.initTargetAccountControl(topPanel, topSizer) # set default values self.initCtrlValuesFromSettings(self.getDefaultSettings()) # layout sizers topPanel.SetSizer(topSizer) topPanel.SetAutoLayout(True) topSizer.Fit(self) self.Show(True)
def __init__(self, bankController, welcome): # Load our window settings. config = wx.Config.Get() size = config.ReadInt('SIZE_X'), config.ReadInt('SIZE_Y') pos = config.ReadInt('POS_X'), config.ReadInt('POS_Y') BrandedFrame.__init__(self, None, title="wxBanker", size=size, pos=pos) self.Panel = BankerPanel(self, bankController) Publisher.subscribe(self.onQuit, "quit") Publisher.subscribe(self.onWarning, "warning") if welcome: Publisher.subscribe(self.onFirstRun, "first run") self.Bind(wx.EVT_SIZE, self.OnSize) self.Bind(wx.EVT_MOVE, self.OnMove) self.Bind(wx.EVT_CLOSE, self.OnClose) menuBar = BankMenuBar(bankController) self.SetMenuBar(menuBar) #self.CreateStatusBar() self.Bind(wx.EVT_MENU, menuBar.onMenuEvent)