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 f2e9b3467f - Show all commits

View File

@ -168,6 +168,28 @@ def change_translation(locale):
qtranslator.load(translationpath) qtranslator.load(translationpath)
QtGui.QApplication.installTranslator(qtranslator) QtGui.QApplication.installTranslator(qtranslator)
def address_compare(x, y):
if x == "bitmessagesettings":
return -1
elif y == "bitmessagesettings":
return 1
if shared.config.getboolean(x, 'enabled') == shared.config.getboolean(y, 'enabled'):
if shared.config.get(x, 'label'):
x1 = shared.config.get(x, 'label')
else:
x1 = x
if shared.config.get(y, 'label'):
y1 = shared.config.get(y, 'label')
else:
y1 = y
if x1 > y1:
return 1
elif x1 < y1:
return -1
else:
return 0
else:
return (1 if shared.config.getboolean(x, 'enabled') else '-1')
class MyForm(QtGui.QMainWindow): class MyForm(QtGui.QMainWindow):
@ -553,7 +575,7 @@ class MyForm(QtGui.QMainWindow):
toaddress, folder, cnt = row toaddress, folder, cnt = row
cntUnreadMsg[toaddress + folder] = cnt cntUnreadMsg[toaddress + folder] = cnt
configSections = shared.config.sections() configSections = sorted(shared.config.sections(), cmp=address_compare)
for addressInKeysFile in configSections: for addressInKeysFile in configSections:
if addressInKeysFile != 'bitmessagesettings': if addressInKeysFile != 'bitmessagesettings':
isEnabled = shared.config.getboolean( isEnabled = shared.config.getboolean(