summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-03-11 21:53:19 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-03-11 22:00:12 +0100
commitdf2a9423ef5fbcd1e397dcb7296b4749c06a9b8c (patch)
treebbda964d87dca46f1e5d37eecccb4acf2afcfed2 /bin
parent7d2e1e49940927d9cac51868bec55b643fdf0cc7 (diff)
downloaddrakx-net-df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c.tar
drakx-net-df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c.tar.gz
drakx-net-df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c.tar.bz2
drakx-net-df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c.tar.xz
drakx-net-df2a9423ef5fbcd1e397dcb7296b4749c06a9b8c.zip
use high res icons for notifications (mga#7434)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/net_applet9
1 files changed, 5 insertions, 4 deletions
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;