V0.6 #852

Merged
Atheros1 merged 399 commits from v0.6 into master 2016-05-03 01:58:38 +02:00
2 changed files with 7 additions and 7 deletions
Showing only changes of commit 58481afda2 - Show all commits

View File

@ -1895,13 +1895,13 @@ class MyForm(settingsmixin.SMainWindow):
completerList = []
for address in sorted(oldRows, key = lambda x: oldRows[x][2], reverse = True):
if address in newRows:
completerList.append(newRows[address][0] + " <" + address + ">")
completerList.append(unicode(newRows[address][0], encoding="UTF-8") + " <" + address + ">")
newRows.pop(address)
else:
self.ui.tableWidgetAddressBook.removeRow(oldRows[address][2])
for address in newRows:
addRow(address, newRows[address][0], newRows[address][1])
completerList.append(newRows[address][0] + " <" + address + ">")
completerList.append(unicode(newRows[address][0], encoding="UTF-8") + " <" + address + ">")
# sort
self.ui.tableWidgetAddressBook.sortByColumn(0, Qt.AscendingOrder)
@ -3187,8 +3187,8 @@ class MyForm(settingsmixin.SMainWindow):
if self.ui.lineEditTo.text() == '':
self.ui.lineEditTo.setText(stringToAdd)
else:
self.ui.lineEditTo.setText(str(
self.ui.lineEditTo.text()) + '; ' + stringToAdd)
self.ui.lineEditTo.setText(unicode(
self.ui.lineEditTo.text().toUtf8(), encoding="UTF-8") + '; ' + stringToAdd)
if listOfSelectedRows == {}:
self.statusBar().showMessage(_translate(
"MainWindow", "No addresses selected."))

View File

@ -491,7 +491,7 @@ class AddressBookCompleter(QtGui.QCompleter):
def splitPath(self, path):
stringList = []
text = unicode(path.toUtf8())
text = unicode(path.toUtf8(), encoding="UTF-8")
splitIndex = rfind(text[0:self.widget().cursorPosition()], ";") + 1
str = text[splitIndex:self.widget().cursorPosition()]
str = rstrip(lstrip(str))
@ -499,8 +499,8 @@ class AddressBookCompleter(QtGui.QCompleter):
return stringList
def pathFromIndex(self, index):
autoString = unicode(index.data(QtCore.Qt.EditRole).toString())
text = unicode(self.widget().text().toUtf8())
autoString = unicode(index.data(QtCore.Qt.EditRole).toString().toUtf8(), encoding="UTF-8")
text = unicode(self.widget().text().toUtf8(), encoding="UTF-8")
# If cursor position was saved, restore it, else save it
if self.cursorPos != -1: