shell: Don't pass invalid option flags

G_OPTION_FLAG_OPTIONAL_ARG is only valid for callback options.

Bug #641290.
This commit is contained in:
Christian Persch 2011-02-02 20:35:54 +01:00
parent faa5deccea
commit ace6fb9309

View file

@ -44,8 +44,8 @@ static gboolean show_overview = FALSE;
const GOptionEntry all_options[] = {
{ "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, option_version_cb, NULL, NULL },
{ "overview", 'o', G_OPTION_FLAG_NO_ARG | G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_NONE, &show_overview, N_("Show the overview"), NULL },
{ G_OPTION_REMAINING, '\0', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_FILENAME_ARRAY, &start_panels, N_("Panel to display"), NULL },
{ "overview", 'o', 0, G_OPTION_ARG_NONE, &show_overview, N_("Show the overview"), NULL },
{ G_OPTION_REMAINING, '\0', 0, G_OPTION_ARG_FILENAME_ARRAY, &start_panels, N_("Panel to display"), NULL },
{ NULL } /* end the list */
};