diff options
author | Olivier Blin <oblin@mandriva.com> | 2007-08-20 20:18:54 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2007-08-20 20:18:54 +0000 |
commit | cea240d9c6de54d678277100cf064cead7bff971 (patch) | |
tree | 827b333cc813c402addbace3c1e0eb518a8ccbc8 /lib/network/connection_manager.pm | |
parent | b80b01971d355cf70f0d4877906464f29a9c33c3 (diff) | |
download | drakx-net-cea240d9c6de54d678277100cf064cead7bff971.tar drakx-net-cea240d9c6de54d678277100cf064cead7bff971.tar.gz drakx-net-cea240d9c6de54d678277100cf064cead7bff971.tar.bz2 drakx-net-cea240d9c6de54d678277100cf064cead7bff971.tar.xz drakx-net-cea240d9c6de54d678277100cf064cead7bff971.zip |
modify image (if any) for toggle button when toggled
Diffstat (limited to 'lib/network/connection_manager.pm')
-rw-r--r-- | lib/network/connection_manager.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm index 58c4e6a..427744d 100644 --- a/lib/network/connection_manager.pm +++ b/lib/network/connection_manager.pm @@ -256,7 +256,10 @@ sub update_on_status_change { my ($cmanager) = @_; if ($cmanager->{gui}{buttons}{connect_toggle}) { - $cmanager->{gui}{buttons}{connect_toggle}->set_label(toggle_would_disconnect($cmanager) ? N("Disconnect") : N("Connect")); + my $disconnect = toggle_would_disconnect($cmanager); + $cmanager->{gui}{buttons}{connect_toggle}->set_label($disconnect ? N("Disconnect") : N("Connect")); + gtkset($cmanager->{gui}{buttons}{connect_toggle}, image => gtknew('Image', file => $disconnect ? 'stop-16' : 'activate-16')) + if $cmanager->{gui}{buttons}{connect_toggle}->get_image; #- always allow to disconnect if connected $cmanager->{gui}{buttons}{connect_toggle}->set_sensitive($cmanager->{connection} && ($cmanager->{connection}->get_status || $cmanager->{connection}{network})); } |