def __init__(self, title="pyfa"): pyfalog.debug("Initialize MainFrame") self.title = title wx.Frame.__init__(self, None, wx.ID_ANY, self.title) self.supress_left_up = False MainFrame.__instance = self # Load stored settings (width/height/maximized..) self.LoadMainFrameAttribs() self.disableOverrideEditor = disableOverrideEditor # Fix for msw (have the frame background color match panel color if 'wxMSW' in wx.PlatformInfo: self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)) # Load and set the icon for pyfa main window i = wx.Icon(BitmapLoader.getBitmap("pyfa", "gui")) self.SetIcon(i) # Create the layout and windows mainSizer = wx.BoxSizer(wx.HORIZONTAL) self.browser_fitting_split = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE) self.fitting_additions_split = wx.SplitterWindow(self.browser_fitting_split, style=wx.SP_LIVE_UPDATE) mainSizer.Add(self.browser_fitting_split, 1, wx.EXPAND | wx.LEFT, 2) self.fitMultiSwitch = MultiSwitch(self.fitting_additions_split) self.additionsPane = AdditionsPane(self.fitting_additions_split) self.notebookBrowsers = ChromeNotebook(self.browser_fitting_split, False) marketImg = BitmapLoader.getImage("market_small", "gui") shipBrowserImg = BitmapLoader.getImage("ship_small", "gui") self.marketBrowser = MarketBrowser(self.notebookBrowsers) self.notebookBrowsers.AddPage(self.marketBrowser, "Market", image=marketImg, closeable=False) self.marketBrowser.splitter.SetSashPosition(self.marketHeight) self.shipBrowser = ShipBrowser(self.notebookBrowsers) self.notebookBrowsers.AddPage(self.shipBrowser, "Fittings", image=shipBrowserImg, closeable=False) self.notebookBrowsers.SetSelection(1) self.browser_fitting_split.SplitVertically(self.notebookBrowsers, self.fitting_additions_split) self.browser_fitting_split.SetMinimumPaneSize(204) self.browser_fitting_split.SetSashPosition(self.browserWidth) self.fitting_additions_split.SplitHorizontally(self.fitMultiSwitch, self.additionsPane, -200) self.fitting_additions_split.SetMinimumPaneSize(200) self.fitting_additions_split.SetSashPosition(self.fittingHeight) self.fitting_additions_split.SetSashGravity(1.0) cstatsSizer = wx.BoxSizer(wx.VERTICAL) self.charSelection = CharacterSelection(self) cstatsSizer.Add(self.charSelection, 0, wx.EXPAND) # @todo pheonix: fix all stats stuff self.statsPane = StatsPane(self) cstatsSizer.Add(self.statsPane, 0, wx.EXPAND) mainSizer.Add(cstatsSizer, 0, wx.EXPAND) self.SetSizer(mainSizer) # Add menu self.addPageId = wx.NewId() self.closePageId = wx.NewId() self.widgetInspectMenuID = wx.NewId() self.SetMenuBar(MainMenuBar(self)) self.registerMenu() # Internal vars to keep track of other windows (graphing/stats) self.graphFrame = None self.statsWnds = [] self.activeStatsWnd = None self.Bind(wx.EVT_CLOSE, self.OnClose) # Show ourselves self.Show() self.LoadPreviousOpenFits() # Check for updates self.sUpdate = Update.getInstance() self.sUpdate.CheckUpdate(self.ShowUpdateBox) self.Bind(GE.EVT_SSO_LOGIN, self.onSSOLogin)
def __init__(self, title="pyfa"): pyfalog.debug("Initialize MainFrame") self.title = title wx.Frame.__init__(self, None, wx.ID_ANY, self.title) self.supress_left_up = False MainFrame.__instance = self # Load stored settings (width/height/maximized..) self.LoadMainFrameAttribs() self.disableOverrideEditor = disableOverrideEditor # Fix for msw (have the frame background color match panel color if 'wxMSW' in wx.PlatformInfo: self.SetBackgroundColour(wx.SystemSettings.GetColour(wx.SYS_COLOUR_BTNFACE)) # Load and set the icon for pyfa main window i = wx.Icon(BitmapLoader.getBitmap("pyfa", "gui")) self.SetIcon(i) # Create the layout and windows mainSizer = wx.BoxSizer(wx.HORIZONTAL) self.browser_fitting_split = wx.SplitterWindow(self, style=wx.SP_LIVE_UPDATE) self.fitting_additions_split = wx.SplitterWindow(self.browser_fitting_split, style=wx.SP_LIVE_UPDATE) mainSizer.Add(self.browser_fitting_split, 1, wx.EXPAND | wx.LEFT, 2) self.fitMultiSwitch = MultiSwitch(self.fitting_additions_split) self.additionsPane = AdditionsPane(self.fitting_additions_split) self.notebookBrowsers = ChromeNotebook(self.browser_fitting_split, False) marketImg = BitmapLoader.getImage("market_small", "gui") shipBrowserImg = BitmapLoader.getImage("ship_small", "gui") self.marketBrowser = MarketBrowser(self.notebookBrowsers) self.notebookBrowsers.AddPage(self.marketBrowser, "Market", image=marketImg, closeable=False) self.marketBrowser.splitter.SetSashPosition(self.marketHeight) self.shipBrowser = ShipBrowser(self.notebookBrowsers) self.notebookBrowsers.AddPage(self.shipBrowser, "Fittings", image=shipBrowserImg, closeable=False) self.notebookBrowsers.SetSelection(1) self.browser_fitting_split.SplitVertically(self.notebookBrowsers, self.fitting_additions_split) self.browser_fitting_split.SetMinimumPaneSize(204) self.browser_fitting_split.SetSashPosition(self.browserWidth) self.fitting_additions_split.SplitHorizontally(self.fitMultiSwitch, self.additionsPane, -200) self.fitting_additions_split.SetMinimumPaneSize(200) self.fitting_additions_split.SetSashPosition(self.fittingHeight) self.fitting_additions_split.SetSashGravity(1.0) cstatsSizer = wx.BoxSizer(wx.VERTICAL) self.charSelection = CharacterSelection(self) cstatsSizer.Add(self.charSelection, 0, wx.EXPAND) # @todo pheonix: fix all stats stuff self.statsPane = StatsPane(self) cstatsSizer.Add(self.statsPane, 0, wx.EXPAND) mainSizer.Add(cstatsSizer, 0, wx.EXPAND) self.SetSizer(mainSizer) # Add menu self.addPageId = wx.NewId() self.closePageId = wx.NewId() self.widgetInspectMenuID = wx.NewId() self.SetMenuBar(MainMenuBar(self)) self.registerMenu() # Internal vars to keep track of other windows (graphing/stats) self.graphFrame = None self.statsWnds = [] self.activeStatsWnd = None self.Bind(wx.EVT_CLOSE, self.OnClose) # Show ourselves self.Show() self.LoadPreviousOpenFits() # Check for updates self.sUpdate = Update.getInstance() self.sUpdate.CheckUpdate(self.ShowUpdateBox) self.Bind(GE.EVT_SSO_LOGIN, self.onSSOLogin) self.Bind(GE.EVT_SSO_LOGGING_IN, self.ShowSsoLogin)