From df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 11 Mar 2015 21:53:19 +0100 Subject: use high res icons for notifications (mga#7434) --- bin/net_applet | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/net_applet b/bin/net_applet index 1844e36..8fb00c4 100755 --- a/bin/net_applet +++ b/bin/net_applet @@ -47,7 +47,7 @@ our %wireless_networks; our %pixbufs = ( - state => { map { $_ => gtknew('Pixbuf', file => $_) } qw(connected disconnected unconfigured connecting) }, + state => { map { $_ => gtknew('Pixbuf', file => $_) } 'unconfigured', map { $_, $_ . "_big" } qw(connected disconnected connecting) }, encryption => { map { $_ => gtknew('Pixbuf', file => "encryption-$_-24"); } qw(open weak strong) }, @@ -57,11 +57,12 @@ sub get_current_network() { detect_devices::is_wireless_interface($current_interface) && find { $_->{current} } values %wireless_networks; } -sub get_state_pixbuf() { +sub get_state_pixbuf { + my ($o_big) = @_; my $wnet = $current_state eq 'connected' && get_current_network(); $wnet ? network::signal_strength::get_strength_icon($wnet) : - $pixbufs{state}{$current_state}; + $pixbufs{state}{$current_state . ($o_big ? '_big' : '')}; } sub update_tray_icon() { @@ -436,7 +437,7 @@ sub go2State { $current_state = $state_type; $notification_queue->add({ title => $old_description || $current_description || N("Network connection"), - pixbuf => network::net_applet::get_state_pixbuf(), + pixbuf => network::net_applet::get_state_pixbuf(1) || network::net_applet::get_state_pixbuf(), message => get_state_message($old_interface || $current_interface), }) if $show; $need_update = 1; -- cgit v1.2.1