From b484470e5629bcc0909a57decbddd2dd66f944e2 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sat, 20 Jun 2015 15:27:14 +0200 Subject: [PATCH] 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 file changed, 15 insertions(+), 15 deletions(-) diff --git a/shell/cc-application.c b/shell/cc-application.c index c24bdd5d6..31a6e21c0 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 */