[gnome-control-center] Handle repeated commandline parsing properly
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Handle repeated commandline parsing properly
- Date: Sat, 18 May 2013 22:06:35 +0000 (UTC)
commit beea258891ac433e754461ce48d1283c0e3194b5
Author: Matthias Clasen <mclasen redhat com>
Date: Fri May 17 21:34:50 2013 -0400
Handle repeated commandline parsing properly
The control-center may call g_option_context_parse repeatedly,
so we need to reset the static variables used to hold the parsing
results, otherwise things like the search string may leak from
a previous parsing run.
https://bugzilla.gnome.org/show_bug.cgi?id=700362
shell/cc-application.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/shell/cc-application.c b/shell/cc-application.c
index e7de6f7..7a21086 100644
--- a/shell/cc-application.c
+++ b/shell/cc-application.c
@@ -146,6 +146,15 @@ cc_application_command_line (GApplication *application,
cc_panel_loader_add_option_groups (context, flags_builder);
g_option_context_set_help_enabled (context, FALSE);
+ start_panels = NULL;
+ search_str = NULL;
+ show_overview = FALSE;
+ verbose = FALSE;
+ show_help = FALSE;
+ show_help_gtk = FALSE;
+ show_help_all = FALSE;
+ list_panels = FALSE;
+
if (g_option_context_parse (context, &argc, &argv, &error) == FALSE)
{
g_print (_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]