Skip to content

Commit 8c1da76

Browse files
ui: avoid restart messages when changing node options
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.
1 parent 5fdb60d commit 8c1da76

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/opensnitch/dialogs/preferences.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,9 @@ def _save_node_config(self, notifObject, addr):
929929
return error
930930

931931
# exclude this message if there're more than one node connected
932-
if self.comboNodes.currentText() != self.comboNodeAddress.currentText() or \
932+
# XXX: unix:/local is a special name for the node, when the gRPC
933+
# does not return the correct address of the node.
934+
if (self.comboNodes.currentText() != "unix:/local" and self.comboNodes.currentText() != self.comboNodeAddress.currentText()) or \
933935
self.comboServerAddr.currentText() != self.comboNodeAddress.currentText():
934936
self._changes_needs_restart = QC.translate("preferences", "Node address changed (update GUI address if needed)")
935937

0 commit comments

Comments
 (0)