Skip to content
Snippets Groups Projects
Commit dac971a6 authored by Eric Koegel's avatar Eric Koegel
Browse files

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.
parent 89aa61c3
No related branches found
No related tags found
No related merge requests found
...@@ -123,6 +123,7 @@ xfpm_settings_app_launch (GApplication *app) ...@@ -123,6 +123,7 @@ xfpm_settings_app_launch (GApplication *app)
GVariant *config; GVariant *config;
GVariantIter *iter; GVariantIter *iter;
gchar *key, *value; gchar *key, *value;
GList *windows;
gboolean has_battery; gboolean has_battery;
gboolean auth_suspend; gboolean auth_suspend;
...@@ -139,9 +140,13 @@ xfpm_settings_app_launch (GApplication *app) ...@@ -139,9 +140,13 @@ xfpm_settings_app_launch (GApplication *app)
TRACE ("entering"); 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; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment