Add a statusbar alert about onionservicesonly setting
and schedule MyForm.setStatusIcon() 30 sec after it is shown
This commit is contained in:
parent
e6ecaa5e7d
commit
b16105f254
|
@ -1758,7 +1758,6 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
connected = False
|
connected = False
|
||||||
|
|
||||||
def setStatusIcon(self, color):
|
def setStatusIcon(self, color):
|
||||||
# print 'setting status icon color'
|
|
||||||
_notifications_enabled = not config.getboolean(
|
_notifications_enabled = not config.getboolean(
|
||||||
'bitmessagesettings', 'hidetrayconnectionnotifications')
|
'bitmessagesettings', 'hidetrayconnectionnotifications')
|
||||||
if color == 'red':
|
if color == 'red':
|
||||||
|
@ -1771,14 +1770,24 @@ class MyForm(settingsmixin.SMainWindow):
|
||||||
'Bitmessage',
|
'Bitmessage',
|
||||||
_translate("MainWindow", "Connection lost"),
|
_translate("MainWindow", "Connection lost"),
|
||||||
sound.SOUND_DISCONNECTED)
|
sound.SOUND_DISCONNECTED)
|
||||||
if not config.safeGetBoolean('bitmessagesettings', 'upnp') and \
|
proxy = config.safeGet(
|
||||||
config.get('bitmessagesettings', 'socksproxytype') == "none":
|
'bitmessagesettings', 'socksproxytype', 'none')
|
||||||
|
if proxy == 'none' and not config.safeGetBoolean(
|
||||||
|
'bitmessagesettings', 'upnp'):
|
||||||
self.updateStatusBar(
|
self.updateStatusBar(
|
||||||
_translate(
|
_translate(
|
||||||
"MainWindow",
|
"MainWindow",
|
||||||
"Problems connecting? Try enabling UPnP in the Network"
|
"Problems connecting? Try enabling UPnP in the Network"
|
||||||
" Settings"
|
" Settings"
|
||||||
))
|
))
|
||||||
|
elif proxy == 'SOCKS5' and config.safeGetBoolean(
|
||||||
|
'bitmessagesettings', 'onionservicesonly'):
|
||||||
|
self.updateStatusBar((
|
||||||
|
_translate(
|
||||||
|
"MainWindow",
|
||||||
|
"With recent tor you may never connect having"
|
||||||
|
" 'onionservicesonly' set in your config."), 1
|
||||||
|
))
|
||||||
self.connected = False
|
self.connected = False
|
||||||
|
|
||||||
if self.actionStatus is not None:
|
if self.actionStatus is not None:
|
||||||
|
@ -4307,5 +4316,7 @@ def run():
|
||||||
# only show after wizards and connect dialogs have completed
|
# only show after wizards and connect dialogs have completed
|
||||||
if not config.getboolean('bitmessagesettings', 'startintray'):
|
if not config.getboolean('bitmessagesettings', 'startintray'):
|
||||||
myapp.show()
|
myapp.show()
|
||||||
|
QtCore.QTimer.singleShot(
|
||||||
|
30000, lambda: myapp.setStatusIcon(state.statusIconColor))
|
||||||
|
|
||||||
app.exec_()
|
app.exec_()
|
||||||
|
|
Reference in New Issue
Block a user