Merge pull request #329 from Atheros1/master
Move code to add sockslisten option
This commit is contained in:
commit
9035ba40b4
|
@ -1953,7 +1953,7 @@ class MyForm(QtGui.QMainWindow):
|
||||||
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5] == 'SOCKS':
|
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText())[0:5] == 'SOCKS':
|
||||||
if shared.statusIconColor != 'red':
|
if shared.statusIconColor != 'red':
|
||||||
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
QMessageBox.about(self, _translate("MainWindow", "Restart"), _translate(
|
||||||
"MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections."))
|
"MainWindow", "Bitmessage will use your proxy from now on but you may want to manually restart Bitmessage now to close existing connections (if any)."))
|
||||||
if shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText()) == 'none':
|
if shared.config.get('bitmessagesettings', 'socksproxytype')[0:5] == 'SOCKS' and str(self.settingsDialogInstance.ui.comboBoxProxyType.currentText()) == 'none':
|
||||||
self.statusBar().showMessage('')
|
self.statusBar().showMessage('')
|
||||||
shared.config.set('bitmessagesettings', 'socksproxytype', str(
|
shared.config.set('bitmessagesettings', 'socksproxytype', str(
|
||||||
|
|
|
@ -187,6 +187,9 @@ class sqlThread(threading.Thread):
|
||||||
'''update sent set status='broadcastqueued' where status='broadcastpending' ''')
|
'''update sent set status='broadcastqueued' where status='broadcastpending' ''')
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
|
|
||||||
|
if not shared.config.has_option('bitmessagesettings', 'sockslisten'):
|
||||||
|
shared.config.set('bitmessagesettings', 'sockslisten', 'false')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
testpayload = '\x00\x00'
|
testpayload = '\x00\x00'
|
||||||
t = ('1234', testpayload, '12345678', 'no')
|
t = ('1234', testpayload, '12345678', 'no')
|
||||||
|
|
|
@ -80,9 +80,3 @@ def loadConfig():
|
||||||
os.umask(0o077)
|
os.umask(0o077)
|
||||||
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)
|
||||||
|
|
||||||
# Initialize settings that may be missing due to upgrades and could
|
|
||||||
# cause errors if missing.
|
|
||||||
if not shared.config.has_option('bitmessagesettings', 'sockslisten'):
|
|
||||||
shared.config.set('bitmessagesettings', 'sockslisten', 'false')
|
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user