summaryrefslogtreecommitdiffstats
path: root/mgaapplet
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-12-21 03:17:55 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-12-21 03:30:35 +0100
commit95b9cd06f14a9817090584d72830df870c591acc (patch)
tree1c6e2ef7e33f7410e1100c377bddf6d5973e48a4 /mgaapplet
parentf8264080cac4351e87d8e0a1549e94812c3f6c0c (diff)
downloadmgaonline-95b9cd06f14a9817090584d72830df870c591acc.tar
mgaonline-95b9cd06f14a9817090584d72830df870c591acc.tar.gz
mgaonline-95b9cd06f14a9817090584d72830df870c591acc.tar.bz2
mgaonline-95b9cd06f14a9817090584d72830df870c591acc.tar.xz
mgaonline-95b9cd06f14a9817090584d72830df870c591acc.zip
fix doing nothing when clicking on notifications buttons (mga#12041)
Diffstat (limited to 'mgaapplet')
-rwxr-xr-xmgaapplet14
1 files changed, 9 insertions, 5 deletions
diff --git a/mgaapplet b/mgaapplet
index ede55a51..ad66294d 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -669,25 +669,29 @@ sub setState {
my $bubble = Gtk3::Notify::Notification->new(N("Warning"), formatAlaTeX(translate($state{$state}{tt}[0])) . "\n",
'/usr/share/icons/mgaonline.png');
if ($state eq 'new_distribution') {
- $bubble->add_action('clicked', N("More Information"), \&upgrade);
+ $bubble->add_action('upgrade', N("More Information2"), sub { upgrade(); Gtk3->main_quit });
+ $bubble->signal_connect('closed' => \&Gtk3::main_quit);
if ($sub_state eq 'updates') {
push @arr, 'update';
}
} elsif ($state eq 'no_more_supported') {
- $bubble->add_action('clicked', N("More Information"), \&no_more_supported);
+ $bubble->add_action('no_more', N("More Information"), sub { no_more_supported(); Gtk3->main_quit });
+ $bubble->signal_connect('closed' => \&Gtk3::main_quit);
if ($sub_state eq 'updates') {
push @arr, 'update';
}
} elsif ($state eq 'updates') {
unshift @arr, 'upgrade_distro' if $new_distro;
- $bubble->add_action('clicked', N("Install updates"), \&installUpdates);
+ $bubble->add_action('updates', N("Install updates"), sub { installUpdates(); Gtk3->main_quit });
+ $bubble->signal_connect('closed' => \&Gtk3::main_quit);
} elsif (member($state, qw(no_enabled_medium no_update_medium))) {
- $bubble->add_action('clicked', N("Add media"), \&add_media);
+ $bubble->add_action('add_med', N("Add media"), sub { add_media(); Gtk3->main_quit });
+ $bubble->signal_connect('closed' => \&Gtk3::main_quit);
}
$bubble->set_urgency($state{$state}{urgency}) if $state{$state}{urgency};
$bubble->set_timeout(5000);
- eval { $bubble->show };
+ eval { $bubble->show; Gtk3->main };
}
my $menu = Gtk3::Menu->new;