mirror of
https://github.com/evilsocket/opensnitch.git
synced 2025-03-04 00:24:40 +01:00
ui: avoid restart messages when changing node options
Some checks failed
Build status / Build (push) Has been cancelled
Some checks failed
Build status / Build (push) Has been cancelled
When saving the preferences, we check if the user changed the address of the node. Usually the current node address is the same than the one loaded, but some gRPC versions does not report it, so we use "unix:/local" as the address of the node. As this address is different than the one configured, we were displaying unnecessary restart messages to the users.
This commit is contained in:
parent
5fdb60dccb
commit
8c1da76dff
1 changed files with 3 additions and 1 deletions
|
@ -929,7 +929,9 @@ class PreferencesDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
|
||||||
return error
|
return error
|
||||||
|
|
||||||
# exclude this message if there're more than one node connected
|
# exclude this message if there're more than one node connected
|
||||||
if self.comboNodes.currentText() != self.comboNodeAddress.currentText() or \
|
# XXX: unix:/local is a special name for the node, when the gRPC
|
||||||
|
# does not return the correct address of the node.
|
||||||
|
if (self.comboNodes.currentText() != "unix:/local" and self.comboNodes.currentText() != self.comboNodeAddress.currentText()) or \
|
||||||
self.comboServerAddr.currentText() != self.comboNodeAddress.currentText():
|
self.comboServerAddr.currentText() != self.comboNodeAddress.currentText():
|
||||||
self._changes_needs_restart = QC.translate("preferences", "Node address changed (update GUI address if needed)")
|
self._changes_needs_restart = QC.translate("preferences", "Node address changed (update GUI address if needed)")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue