V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
Showing only changes of commit ccae351e65 - Show all commits

View File

@ -535,7 +535,6 @@ class MyForm(QtGui.QMainWindow):
j += 1 j += 1
widget.setUnreadCount(unread) widget.setUnreadCount(unread)
if (tab == 'messages'): if (tab == 'messages'):
print "setting %s editable" % (toAddress)
widget.setFlags (widget.flags() | QtCore.Qt.ItemIsEditable) widget.setFlags (widget.flags() | QtCore.Qt.ItemIsEditable)
i += 1 i += 1
@ -3469,19 +3468,29 @@ more work your computer must do to send the message. A Time-To-Live of four or f
self.loadMessagelist(messagelist, account, folder) self.loadMessagelist(messagelist, account, folder)
def treeWidgetItemChanged(self, item, column): def treeWidgetItemChanged(self, item, column):
widget = self.getCurrentTreeWidget() # only for manual edits. automatic edits (setText) are ignored
if item.address == widget.currentItem().address: if column != 0:
newLabel = str(item.text(0)) return
newLabel = newLabel.replace("(" + str(item.address) + ")", '') # only account names
newLabel = newLabel.rstrip() if not isinstance(item, Ui_AddressWidget):
oldLabel = shared.config.get(str(item.address), 'label') return
oldLabel = oldLabel.replace("(" + str(item.address) + ")", '') # only currently selected item
oldLabel = oldLabel.rstrip() if item.address != self.getCurrentTreeWidget().currentItem().address:
if newLabel == oldLabel: return
return
shared.config.set(str(item.address), 'label', newLabel) newLabel = str(item.text(0))
item.updateText() newLabel = newLabel.replace("(" + str(item.address) + ")", '')
shared.writeKeysFile() newLabel = newLabel.rstrip()
oldLabel = shared.config.get(str(item.address), 'label')
oldLabel = oldLabel.replace("(" + str(item.address) + ")", '')
oldLabel = oldLabel.rstrip()
# unchanged, do not do anything either
if newLabel == oldLabel:
return
shared.config.set(str(item.address), 'label', newLabel)
item.updateText()
shared.writeKeysFile()
def tableWidgetInboxItemClicked(self): def tableWidgetInboxItemClicked(self):
folder = self.getCurrentFolder() folder = self.getCurrentFolder()