Ignore:
Timestamp:
05/12/12 17:28:52 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The beginnings of the checklist editor widget

Location:
src/mlx/gui
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/gui.py

    r171 r172  
    1111from mlx.gui.gates import FleetGateStatus
    1212from mlx.gui.prefs import Preferences
     13from mlx.gui.checklist import ChecklistEditor
    1314
    1415import mlx.const as const
     
    8586
    8687        self._preferences = Preferences(self)
     88        self._checklistEditor = ChecklistEditor(self)
    8789
    8890        menuBar = self._buildMenuBar(accelGroup)
     
    770772        menuBar.append(toolsMenuItem)
    771773
    772         prefsMenuItem = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES)
     774        checklistMenuItem = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES)
     775        checklistMenuItem.set_use_stock(True)
     776        checklistMenuItem.set_label(xstr("menu_tools_chklst"))
     777        checklistMenuItem.add_accelerator("activate", accelGroup,
     778                                          ord(xstr("menu_tools_chklst_key")),
     779                                          CONTROL_MASK, ACCEL_VISIBLE)
     780        checklistMenuItem.connect("activate", self._editChecklist)
     781        toolsMenu.append(checklistMenuItem)
     782
     783        prefsMenuItem = gtk.ImageMenuItem(gtk.STOCK_APPLY)
    773784        prefsMenuItem.set_use_stock(True)
    774785        prefsMenuItem.set_label(xstr("menu_tools_prefs"))
     
    878889            self._mainWindow.set_default(None)
    879890
     891    def _editChecklist(self, menuItem):
     892        """Callback for editing the checklists."""
     893        self._checklistEditor.run()
     894       
    880895    def _editPreferences(self, menuItem):
    881896        """Callback for editing the preferences."""
Note: See TracChangeset for help on using the changeset viewer.