diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-07 17:00:17 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2006-04-07 17:00:17 +0000 |
commit | 68e5298973103ee5e7b853e69c099ba9f1c14518 (patch) | |
tree | 5873e4df749b401dbc70671e9625618be9380e16 /mdkapplet | |
parent | 7ef39f8057545b80f05582ec4e158bfbd13a540a (diff) | |
download | mgaonline-68e5298973103ee5e7b853e69c099ba9f1c14518.tar mgaonline-68e5298973103ee5e7b853e69c099ba9f1c14518.tar.gz mgaonline-68e5298973103ee5e7b853e69c099ba9f1c14518.tar.bz2 mgaonline-68e5298973103ee5e7b853e69c099ba9f1c14518.tar.xz mgaonline-68e5298973103ee5e7b853e69c099ba9f1c14518.zip |
raise the window when it's already displayed and the user clicks again on the systray icon (#21906)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -58,6 +58,7 @@ ugtk2::add_icon_path("/usr/share/mdkonline/pixmaps/"); my $online_site = "https://www.mandrivaonline.com/"; my ($menu, $timeout, $eventbox, $img, $mLog, $buffer, $textview, $wlog, $textvw, $state_global, $MW_vbox); my ($raisedwindow, $debug, $conf_launched) = (0, 0, 0); +my $applet_window; my $conffile = '/etc/sysconfig/mdkonline'; @@ -156,7 +157,10 @@ $eventbox->signal_connect(button_press_event => sub { if ($_[1]->button == 1) { if (-e $conffile) { $raisedwindow = 1; showMainWindow() } else { $raisedwindow = 0; configure() } } - } + } else { + $applet_window->hide; + $applet_window->show; + } $_[1]->button == 3 && $menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time); }); my ($opt) = @ARGV; @@ -211,7 +215,7 @@ sub refresh_gui { } sub showMainWindow() { - my $w = Gtk2::Window->new('toplevel'); + my $w = $applet_window = Gtk2::Window->new('toplevel'); $::main_window = $w; $w->set_title(N("Mandriva Linux Updates Applet")); $w->signal_connect(delete_event => sub { $w->destroy; $raisedwindow = 0 }); |