Do not show context menu on 'sent' folder
because the 'sent' table have no column 'read'
This commit is contained in:
parent
ffbc09758c
commit
5e0d168db6
|
@ -2656,10 +2656,8 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
tableWidget.item(i, 3).setFont(font)
|
tableWidget.item(i, 3).setFont(font)
|
||||||
|
|
||||||
markread = sqlExecuteChunked(
|
markread = sqlExecuteChunked(
|
||||||
"UPDATE %s SET read = 1 WHERE %s IN({0}) AND read=0" % (
|
"UPDATE inbox SET read = 1 WHERE msgid IN({0}) AND read=0",
|
||||||
('sent', 'ackdata') if self.getCurrentFolder() == 'sent'
|
idCount, *msgids
|
||||||
else ('inbox', 'msgid')
|
|
||||||
), idCount, *msgids
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if markread > 0:
|
if markread > 0:
|
||||||
|
@ -3459,11 +3457,14 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
for plugin in self.menu_plugins['address']:
|
for plugin in self.menu_plugins['address']:
|
||||||
self.popMenuSubscriptions.addAction(plugin)
|
self.popMenuSubscriptions.addAction(plugin)
|
||||||
self.popMenuSubscriptions.addSeparator()
|
self.popMenuSubscriptions.addSeparator()
|
||||||
|
if self.getCurrentFolder() != 'sent':
|
||||||
self.popMenuSubscriptions.addAction(self.actionMarkAllRead)
|
self.popMenuSubscriptions.addAction(self.actionMarkAllRead)
|
||||||
|
if self.popMenuSubscriptions.isEmpty():
|
||||||
|
return
|
||||||
self.popMenuSubscriptions.exec_(
|
self.popMenuSubscriptions.exec_(
|
||||||
self.ui.treeWidgetSubscriptions.mapToGlobal(point))
|
self.ui.treeWidgetSubscriptions.mapToGlobal(point))
|
||||||
|
|
||||||
def widgetConvert (self, widget):
|
def widgetConvert(self, widget):
|
||||||
if widget == self.ui.tableWidgetInbox:
|
if widget == self.ui.tableWidgetInbox:
|
||||||
return self.ui.treeWidgetYourIdentities
|
return self.ui.treeWidgetYourIdentities
|
||||||
elif widget == self.ui.tableWidgetInboxSubscriptions:
|
elif widget == self.ui.tableWidgetInboxSubscriptions:
|
||||||
|
@ -3874,8 +3875,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
for plugin in self.menu_plugins['address']:
|
for plugin in self.menu_plugins['address']:
|
||||||
self.popMenuYourIdentities.addAction(plugin)
|
self.popMenuYourIdentities.addAction(plugin)
|
||||||
self.popMenuYourIdentities.addSeparator()
|
self.popMenuYourIdentities.addSeparator()
|
||||||
|
if self.getCurrentFolder() != 'sent':
|
||||||
self.popMenuYourIdentities.addAction(self.actionMarkAllRead)
|
self.popMenuYourIdentities.addAction(self.actionMarkAllRead)
|
||||||
|
if self.popMenuYourIdentities.isEmpty():
|
||||||
|
return
|
||||||
self.popMenuYourIdentities.exec_(
|
self.popMenuYourIdentities.exec_(
|
||||||
self.ui.treeWidgetYourIdentities.mapToGlobal(point))
|
self.ui.treeWidgetYourIdentities.mapToGlobal(point))
|
||||||
|
|
||||||
|
@ -3899,7 +3902,10 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
for plugin in self.menu_plugins['address']:
|
for plugin in self.menu_plugins['address']:
|
||||||
self.popMenu.addAction(plugin)
|
self.popMenu.addAction(plugin)
|
||||||
self.popMenu.addSeparator()
|
self.popMenu.addSeparator()
|
||||||
|
if self.getCurrentFolder() != 'sent':
|
||||||
self.popMenu.addAction(self.actionMarkAllRead)
|
self.popMenu.addAction(self.actionMarkAllRead)
|
||||||
|
if self.popMenu.isEmpty():
|
||||||
|
return
|
||||||
self.popMenu.exec_(
|
self.popMenu.exec_(
|
||||||
self.ui.treeWidgetChans.mapToGlobal(point))
|
self.ui.treeWidgetChans.mapToGlobal(point))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user