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
This commit is contained in:
parent
5c4872d77c
commit
beea258891
1 changed files with 9 additions and 0 deletions
|
@ -146,6 +146,15 @@ cc_application_command_line (GApplication *application,
|
||||||
cc_panel_loader_add_option_groups (context, flags_builder);
|
cc_panel_loader_add_option_groups (context, flags_builder);
|
||||||
g_option_context_set_help_enabled (context, FALSE);
|
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)
|
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"),
|
g_print (_("%s\nRun '%s --help' to see a full list of available command line options.\n"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue