summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rwxr-xr-xmgaapplet14
2 files changed, 10 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 4e4f72d0..de1db92f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,4 @@
+- fix doing nothing when clicking on notifications buttons (mga#12041)
- split mgaapplet-update-checker
(prevents segfault due to mixing glib threads with secular forks)
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;