diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-22 03:51:11 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-22 03:51:11 +0000 |
commit | 5197633882c4b3887851ef179a217f67332dee5d (patch) | |
tree | c0d58be195d9a3569650c0a07859c9a14238758a | |
parent | ea7337c7f59ef70871c61e4048744f0f704e168c (diff) | |
download | drakx-5197633882c4b3887851ef179a217f67332dee5d.tar drakx-5197633882c4b3887851ef179a217f67332dee5d.tar.gz drakx-5197633882c4b3887851ef179a217f67332dee5d.tar.bz2 drakx-5197633882c4b3887851ef179a217f67332dee5d.tar.xz drakx-5197633882c4b3887851ef179a217f67332dee5d.zip |
select a wireless network for association on click
-rw-r--r-- | perl-install/standalone/net_applet | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet index 4d9e901a9..06525e7fe 100644 --- a/perl-install/standalone/net_applet +++ b/perl-install/standalone/net_applet @@ -155,13 +155,26 @@ sub checkWireless() { 1, gtkset_alignment($net->{ssid_label} = Gtk2::Label->new, 0, 0), 0, $net->{keyring_image} = Gtk2::Image->new_from_pixbuf($pixbufs{keyring}), 0, $net->{level_image} = Gtk2::Image->new)); + $net->{activate} = $net->{menuitem}->signal_connect('activate' => sub { + if (exists $net->{id}) { + eval { $monitor->select_network($net->{id}) }; + if ($@) { + my $error = $@; + err_dialog(N("Error"), N("Unable to select wireless network: %s", $error)); + } + } + checkNetworkForce(); + }); undef $current_state; #- force menu redraw } $net->{ssid_label}->set_text($net->{ssid} || "[$_]"); $net->{keyring_image}->visible(defined $net->{flags}); my $approx_level = 20 + int(min($net->{signal_level}, 80)/20)*20; $net->{level_image}->set_from_pixbuf($pixbufs{link_level}{$approx_level}); + + $net->{menuitem}->signal_handler_block($net->{activate}); $net->{menuitem}->set_active($net->{current}); + $net->{menuitem}->signal_handler_unblock($net->{activate}); } $wireless_networks{$_}{menuitem}->visible(exists $networks->{$_}) foreach keys %wireless_networks; } |