Popup menu on folders

There are no functions associated with it but sometimes it popped up so
disable it.
This commit is contained in:
mailchuck 2016-01-24 18:25:09 +01:00
parent 6bc57f9e80
commit fa73cfd53e
Signed by untrusted user who does not match committer: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -3331,11 +3331,14 @@ class MyForm(settingsmixin.SMainWindow):
shared.reloadBroadcastSendersForWhichImWatching()
def on_context_menuSubscriptions(self, point):
currentItem = self.getCurrentItem()
if not isinstance(currentItem, Ui_AddressWidget):
return
self.popMenuSubscriptions = QtGui.QMenu(self)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsNew)
self.popMenuSubscriptions.addAction(self.actionsubscriptionsDelete)
self.popMenuSubscriptions.addSeparator()
if self.getCurrentItem().isEnabled:
if currentItem.isEnabled:
self.popMenuSubscriptions.addAction(self.actionsubscriptionsDisable)
else:
self.popMenuSubscriptions.addAction(self.actionsubscriptionsEnable)
@ -3735,12 +3738,15 @@ class MyForm(settingsmixin.SMainWindow):
return True
def on_context_menuYourIdentities(self, point):
currentItem = self.getCurrentItem()
if not isinstance(currentItem, Ui_AddressWidget):
return
self.popMenuYourIdentities = QtGui.QMenu(self)
self.popMenuYourIdentities.addAction(self.actionNewYourIdentities)
self.popMenuYourIdentities.addSeparator()
self.popMenuYourIdentities.addAction(self.actionClipboardYourIdentities)
self.popMenuYourIdentities.addSeparator()
if self.getCurrentItem().isEnabled:
if currentItem.isEnabled:
self.popMenuYourIdentities.addAction(self.actionDisableYourIdentities)
else:
self.popMenuYourIdentities.addAction(self.actionEnableYourIdentities)
@ -3752,13 +3758,16 @@ class MyForm(settingsmixin.SMainWindow):
# TODO make one popMenu
def on_context_menuChan(self, point):
currentItem = self.getCurrentItem()
if not isinstance(currentItem, Ui_AddressWidget):
return
self.popMenu = QtGui.QMenu(self)
self.popMenu.addAction(self.actionNew)
self.popMenu.addAction(self.actionDelete)
self.popMenu.addSeparator()
self.popMenu.addAction(self.actionClipboard)
self.popMenu.addSeparator()
if self.getCurrentItem().isEnabled:
if currentItem.isEnabled:
self.popMenu.addAction(self.actionDisable)
else:
self.popMenu.addAction(self.actionEnable)