diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-13 11:55:26 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-13 11:55:26 +0000 |
commit | ff094c3934f3097806178d8ab3ac65e57962b320 (patch) | |
tree | dbfcd030c3ba2835305511fefcbadc6fd04cca22 /mdkapplet | |
parent | fa852721326c2c8e445264c2cf8ed76e62cbe206 (diff) | |
download | mgaonline-ff094c3934f3097806178d8ab3ac65e57962b320.tar mgaonline-ff094c3934f3097806178d8ab3ac65e57962b320.tar.gz mgaonline-ff094c3934f3097806178d8ab3ac65e57962b320.tar.bz2 mgaonline-ff094c3934f3097806178d8ab3ac65e57962b320.tar.xz mgaonline-ff094c3934f3097806178d8ab3ac65e57962b320.zip |
on left click on applet, run MandrivaUpdate if there're updates
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -158,14 +158,11 @@ gtkadd(my $icon = Gtk2::TrayIcon->new("MdkApplet"), ); #$icon->shape_combine_mask($img, 0, 0); $eventbox->signal_connect(button_press_event => sub { - if (!$raisedwindow) { if ($_[1]->button == 1) { - if (-e $conffile) { $raisedwindow = 1; showMainWindow() } else { $raisedwindow = 0; configure() } - } - } elsif ($_[1]->button == 1) { - $applet_window->present; + installUpdates() if $state_global eq 'updates'; + } elsif ($_[1]->button == 3) { + $menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time); } - $_[1]->button == 3 && $menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time); }); my ($opt) = @ARGV; if ($opt eq '--force' || $opt eq '-f') { setAutoStart('TRUE') } |