(self)
| 2375 | dialogs.AboutDialog(self).exec_() |
| 2376 | |
| 2377 | def click_actionSettings(self): |
| 2378 | self.settingsDialogInstance = settingsDialog(self) |
| 2379 | if self._firstrun: |
| 2380 | self.settingsDialogInstance.ui.tabWidgetSettings.setCurrentIndex(1) |
| 2381 | if self.settingsDialogInstance.exec_(): |
| 2382 | if self._firstrun: |
| 2383 | BMConfigParser().remove_option( |
| 2384 | 'bitmessagesettings', 'dontconnect') |
| 2385 | BMConfigParser().set('bitmessagesettings', 'startonlogon', str( |
| 2386 | self.settingsDialogInstance.ui.checkBoxStartOnLogon.isChecked())) |
| 2387 | BMConfigParser().set('bitmessagesettings', 'minimizetotray', str( |
| 2388 | self.settingsDialogInstance.ui.checkBoxMinimizeToTray.isChecked())) |
| 2389 | BMConfigParser().set('bitmessagesettings', 'trayonclose', str( |
| 2390 | self.settingsDialogInstance.ui.checkBoxTrayOnClose.isChecked())) |
| 2391 | BMConfigParser().set('bitmessagesettings', 'hidetrayconnectionnotifications', str( |
| 2392 | self.settingsDialogInstance.ui.checkBoxHideTrayConnectionNotifications.isChecked())) |
| 2393 | BMConfigParser().set('bitmessagesettings', 'showtraynotifications', str( |
| 2394 | self.settingsDialogInstance.ui.checkBoxShowTrayNotifications.isChecked())) |
| 2395 | BMConfigParser().set('bitmessagesettings', 'startintray', str( |
| 2396 | self.settingsDialogInstance.ui.checkBoxStartInTray.isChecked())) |
| 2397 | BMConfigParser().set('bitmessagesettings', 'willinglysendtomobile', str( |
| 2398 | self.settingsDialogInstance.ui.checkBoxWillinglySendToMobile.isChecked())) |
| 2399 | BMConfigParser().set('bitmessagesettings', 'useidenticons', str( |
| 2400 | self.settingsDialogInstance.ui.checkBoxUseIdenticons.isChecked())) |
| 2401 | BMConfigParser().set('bitmessagesettings', 'replybelow', str( |
| 2402 | self.settingsDialogInstance.ui.checkBoxReplyBelow.isChecked())) |
| 2403 | |
| 2404 | lang = str(self.settingsDialogInstance.ui.languageComboBox.itemData(self.settingsDialogInstance.ui.languageComboBox.currentIndex()).toString()) |
| 2405 | BMConfigParser().set('bitmessagesettings', 'userlocale', lang) |
| 2406 | change_translation(l10n.getTranslationLanguage()) |
| 2407 | |
| 2408 | if int(BMConfigParser().get('bitmessagesettings', 'port')) != int(self.settingsDialogInstance.ui.lineEditTCPPort.text()): |
| 2409 | if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'dontconnect'): |
| 2410 | QtGui.QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( |
| 2411 | "MainWindow", "You must restart Bitmessage for the port number change to take effect.")) |
| 2412 | BMConfigParser().set('bitmessagesettings', 'port', str( |
| 2413 | self.settingsDialogInstance.ui.lineEditTCPPort.text())) |
| 2414 | if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked() != BMConfigParser().safeGetBoolean('bitmessagesettings', 'upnp'): |
| 2415 | BMConfigParser().set('bitmessagesettings', 'upnp', str(self.settingsDialogInstance.ui.checkBoxUPnP.isChecked())) |
| 2416 | if self.settingsDialogInstance.ui.checkBoxUPnP.isChecked(): |
| 2417 | import upnp |
| 2418 | upnpThread = upnp.uPnPThread() |
| 2419 | upnpThread.start() |
| 2420 | #print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText()', self.settingsDialogInstance.ui.comboBoxProxyType.currentText() |
| 2421 | #print 'self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5]', self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] |
| 2422 | if BMConfigParser().get('bitmessagesettings', 'socksproxytype') == 'none' and self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS': |
| 2423 | if shared.statusIconColor != 'red': |
| 2424 | QtGui.QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate( |
| 2425 | "MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any).")) |
| 2426 | if BMConfigParser().get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] != 'SOCKS': |
| 2427 | self.statusbar.clearMessage() |
| 2428 | state.resetNetworkProtocolAvailability() # just in case we changed something in the network connectivity |
| 2429 | if self.settingsDialogInstance.ui.comboBoxProxyType.currentText()[0:5] == 'SOCKS': |
| 2430 | BMConfigParser().set('bitmessagesettings', 'socksproxytype', str( |
| 2431 | self.settingsDialogInstance.ui.comboBoxProxyType.currentText())) |
| 2432 | else: |
| 2433 | BMConfigParser().set('bitmessagesettings', 'socksproxytype', 'none') |
| 2434 | BMConfigParser().set('bitmessagesettings', 'socksauthentication', str( |
no test coverage detected