def _listRightclick(self, ev): selcnt = self._list.GetSelectedItemCount() if selcnt < 1: menu = autil.new_menubar(self, [{u'同步': self._itemSync}]) if 'clipfiles' in self.__dict__: item = menu.Append(wx.ID_ANY, u'粘贴') menu.Bind(wx.EVT_MENU, self._itemPaste, item) self._list.PopupMenu(menu, wx.DefaultPosition) return menu = autil.new_menubar(self, [{u'下载': self._itemDownload}, {u'复制': self._itemCopy}, {u'剪切': self._itemCut}, {u'删除': self._itemDelete}]) if selcnt == 1: item = menu.Append(wx.ID_ANY, u'重命名') menu.Bind(wx.EVT_MENU, self._itemRename, item) ids = autil.list_get_selectitems(self._list) filetype = self._list.GetItemData(ids[0]) if filetype == type_folder: item = menu.Append(wx.ID_ANY, u'同步') menu.Bind(wx.EVT_MENU, self._itemSync, item) if 'clipfiles' in self.__dict__: item = menu.Append(wx.ID_ANY, u'粘贴') menu.Bind(wx.EVT_MENU, self._itemPaste, item) self._list.PopupMenu(menu, wx.DefaultPosition)
def _ui_list_rightclick(self, ev): menu = autil.new_menubar(self, [{u'开始': self._ui_item_start}, {u'停止': self._ui_item_stop}, {u'删除': self._ui_item_delete}]) self._list.PopupMenu(menu, wx.DefaultPosition)
def _rightClick(self, ev): selcnt = self._list.GetSelectedItemCount() if selcnt < 1: return menu = autil.new_menubar(self, [{u'激活': self._itemActive}, {u'删除': self._itemDelete}]) self._list.PopupMenu(menu, wx.DefaultPosition)
def __list_on__rightclick(self, ev): menu = autil.new_menubar(self, [{u'授权': self._ui_item_grant}, {u'删除': self._ui_item_del}, {u'重命名': self._ui_item_rename}]) self.list.PopupMenu(menu, wx.DefaultPosition)