summaryrefslogtreecommitdiffstats
path: root/lib/network/connection_manager.pm
diff options
context:
space:
mode:
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}));
}