summaryrefslogtreecommitdiffstats
path: root/lib/network/connection_manager.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-08-20 20:18:54 +0000
committerOlivier Blin <oblin@mandriva.com>2007-08-20 20:18:54 +0000
commitcea240d9c6de54d678277100cf064cead7bff971 (patch)
tree827b333cc813c402addbace3c1e0eb518a8ccbc8 /lib/network/connection_manager.pm
parentb80b01971d355cf70f0d4877906464f29a9c33c3 (diff)
downloaddrakx-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.pm5
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}));
}