[Xfce4-commits] [xfce/xfce4-power-manager] 56/63: Settings: Present the window when launched again

noreply at xfce.org noreply at xfce.org
Sun Mar 22 13:02:51 CET 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository xfce/xfce4-power-manager.

commit dac971a610788daeddcd5c9eae2b365abbcb2b91
Author: Eric Koegel <eric.koegel at gmail.com>
Date:   Fri Mar 20 11:21:14 2015 +0300

    Settings: Present the window when launched again
    
    When the settings app is launched after it's already shown, present
    it rather than launching a new one.
---
 settings/xfpm-settings-app.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/settings/xfpm-settings-app.c b/settings/xfpm-settings-app.c
index 050a7dc..a50f7f6 100644
--- a/settings/xfpm-settings-app.c
+++ b/settings/xfpm-settings-app.c
@@ -123,6 +123,7 @@ xfpm_settings_app_launch (GApplication *app)
     GVariant         *config;
     GVariantIter     *iter;
     gchar            *key, *value;
+    GList            *windows;
 
     gboolean has_battery;
     gboolean auth_suspend;
@@ -139,9 +140,13 @@ xfpm_settings_app_launch (GApplication *app)
 
     TRACE ("entering");
 
-    if (gtk_application_get_windows (GTK_APPLICATION (app)))
+    windows = gtk_application_get_windows (GTK_APPLICATION (app));
+
+    if (windows != NULL)
     {
-        DBG("window already opened, returning");
+        DBG("window already opened, presenting it");
+        gtk_window_present (GTK_WINDOW (windows->data));
+        gdk_notify_startup_complete ();
         return;
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list