[gnome-control-center] shell: Handle --list from the local instance



commit b484470e5629bcc0909a57decbddd2dd66f944e2
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Sat Jun 20 15:27:14 2015 +0200

    shell: Handle --list from the local instance
    
    This is an help-like parameter, so we want its output to show up in the
    terminal from which gnome-control-center was just started, not from the
    terminal from which the main gnome-control-center instance was started.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=751597

 shell/cc-application.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/shell/cc-application.c b/shell/cc-application.c
index c24bdd5..31a6e21 100644
--- a/shell/cc-application.c
+++ b/shell/cc-application.c
@@ -112,6 +112,21 @@ launch_panel_activated (GSimpleAction *action,
 static gint
 cc_application_handle_local_options (GApplication *application, GVariantDict *options)
 {
+  if (g_variant_dict_contains (options, "list"))
+    {
+      GList *panels, *l;
+
+      panels = cc_panel_loader_get_panels ();
+
+      g_print ("%s\n", _("Available panels:"));
+      for (l = panels; l != NULL; l = l->next)
+        g_print ("\t%s\n", (char *) l->data);
+
+      g_list_free (panels);
+
+      return 0;
+    }
+
   return -1;
 }
 
@@ -131,21 +146,6 @@ cc_application_command_line (GApplication *application,
   argv = g_application_command_line_get_arguments (command_line, &argc);
   options = g_application_command_line_get_options_dict (command_line);
 
-  if (g_variant_dict_contains (options, "list"))
-    {
-      GList *panels, *l;
-
-      panels = cc_panel_loader_get_panels ();
-
-      g_print ("%s\n", _("Available panels:"));
-      for (l = panels; l != NULL; l = l->next)
-        g_print ("\t%s\n", (char *) l->data);
-
-      g_list_free (panels);
-
-      return 0;
-    }
-
 #ifdef HAVE_CHEESE
   cheese_gtk_init (&argc, &argv);
 #endif /* HAVE_CHEESE */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]