Added a nice icon for preferences dialog
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user