summaryrefslogtreecommitdiffstats
path: root/mgaapplet
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2013-03-23 15:49:41 +0000
committerColin Guthrie <colin@mageia.org>2013-03-23 15:49:41 +0000
commit1105de688292179f5e7b890dda9f54381e00c884 (patch)
tree618a5ab0f8294677e1b1dbcbb76e9bba0dac6cf1 /mgaapplet
parent3e07806c467bda702d6879d46a4dbe8c3cd02ac0 (diff)
downloadmgaonline-1105de688292179f5e7b890dda9f54381e00c884.tar
mgaonline-1105de688292179f5e7b890dda9f54381e00c884.tar.gz
mgaonline-1105de688292179f5e7b890dda9f54381e00c884.tar.bz2
mgaonline-1105de688292179f5e7b890dda9f54381e00c884.tar.xz
mgaonline-1105de688292179f5e7b890dda9f54381e00c884.zip
Exit gnome-shell overview mode when clicking on notification response actions.
Diffstat (limited to 'mgaapplet')
-rwxr-xr-xmgaapplet8
1 files changed, 8 insertions, 0 deletions
diff --git a/mgaapplet b/mgaapplet
index 4dc02988..e1df0fdd 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -37,6 +37,7 @@ use lib qw(/usr/lib/libDrakX/drakfirsttime);
use mgaonline;
use mgaapplet_gui;
use Gtk2::Notify '-init', 'mgaapplet';
+use Net::DBus qw(:typing);
use Rpmdrake::open_db;
if (!find { $_ eq '--auto-update' } @ARGV) {
@@ -263,6 +264,9 @@ Gtk2->main;
ugtk2::exit(0);
+sub gnome_shell_exit_overview() {
+ eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.freedesktop.DBus.Properties')->Set('org.gnome.Shell', 'OverviewActive', dbus_boolean(0)); };
+}
sub is_there_a_new_distributions() {
# sanity check for cooker/cauldron:
@@ -518,6 +522,7 @@ sub no_more_supported_choice() {
my $no_more_supported_wip;
sub no_more_supported() {
return if $mdv_update_pid || $no_more_supported_wip;
+ gnome_shell_exit_overview();
$no_more_supported_wip = 1;
my $choice = no_more_supported_choice();
if ($choice eq 'upgrade') {
@@ -566,6 +571,7 @@ sub really_confirm_upgrade() {
sub upgrade() {
return if $mdv_update_pid;
+ gnome_shell_exit_overview();
return if !confirm_upgrade();
real_upgrade();
}
@@ -580,12 +586,14 @@ sub real_upgrade() {
sub add_media() {
return if $media_manager_pid;
log::explanations("Launching 'Software Media Manager'");
+ gnome_shell_exit_overview();
$media_manager_pid = fork_exec('/usr/sbin/edit-urpm-sources.pl', '--no-splash', if_($root, "--urpmi-root=$root"));
}
sub installUpdates() {
return if $mdv_update_pid;
log::explanations(N_("Launching MageiaUpdate\n"));
+ gnome_shell_exit_overview();
my $program = find { -x "/usr/bin/$_" } qw(MageiaUpdate MandrivaUpdate);
$mdv_update_pid = fork_exec($program, '--no-media-update', '--no-confirmation', '--no-splash',
if_($root, "--urpmi-root=$root"));