Changeset 123:3b181cd0ab99 for src/mlx/gui
- Timestamp:
- 04/29/12 06:48:38 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx/gui
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/gui/common.py
r105 r123 27 27 BUTTONSTYPE_YES_NO = gtk.BUTTONS_YES_NO 28 28 RESPONSETYPE_YES = gtk.RESPONSE_YES 29 RESPONSETYPE_ACCEPT = gtk.RESPONSE_ACCEPT 30 RESPONSETYPE_REJECT = gtk.RESPONSE_REJECT 29 31 ACCEL_VISIBLE = gtk.ACCEL_VISIBLE 30 32 CONTROL_MASK = gdk.CONTROL_MASK 33 DIALOG_MODAL = gtk.DIALOG_MODAL 31 34 32 35 def text2unicode(text): … … 49 52 BUTTONSTYPE_YES_NO = gtk.ButtonsType.YES_NO 50 53 RESPONSETYPE_YES = gtk.ResponseType.YES 54 RESPONSETYPE_ACCEPT = gtk.ResponseType.ACCEPT 55 RESPONSETYPE_REJECT = gtk.ResponseType.REJECT 51 56 ACCEL_VISIBLE = gtk.AccelFlags.VISIBLE 52 57 CONTROL_MASK = gdk.ModifierType.CONTROL_MASK 58 DIALOG_MODAL = gtk.DialogFlags.MODAL 53 59 54 60 import codecs -
src/mlx/gui/gui.py
r120 r123 10 10 from mlx.gui.weighthelp import WeightHelp 11 11 from mlx.gui.gates import FleetGateStatus 12 from mlx.gui.prefs import Preferences 12 13 13 14 import mlx.const as const … … 61 62 """Build the GUI.""" 62 63 63 window = gtk.Window()64 self._mainWindow = window = gtk.Window() 64 65 window.set_title(WINDOW_TITLE_BASE) 65 66 window.set_icon_from_file(os.path.join(iconDirectory, "logo.ico")) … … 73 74 window.add(mainVBox) 74 75 76 self._preferences = Preferences(self) 77 75 78 menuBar = self._buildMenuBar(accelGroup) 76 79 mainVBox.pack_start(menuBar, False, False, 0) … … 130 133 self._weightHelp.reset() 131 134 self._weightHelp.disable() 132 133 self._mainWindow = window134 135 135 136 self._statusIcon = StatusIcon(iconDirectory, self) … … 663 664 fileMenu.append(quitMenuItem) 664 665 666 toolsMenuItem = gtk.MenuItem(xstr("menu_tools")) 667 toolsMenu = gtk.Menu() 668 toolsMenuItem.set_submenu(toolsMenu) 669 menuBar.append(toolsMenuItem) 670 671 prefsMenuItem = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES) 672 prefsMenuItem.set_use_stock(True) 673 prefsMenuItem.set_label(xstr("menu_tools_prefs")) 674 prefsMenuItem.add_accelerator("activate", accelGroup, 675 ord(xstr("menu_tools_prefs_key")), 676 CONTROL_MASK, ACCEL_VISIBLE) 677 prefsMenuItem.connect("activate", self._editPreferences) 678 toolsMenu.append(prefsMenuItem) 665 679 666 680 viewMenuItem = gtk.MenuItem(xstr("menu_view")) … … 759 773 else: 760 774 self._mainWindow.set_default(None) 775 776 def _editPreferences(self, menuItem): 777 """Callback for editing the preferences.""" 778 self._preferences.run(self.config) -
src/mlx/gui/info.py
r122 r123 5 5 from mlx.i18n import xstr 6 6 import mlx.const as const 7 8 #------------------------------------------------------------------------------ 7 9 8 10 class FlightInfo(gtk.VBox):
Note:
See TracChangeset
for help on using the changeset viewer.