mirror of
https://github.com/gryf/wicd.git
synced 2025-12-22 05:48:03 +01:00
Buttons are now activated correctly when using the keyboard
This commit is contained in:
18
wicd/gui.py
18
wicd/gui.py
@@ -511,11 +511,11 @@ class appGui(object):
|
||||
printLine = True # In this case we print a separator.
|
||||
wirednet = WiredNetworkEntry()
|
||||
self.network_list.pack_start(wirednet, False, False)
|
||||
wirednet.connect_button.connect("button-press-event", self.connect,
|
||||
wirednet.connect_button.connect("clicked", self.connect,
|
||||
"wired", 0, wirednet)
|
||||
wirednet.disconnect_button.connect("button-press-event", self.disconnect,
|
||||
wirednet.disconnect_button.connect("clicked", self.disconnect,
|
||||
"wired", 0, wirednet)
|
||||
wirednet.advanced_button.connect("button-press-event",
|
||||
wirednet.advanced_button.connect("clicked",
|
||||
self.edit_advanced, "wired", 0,
|
||||
wirednet)
|
||||
|
||||
@@ -533,13 +533,13 @@ class appGui(object):
|
||||
printLine = True
|
||||
tempnet = WirelessNetworkEntry(x)
|
||||
self.network_list.pack_start(tempnet, False, False)
|
||||
tempnet.connect_button.connect("button-press-event",
|
||||
tempnet.connect_button.connect("clicked",
|
||||
self.connect, "wireless", x,
|
||||
tempnet)
|
||||
tempnet.disconnect_button.connect("button-press-event",
|
||||
tempnet.disconnect_button.connect("clicked",
|
||||
self.disconnect, "wireless",
|
||||
x, tempnet)
|
||||
tempnet.advanced_button.connect("button-press-event",
|
||||
tempnet.advanced_button.connect("clicked",
|
||||
self.edit_advanced, "wireless",
|
||||
x, tempnet)
|
||||
else:
|
||||
@@ -598,7 +598,7 @@ class appGui(object):
|
||||
|
||||
return True
|
||||
|
||||
def edit_advanced(self, widget, event, ttype, networkid, networkentry):
|
||||
def edit_advanced(self, widget, ttype, networkid, networkentry):
|
||||
""" Display the advanced settings dialog.
|
||||
|
||||
Displays the advanced settings dialog and saves any changes made.
|
||||
@@ -649,7 +649,7 @@ class appGui(object):
|
||||
return False
|
||||
return True
|
||||
|
||||
def connect(self, widget, event, nettype, networkid, networkentry):
|
||||
def connect(self, widget, nettype, networkid, networkentry):
|
||||
""" Initiates the connection process in the daemon. """
|
||||
cancel_button = self.wTree.get_widget("cancel_button")
|
||||
cancel_button.set_sensitive(True)
|
||||
@@ -663,7 +663,7 @@ class appGui(object):
|
||||
wired.ConnectWired()
|
||||
self.update_statusbar()
|
||||
|
||||
def disconnect(self, widget, event, nettype, networkid, networkentry):
|
||||
def disconnect(self, widget, nettype, networkid, networkentry):
|
||||
""" Disconnects from the given network.
|
||||
|
||||
Keyword arguments:
|
||||
|
||||
@@ -238,7 +238,7 @@ class WiredSettingsDialog(AdvancedSettingsDialog):
|
||||
""" Build the wired settings dialog. """
|
||||
AdvancedSettingsDialog.__init__(self)
|
||||
self.des = self.connect("destroy", self.destroy_called)
|
||||
self.script_button.connect("button-press-event", self.edit_scripts)
|
||||
self.script_button.connect("clicked", self.edit_scripts)
|
||||
self.prof_name = name
|
||||
|
||||
def set_net_prop(self, option, value):
|
||||
@@ -335,7 +335,7 @@ class WirelessSettingsDialog(AdvancedSettingsDialog):
|
||||
# Connect signals.
|
||||
self.chkbox_encryption.connect("toggled", self.toggle_encryption)
|
||||
self.combo_encryption.connect("changed", self.change_encrypt_method)
|
||||
self.script_button.connect("button-press-event", self.edit_scripts)
|
||||
self.script_button.connect("clicked", self.edit_scripts)
|
||||
self.des = self.connect("destroy", self.destroy_called)
|
||||
|
||||
def destroy_called(self, *args):
|
||||
|
||||
Reference in New Issue
Block a user