From bd3a3f98786fdf8dab69e5320e43e0c1a63a808f Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Tue, 27 Sep 2011 21:30:16 +0300 Subject: [PATCH] Added a close button for item stats dlg if platform is wxGTK (there's no window close button for Gnome 3 dlgs) --- gui/itemStats.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/itemStats.py b/gui/itemStats.py index 943b5f3f8..97425024d 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -69,6 +69,12 @@ class ItemStatsDialog(wx.Dialog): self.mainSizer = wx.BoxSizer(wx.VERTICAL) self.container = ItemStatsContainer(self, victim, item, itmContext) self.mainSizer.Add(self.container, 1, wx.EXPAND) + + if "wxGTK" in wx.PlatformInfo: + self.closeBtn = wx.Button( self, wx.ID_ANY, u"Close", wx.DefaultPosition, wx.DefaultSize, 0 ) + self.mainSizer.Add( self.closeBtn, 0, wx.ALL|wx.ALIGN_RIGHT, 5 ) + self.closeBtn.Bind(wx.EVT_BUTTON, self.closeEvent) + self.SetSizer(self.mainSizer) self.parentWnd = gui.mainFrame.MainFrame.getInstance()