From 1105de688292179f5e7b890dda9f54381e00c884 Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 23 Mar 2013 15:49:41 +0000 Subject: Exit gnome-shell overview mode when clicking on notification response actions. --- mgaapplet | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mgaapplet') 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")); -- cgit v1.2.1