From 2388c080f7f3ac12ea8ff40f01ee9944cc43593f Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 14 Jan 2011 12:31:08 +0200 Subject: [PATCH 1/3] Added version info for python/wx/sqlalchemy in aboutbox --- gui/mainFrame.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 2e34bf7be..8ab539ce0 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -17,7 +17,10 @@ # along with pyfa. If not, see . #=============================================================================== +import sys +import sqlalchemy import wx + import service import config from gui import bitmapLoader @@ -211,7 +214,17 @@ class MainFrame(wx.Frame): info = wx.AboutDialogInfo() info.Name = "pyfa" info.Version = gui.aboutData.versionString - info.Description = wordwrap(gui.aboutData.description + "\n\n\nDevelopers: " + "".join(gui.aboutData.developers) + "\n\nAdditional credits:\n " + "\n ".join(gui.aboutData.credits) + "\n\nLicense: " + gui.aboutData.license + " - see included " + gui.aboutData.licenseLocation, + info.Description = wordwrap(gui.aboutData.description + "\n\n\nDevelopers: " + + "".join(gui.aboutData.developers) + + "\n\nAdditional credits:\n " + + "\n ".join(gui.aboutData.credits) + + "\n\nLicense: " + + gui.aboutData.license + + " - see included " + + gui.aboutData.licenseLocation + + "\n\nPython: \t" + sys.version + + "\nwxPython: \t" + wx.__version__ + + "\nSQLAlchemy: \t" + sqlalchemy.__version__, 700, wx.ClientDC(self)) info.WebSite = ("http://www.evefit.org/Pyfa", "pyfa home page") wx.AboutBox(info) From c1ce9cd885b9721ea611031b9eccddc3e0a05ce4 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 14 Jan 2011 12:35:21 +0200 Subject: [PATCH 2/3] Added some \n here and there in aboutData.py --- gui/aboutData.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/aboutData.py b/gui/aboutData.py index 8a13cdc96..d59cba899 100644 --- a/gui/aboutData.py +++ b/gui/aboutData.py @@ -22,4 +22,4 @@ license = "pyfa is released under GNU GPL" licenseLocation = "gpl.txt" developers = ("\n cncfanatics \t(Sakari Orisi)\n" , " DarkPhoenix \t(Kadesh Priestess)\n", " Darriele \t(Darriele)") credits = (("EVE SERVICE CORP \twww.evsco.net - host of EVEFIT project ( pyfa / EOS/ Aurora)"), ("Entity (Entity) \t\tCapacitor calculations / EVEAPI python lib / Reverence"), ("Aurora \t\tMaths"), ("Corollax (Aamrr) \tVarious EOS/pyfa improvements")) -description = "Pyfa (the Python Fitting Assistant) is a standalone application able to create and simulate fittings for EVE-Online SciFi MMORPG with a very high degree of accuracy.\nPyfa can be virtually ran on all platforms where python and wxwidgets are supported, and, in order to make things effortless for you, we maintain daily builds for OSX/WIN32(64) and LINUX (http://www.evefit.org/Pyfa/Installation). The layout of pyfa is somewhat similar to EFT ( EVE fitting tool ), but , it goes way beyond EFT in terms of functionality, accuracy and usefulness. While Pyfa is a completely new application unrelated to EFT, it is able to import/export EFT style fits without any hassle.\n\n\nAll EVE-Online related materials are property of CCP hf.\n\nSilk Icons Set by famfamfam.com released under Creative Commons Attribution 2.5 License" +description = "Pyfa (the Python Fitting Assistant) is a standalone application able to create and simulate fittings for EVE-Online SciFi MMORPG with a very high degree of accuracy.\nPyfa can be virtually ran on all platforms where python and wxwidgets are supported, and, in order to make things effortless for you, we maintain daily builds for OSX/WIN32(64) and LINUX (http://www.evefit.org/Pyfa/Installation).\nThe layout of pyfa is somewhat similar to EFT ( EVE fitting tool ), but , it goes way beyond EFT in terms of functionality, accuracy and usefulness.\nWhile Pyfa is a completely new application unrelated to EFT, it is able to import/export EFT style fits without any hassle.\n\n\nAll EVE-Online related materials are property of CCP hf.\n\nSilk Icons Set by famfamfam.com released under Creative Commons Attribution 2.5 License" From be9c66b42e5d5f4ce375316926a3e5e30ef4d9df Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Fri, 14 Jan 2011 13:14:35 +0200 Subject: [PATCH 3/3] Added support for ctrl+tab/ctrl+shift+tab (next/prev multiswitch tab) --- gui/chromeTabs.py | 21 +++++++++++++++++++++ gui/mainFrame.py | 16 +++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/gui/chromeTabs.py b/gui/chromeTabs.py index 9561ebe24..dde1648c1 100644 --- a/gui/chromeTabs.py +++ b/gui/chromeTabs.py @@ -151,6 +151,27 @@ class PFNotebook(wx.Panel): def GetPageCount(self): return len(self.pages) + def NextPage(self): + cpage = self.GetSelection() + + if cpage is None: + return + + if cpage < self.GetPageCount() - 1: + self.SetSelection(cpage + 1) + else: + self.SetSelection(0) + def PrevPage(self): + cpage = self.GetSelection() + + if cpage is None: + return + + if cpage > 0: + self.SetSelection(cpage - 1) + else: + self.SetSelection(self.GetPageCount() - 1) + def AddPage(self, tabWnd = None, tabTitle ="Empty Tab", tabImage = None, showClose = True): if self.activePage: self.activePage.Hide() diff --git a/gui/mainFrame.py b/gui/mainFrame.py index 8ab539ce0..03cec9aa5 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -326,20 +326,34 @@ class MainFrame(wx.Frame): self.Bind(wx.EVT_MENU, self.openGraphFrame, id=menuBar.graphFrameId) toggleShipMarketId = wx.NewId() + ctabnext = wx.NewId() + ctabprev = wx.NewId() # Close Page self.Bind(wx.EVT_MENU, self.CloseCurrentPage, id=self.closePageId) self.Bind(wx.EVT_MENU, self.HAddPage, id = self.addPageId) self.Bind(wx.EVT_MENU, self.toggleShipMarket, id = toggleShipMarketId) + self.Bind(wx.EVT_MENU, self.CTabNext, id = ctabnext) + self.Bind(wx.EVT_MENU, self.CTabPrev, id = ctabprev) actb = [(wx.ACCEL_CTRL, ord('T'), self.addPageId), (wx.ACCEL_CMD, ord('T'), self.addPageId), (wx.ACCEL_CTRL, ord("W"), self.closePageId), (wx.ACCEL_CMD, ord("W"), self.closePageId), (wx.ACCEL_CTRL, ord(" "), toggleShipMarketId), - (wx.ACCEL_CMD, ord(" "), toggleShipMarketId)] + (wx.ACCEL_CMD, ord(" "), toggleShipMarketId), + (wx.ACCEL_CTRL, wx.WXK_TAB, ctabnext), + (wx.ACCEL_CTRL | wx.ACCEL_SHIFT, wx.WXK_TAB, ctabprev), + (wx.ACCEL_CMD, wx.WXK_TAB, ctabnext), + (wx.ACCEL_CMD | wx.ACCEL_SHIFT, wx.WXK_TAB, ctabprev) + ] atable = wx.AcceleratorTable(actb) self.SetAcceleratorTable(atable) + def CTabNext(self, event): + self.fitMultiSwitch.NextPage() + + def CTabPrev(self, event): + self.fitMultiSwitch.PrevPage() def HAddPage(self,event): self.fitMultiSwitch.AddPage(wx.Panel(self, size = (0,0)), "Empty Tab")