diff --git a/gui/characterEditor.py b/gui/characterEditor.py index ab03c1e06..0263c7b2d 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -31,13 +31,18 @@ import sys CharListUpdated, CHAR_LIST_UPDATED = wx.lib.newevent.NewEvent() CharChanged, CHAR_CHANGED = wx.lib.newevent.NewEvent() -class CharacterEditor(wx.Dialog): +class CharacterEditor(wx.Frame): def __init__(self, parent): - wx.Dialog.__init__ (self, parent, id=wx.ID_ANY, title=u"pyfa: Character Editor", pos=wx.DefaultPosition, - size=wx.Size(641, 600), style=wx.CAPTION | wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER) + wx.Frame.__init__ (self, parent, id=wx.ID_ANY, title=u"pyfa: Character Editor", pos=wx.DefaultPosition, + size=wx.Size(641, 600), style=wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL) + i = wx.IconFromBitmap(bitmapLoader.getBitmap("character_small", "icons")) + self.SetIcon(i) + + self.disableWin=wx.WindowDisabler(self) self.SetSizeHintsSz(wx.Size(640, 600), wx.DefaultSize) - + self.SetBackgroundColour( wx.SystemSettings.GetColour( wx.SYS_COLOUR_BTNFACE ) ) + mainSizer = wx.BoxSizer(wx.VERTICAL) self.navSizer = wx.BoxSizer(wx.HORIZONTAL) @@ -120,6 +125,7 @@ class CharacterEditor(wx.Dialog): def editingFinished(self, event): wx.PostEvent(self.mainFrame, CharListUpdated()) + self.Destroy() event.Skip() def registerEvents(self): @@ -265,7 +271,7 @@ class SkillTreeView (wx.Panel): self.levelIds = {} idUnlearned = wx.NewId() - self.levelIds[idUnlearned] = "Not Learned" + self.levelIds[idUnlearned] = "Not learned" self.levelChangeMenu.Append(idUnlearned, "Unlearn") for level in xrange(6): diff --git a/gui/fittingView.py b/gui/fittingView.py index 8b94811a6..0cd08f933 100644 --- a/gui/fittingView.py +++ b/gui/fittingView.py @@ -42,7 +42,11 @@ class FittingView(d.Display): d.Display.__init__(self, parent) self.mainFrame.Bind(FIT_CHANGED, self.fitChanged) self.Bind(wx.EVT_LEFT_DCLICK, self.removeItem) - self.Bind(wx.EVT_RIGHT_DOWN, self.scheduleMenu) + if "__WXGTK__" in wx.PlatformInfo: + self.Bind(wx.EVT_RIGHT_UP, self.scheduleMenu) + else: + self.Bind(wx.EVT_RIGHT_DOWN, self.scheduleMenu) + self.activeFitID = None #Gets called from the fitMultiSwitch when it decides its time @@ -131,4 +135,4 @@ class FittingView(d.Display): contexts.append("ship") menu = ContextMenu.getMenu(selection, *contexts) - self.PopupMenu(menu) \ No newline at end of file + self.PopupMenu(menu) diff --git a/gui/itemStats.py b/gui/itemStats.py index 3f70267e6..b6fffc66d 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -295,9 +295,7 @@ class ItemAffectedBy (wx.Panel): self.effectList.InsertColumn(0,"Name") self.effectList.setResizeColumn(0) - - print stuff.itemModifiedAttributes._ModifiedAttributeDict__affectedBy - + effects = item.effects names = list(effects.iterkeys()) names.sort() diff --git a/gui/mainFrame.py b/gui/mainFrame.py index cb41f2e58..452a697ba 100644 --- a/gui/mainFrame.py +++ b/gui/mainFrame.py @@ -125,9 +125,9 @@ class MainFrame(wx.Frame): wx.AboutBox(info) def showCharacterEditor(self, event): - dlg=CharacterEditor(None) - dlg.ShowModal() - dlg.Destroy() + dlg=CharacterEditor(self) + dlg.Show() + cFit = service.Fit.getInstance() cFit.clearFit(self.getActiveFit()) wx.PostEvent(self, fv.FitChanged(fitID=self.getActiveFit())) diff --git a/gui/marketBrowser.py b/gui/marketBrowser.py index db859f002..64471e96a 100644 --- a/gui/marketBrowser.py +++ b/gui/marketBrowser.py @@ -314,7 +314,8 @@ class MarketBrowser(wx.Panel): itemId = self.itemView.GetItemData(sel) sel = self.itemView.GetNextSelected(sel) selection.append(cMarket.getItem(itemId)) - + if len(selection) == 0: + return menu = ContextMenu.getMenu(selection, "item") self.PopupMenu(menu) diff --git a/run.py b/run.py index ca02c8bb3..f6f4feb92 100644 --- a/run.py +++ b/run.py @@ -30,8 +30,7 @@ if __name__ == "__main__": if not os.path.exists(config.homePath): os.mkdir(config.homePath) - if not os.path.exists(config.saveddata): - eos.db.saveddata_meta.create_all() + eos.db.saveddata_meta.create_all() pyfa = wx.App(False) MainFrame()