Ignore:
Timestamp:
07/01/12 07:58:44 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Started implementing the approach callout editor

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

Legend:

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

    r260 r264  
    203203        selection = self._fileList.get_selection()
    204204        (model, paths) = selection.get_selected_rows()
    205         while paths:
    206             model.remove(model.get_iter(paths[0]))
    207             (model, paths) = selection.get_selected_rows()
     205
     206        iters = [model.get_iter(path) for path in paths]
     207
     208        for i in iters:
     209            if i is not None:
     210                model.remove(i)
    208211       
    209212    def _moveUpButtonClicked(self, button):
  • src/mlx/gui/common.py

    r246 r264  
    6262    WINDOW_STATE_ICONIFIED = gdk.WINDOW_STATE_ICONIFIED
    6363    WINDOW_STATE_WITHDRAWN = gdk.WINDOW_STATE_WITHDRAWN
     64
     65    SORT_ASCENDING = gtk.SORT_ASCENDING
     66    SORT_DESCENDING = gtk.SORT_DESCENDING
    6467
    6568    pixbuf_new_from_file = gdk.pixbuf_new_from_file
     
    118121    WINDOW_STATE_WITHDRAWN = gdk.WindowState.WITHDRAWN
    119122
     123    SORT_ASCENDING = gtk.SortType.ASCENDING
     124    SORT_DESCENDING = gtk.SortType.DESCENDING
     125
    120126    pixbuf_new_from_file = gdkPixbuf.Pixbuf.new_from_file
    121127
  • src/mlx/gui/gui.py

    r261 r264  
    1313from mlx.gui.prefs import Preferences
    1414from mlx.gui.checklist import ChecklistEditor
     15from mlx.gui.callouts import ApproachCalloutsEditor
    1516from mlx.gui.pirep import PIREPViewer
    1617
     
    9596        self._preferences = Preferences(self)
    9697        self._checklistEditor = ChecklistEditor(self)
     98        self._approachCalloutsEditor = ApproachCalloutsEditor(self)
    9799
    98100        menuBar = self._buildMenuBar(accelGroup)
     
    870872        checklistMenuItem.connect("activate", self._editChecklist)
    871873        toolsMenu.append(checklistMenuItem)
     874
     875        approachCalloutsMenuItem = gtk.ImageMenuItem(gtk.STOCK_EDIT)
     876        approachCalloutsMenuItem.set_use_stock(True)
     877        approachCalloutsMenuItem.set_label(xstr("menu_tools_callouts"))
     878        approachCalloutsMenuItem.add_accelerator("activate", accelGroup,
     879                                                 ord(xstr("menu_tools_callouts_key")),
     880                                                 CONTROL_MASK, ACCEL_VISIBLE)
     881        approachCalloutsMenuItem.connect("activate", self._editApproachCallouts)
     882        toolsMenu.append(approachCalloutsMenuItem)
    872883
    873884        prefsMenuItem = gtk.ImageMenuItem(gtk.STOCK_PREFERENCES)
     
    10071018        """Callback for editing the checklists."""
    10081019        self._checklistEditor.run()
     1020       
     1021    def _editApproachCallouts(self, menuItem):
     1022        """Callback for editing the approach callouts."""
     1023        self._approachCalloutsEditor.run()
    10091024       
    10101025    def _editPreferences(self, menuItem):
Note: See TracChangeset for help on using the changeset viewer.