Skip to content

Commit 447cd5e

Browse files
committed
scripts/python/app/NUT-Monitor-py2gtk2.in: update authconf suggestions as the port number is being typed [#3514]
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent 254990d commit 447cd5e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/python/app/NUT-Monitor-py2gtk2.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ class interface :
168168
self.__widgets["ups_authentication_frame"] = self.__widgets["interface"].get_widget("hbox1")
169169
self.__widgets["ups_authentication_login"] = self.__widgets["interface"].get_widget("entry2")
170170
self.__widgets["ups_authentication_password"] = self.__widgets["interface"].get_widget("entry3")
171+
172+
# Connect to 'changed' signal on the Entry part of the SpinButton if possible
173+
# for real-time response to typing.
174+
try:
175+
self.__widgets["ups_port_entry"].connect("changed", self.__check_gui_fields)
176+
except:
177+
pass
178+
171179
self.__widgets["ups_list_combo"] = self.__widgets["interface"].get_widget("combobox1")
172180
self.__widgets["ups_commands_button"] = self.__widgets["interface"].get_widget("button8")
173181
self.__widgets["ups_connect"] = self.__widgets["interface"].get_widget("button2")
@@ -204,7 +212,6 @@ class interface :
204212
"on_entry3_changed" : self.__on_password_changed,
205213
"on_checkbutton1_toggled" : self.__on_auth_check_changed,
206214
"on_spinbutton1_value_changed" : self.__check_gui_fields,
207-
"on_spinbutton1_changed" : self.__check_gui_fields,
208215
"on_button1_clicked" : self.__update_ups_list,
209216
"on_button2_clicked" : self.connect_to_ups,
210217
"on_button7_clicked" : self.disconnect_from_ups,

0 commit comments

Comments
 (0)