- add the settings also for old users

This commit is contained in:
sendiulo 2013-09-21 17:06:54 +02:00
parent aed489a2bc
commit 21005fb0a8
2 changed files with 8 additions and 3 deletions

View File

@ -2171,12 +2171,10 @@ class MyForm(QtGui.QMainWindow):
shared.config.set('bitmessagesettings', 'willinglysendtomobile', str( shared.config.set('bitmessagesettings', 'willinglysendtomobile', str(
self.settingsDialogInstance.ui.checkBoxWillinglySendToMobile.isChecked())) self.settingsDialogInstance.ui.checkBoxWillinglySendToMobile.isChecked()))
lang_ind = int(self.settingsDialogInstance.ui.languageComboBox.currentIndex()) lang_ind = int(self.settingsDialogInstance.ui.languageComboBox.currentIndex())
if not languages[lang_ind] == 'other': if not languages[lang_ind] == 'other':
shared.config.set('bitmessagesettings', 'userlocale', languages[lang_ind]) shared.config.set('bitmessagesettings', 'userlocale', languages[lang_ind])
###
curr_index = self.settingsDialogInstance.ui.comboBoxIdenticonStyle.currentIndex() curr_index = self.settingsDialogInstance.ui.comboBoxIdenticonStyle.currentIndex()
shared.config.set('bitmessagesettings', 'identicon', str(self.settingsDialogInstance.ui.comboBoxIdenticonStyle.itemData( shared.config.set('bitmessagesettings', 'identicon', str(self.settingsDialogInstance.ui.comboBoxIdenticonStyle.itemData(
curr_index , Qt.UserRole).toString())) curr_index , Qt.UserRole).toString()))

View File

@ -208,6 +208,13 @@ class sqlThread(threading.Thread):
if not shared.config.has_option('bitmessagesettings', 'userlocale'): if not shared.config.has_option('bitmessagesettings', 'userlocale'):
shared.config.set('bitmessagesettings', 'userlocale', 'system') shared.config.set('bitmessagesettings', 'userlocale', 'system')
if not shared.config.has_option('bitmessagesettings', 'identicon'):
shared.config.set('bitmessagesettings', 'identicon', 'None')
if not shared.config.has_option('bitmessagesettings', 'identiconsuffix'):
import random, string
shared.config.set('bitmessagesettings', 'identiconsuffix', ''.join(random.choice("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") for x in range(12))) # a twelve character pseudo-password to salt the identicons
if not shared.config.has_option('bitmessagesettings', 'avatars'):
shared.config.set('bitmessagesettings', 'avatars', 'false')
if not shared.config.has_option('bitmessagesettings', 'sendoutgoingconnections'): if not shared.config.has_option('bitmessagesettings', 'sendoutgoingconnections'):
shared.config.set('bitmessagesettings', 'sendoutgoingconnections', 'True') shared.config.set('bitmessagesettings', 'sendoutgoingconnections', 'True')