From 0563e5f58e5815bbd3e6e57e0e6a8835ac23ef62 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 26 Sep 2008 14:41:14 +0000 Subject: set status icon's icon once forever (no need to set again the same image over & over) git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@246735 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- draksnapshot-applet | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'draksnapshot-applet') diff --git a/draksnapshot-applet b/draksnapshot-applet index 2c28075..f963bc2 100755 --- a/draksnapshot-applet +++ b/draksnapshot-applet @@ -83,6 +83,7 @@ $icon->signal_connect(popup_menu => sub { $menu and $menu->popup(undef, undef, undef, undef, $button, $time); }); $icon->signal_connect(activate => \&configure); +$icon->set_from_pixbuf(gtkcreate_pixbuf('draksnapshot')); my $hal_dn = 'org.freedesktop.Hal'; @@ -214,11 +215,6 @@ sub setState { my ($state_type) = @_; my $checkme; my $arr = $state{$state_type}{menu}; - state $pixbuf; - if (!$pixbuf) { - $pixbuf = gtkcreate_pixbuf('draksnapshot'); - $icon->set_from_pixbuf($pixbuf); - } $icon->set_tooltip(formatAlaTeX(translate($state{$state_type}{tt}[0]))); $icon->set_visible($state_type ne 'okay'); -- cgit v1.2.1