Exemple #1
0
    def _ListItemRightclick(self, ev):
        menu = avui.new_menubar(
            self,
            [{_('Call'):
              lambda ev: self._ListItemCall(item)},
             {_('Delete'):
              lambda ev: self._ListItemDelete(item)},
             {_('Edit Options'):
              lambda ev: self._ListItemEdit(item)}])
        item = self._list.GetSelection()
        if item.GetID() == 0:
            menu = avui.new_menubar(self,
                                    [{_('Add'): self._AddScheduleDialog}])

        self._list.PopupMenu(menu, wx.DefaultPosition)
Exemple #2
0
    def _ItemRightclick(self, ev):
        items = self._tree.GetSelections()
        if len(items) == 0:
            return

        menu = avui.new_menubar(
            self,
            [{_('Start'): lambda ev: self._ItemStart(items)},
             {_('Stop'): lambda ev: self._ItemStop(items)},
             {_('Delete'): lambda ev: self._ItemDelete(items)}])
        if len(items) == 1:
            menu = avui.new_menubar(
                self,
                [{_('Start'): lambda ev: self._ItemStart(items)},
                 {_('Stop'): lambda ev: self._ItemStop(items)},
                 {_('Delete'): lambda ev: self._ItemDelete(items)},
                 {_('Show Detail'): lambda ev: self._ItemShow(items)}])

        self._tree.PopupMenu(menu, wx.DefaultPosition)
Exemple #3
0
 def __taskbar_onrightdown(self, ev):
     menu = avui.new_menubar(self,
                             [{_('About'): self.__gui_on_about},
                              {_('Quit'): self.__gui_on_quit}])
     self.PopupMenu(menu)