diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-06 15:54:56 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-06 15:54:56 +0000 |
commit | cc5db4ab6b81d01076e65f92ce2fa98185194c7b (patch) | |
tree | ace4fd6b4e2c5d515fad07f914d347689bff6222 /lib/network/drakroam.pm | |
parent | 702d9ee2d1f26e1c5c601d19a187c0377fda9cd0 (diff) | |
download | drakx-net-cc5db4ab6b81d01076e65f92ce2fa98185194c7b.tar drakx-net-cc5db4ab6b81d01076e65f92ce2fa98185194c7b.tar.gz drakx-net-cc5db4ab6b81d01076e65f92ce2fa98185194c7b.tar.bz2 drakx-net-cc5db4ab6b81d01076e65f92ce2fa98185194c7b.tar.xz drakx-net-cc5db4ab6b81d01076e65f92ce2fa98185194c7b.zip |
show signal strength and encryption flags as tooltip for networks list
Diffstat (limited to 'lib/network/drakroam.pm')
-rwxr-xr-x | lib/network/drakroam.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm index 4bf01a6..bc6efb0 100755 --- a/lib/network/drakroam.pm +++ b/lib/network/drakroam.pm @@ -285,6 +285,17 @@ sub build_network_frame { ); $droam->{gui}{networks_list}->get_selection->set_mode('single'); $droam->{gui}{networks_list}->get_selection->signal_connect('changed' => sub { select_network($droam) }); + + $droam->{gui}{networks_list}->signal_connect('query-tooltip' => sub { + my ($widget, $x, $y, $kbd_tip, $tooltip) = @_; + my ($x, $y, $model, $path, $iter) = $widget->get_tooltip_context($x, $y, $kbd_tip) or return; + my $ap = $model->get($iter, 0); + my $network = $droam->{connection}{networks}{$ap}; + $tooltip->set_text("$network->{signal_strength}% $network->{flags}"); + $widget->set_tooltip_row($tooltip, $path); + 1; + }); + $droam->{gui}{networks_list}->set_has_tooltip(1); } sub build_drakroam_gui { |