summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-13 11:55:26 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-13 11:55:26 +0000
commitff094c3934f3097806178d8ab3ac65e57962b320 (patch)
treedbfcd030c3ba2835305511fefcbadc6fd04cca22 /mdkapplet
parentfa852721326c2c8e445264c2cf8ed76e62cbe206 (diff)
downloadmgaonline-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-xmdkapplet9
1 files changed, 3 insertions, 6 deletions
diff --git a/mdkapplet b/mdkapplet
index ec76c1ae..1a0c7234 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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') }