Added a nice icon for preferences dialog

This commit is contained in:
HomeWorld
2010-12-06 13:37:38 +02:00
parent c703252ee5
commit ca21652be8
3 changed files with 10 additions and 5 deletions

View File

@@ -296,7 +296,7 @@ class MainFrame(wx.Frame):
# Backup fits
self.Bind(wx.EVT_MENU, self.backupToXml, id=menuBar.backupFitsId)
# Preference dialog
self.Bind(wx.EVT_MENU, self.showPreferenceDialog, id=wx.ID_PREFERENCES)
self.Bind(wx.EVT_MENU, self.showPreferenceDialog, id = menuBar.preferencesId)
#Clipboard exports
self.Bind(wx.EVT_MENU, self.exportToClipboard, id=wx.ID_COPY)

View File

@@ -30,6 +30,7 @@ class MainMenuBar(wx.MenuBar):
self.damagePatternEditorId = wx.NewId()
self.graphFrameId = wx.NewId()
self.backupFitsId = wx.NewId()
self.preferencesId = wx.NewId()
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
@@ -78,10 +79,11 @@ class MainMenuBar(wx.MenuBar):
graphFrameItem = wx.MenuItem(windowMenu, self.graphFrameId, "Graphs\tCTRL+G")
graphFrameItem.SetBitmap(bitmapLoader.getBitmap("graphs_small", "icons"))
# graphFrameItem.Enable(gui.graphFrame.enabled)
windowMenu.AppendItem(graphFrameItem)
windowMenu.Append(wx.ID_PREFERENCES)
preferencesItem = wx.MenuItem(windowMenu, self.preferencesId, "Preferences\tCTRL+P")
preferencesItem.SetBitmap(bitmapLoader.getBitmap("preferences_small", "icons"))
windowMenu.AppendItem(preferencesItem)
# graphFrameItem.Enable(gui.graphFrame.enabled)
# Help menu
helpMenu = wx.Menu()

View File

@@ -19,12 +19,15 @@
import wx
from gui.preferenceView import PreferenceView
import bitmapLoader
class PreferenceDialog(wx.Dialog):
def __init__(self, parent):
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, size=wx.DefaultSize, style=wx.DEFAULT_DIALOG_STYLE)
self.SetTitle("pyfa - Preferences")
i = wx.IconFromBitmap(bitmapLoader.getBitmap("preferences_small", "icons"))
self.SetIcon(i)
mainSizer = wx.BoxSizer(wx.VERTICAL)
self.listbook = wx.Listbook(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.LB_DEFAULT)