diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-21 03:17:55 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2013-12-21 03:30:35 +0100 |
commit | 95b9cd06f14a9817090584d72830df870c591acc (patch) | |
tree | 1c6e2ef7e33f7410e1100c377bddf6d5973e48a4 | |
parent | f8264080cac4351e87d8e0a1549e94812c3f6c0c (diff) | |
download | mgaonline-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)
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | mgaapplet | 14 |
2 files changed, 10 insertions, 5 deletions
@@ -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) @@ -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; |