diff options
Diffstat (limited to 'mgaapplet')
-rwxr-xr-x | mgaapplet | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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; |