Merge branch 'master' of github.com:Atheros1/PyBitmessage

This commit is contained in:
Jonathan Warren 2013-11-02 17:36:01 -04:00
commit 389be42668
2 changed files with 11 additions and 2 deletions

View File

@ -3145,13 +3145,21 @@ class settingsDialog(QtGui.QDialog):
self.ui.checkBoxPortableMode.setChecked(True) self.ui.checkBoxPortableMode.setChecked(True)
if 'darwin' in sys.platform: if 'darwin' in sys.platform:
self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setDisabled(True)
self.ui.checkBoxStartOnLogon.setText(_translate(
"MainWindow", "Start-on-login not yet supported on your OS."))
self.ui.checkBoxMinimizeToTray.setDisabled(True) self.ui.checkBoxMinimizeToTray.setDisabled(True)
self.ui.checkBoxMinimizeToTray.setText(_translate(
"MainWindow", "Minimize-to-tray not yet supported on your OS."))
self.ui.checkBoxShowTrayNotifications.setDisabled(True) self.ui.checkBoxShowTrayNotifications.setDisabled(True)
self.ui.labelSettingsNote.setText(_translate( self.ui.checkBoxShowTrayNotifications.setText(_translate(
"MainWindow", "Options have been disabled because they either aren\'t applicable or because they haven\'t yet been implemented for your operating system.")) "MainWindow", "Tray notifications not yet supported on your OS."))
elif 'linux' in sys.platform: elif 'linux' in sys.platform:
self.ui.checkBoxStartOnLogon.setDisabled(True) self.ui.checkBoxStartOnLogon.setDisabled(True)
self.ui.checkBoxStartOnLogon.setText(_translate(
"MainWindow", "Start-on-login not yet supported on your OS."))
self.ui.checkBoxMinimizeToTray.setDisabled(True) self.ui.checkBoxMinimizeToTray.setDisabled(True)
self.ui.checkBoxMinimizeToTray.setText(_translate(
"MainWindow", "Minimize-to-tray not yet supported on your OS."))
# On the Network settings tab: # On the Network settings tab:
self.ui.lineEditTCPPort.setText(str( self.ui.lineEditTCPPort.setText(str(
shared.config.get('bitmessagesettings', 'port'))) shared.config.get('bitmessagesettings', 'port')))

View File

@ -275,6 +275,7 @@ class sqlThread(threading.Thread):
shared.config.set('bitmessagesettings', 'useidenticons', 'True') shared.config.set('bitmessagesettings', 'useidenticons', 'True')
if not shared.config.has_option('bitmessagesettings', 'identiconsuffix'): # acts as a salt if not shared.config.has_option('bitmessagesettings', 'identiconsuffix'): # acts as a salt
shared.config.set('bitmessagesettings', 'identiconsuffix', ''.join(random.choice("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") for x in range(12))) # a twelve character pseudo-password to salt the identicons shared.config.set('bitmessagesettings', 'identiconsuffix', ''.join(random.choice("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") for x in range(12))) # a twelve character pseudo-password to salt the identicons
# Since we've added a new config entry, let's write keys.dat to disk.
with open(shared.appdata + 'keys.dat', 'wb') as configfile: with open(shared.appdata + 'keys.dat', 'wb') as configfile:
shared.config.write(configfile) shared.config.write(configfile)