From 64a73e528866c533bffe844bf45274347dfc0df5 Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Sat, 6 Jan 2007 18:51:42 +0000 Subject: [PATCH] Fixes #336286 2007-01-06 Lucas Rocha Fixes #336286 * capplet-util.c (capplet_init): switched from popt to GOptionContext. svn path=/trunk/; revision=7055 --- capplets/common/ChangeLog | 6 ++++++ capplets/common/capplet-util.c | 16 ++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog index a85364141..dd666a6dd 100644 --- a/capplets/common/ChangeLog +++ b/capplets/common/ChangeLog @@ -1,3 +1,9 @@ +2007-01-06 Lucas Rocha + + Fixes #336286 + + * capplet-util.c (capplet_init): switched from popt to GOptionContext. + 2007-01-05 Christian Persch Fixes #393117 diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c index 362d617d7..32b0c0e5c 100644 --- a/capplets/common/capplet-util.c +++ b/capplets/common/capplet-util.c @@ -231,25 +231,29 @@ capplet_init (int argc, { gchar *factory_iid; BonoboGenericFactory *factory; + GOptionContext *context; static gboolean apply_only; static gboolean get_legacy; - static struct poptOption cap_options[] = { - { "apply", '\0', POPT_ARG_NONE, &apply_only, 0, + static GOptionEntry cap_options[] = { + { "apply", 0, 0, G_OPTION_ARG_NONE, &apply_only, N_("Just apply settings and quit"), NULL }, - { "init-session-settings", '\0', POPT_ARG_NONE, &apply_only, 0, + { "init-session-settings", 0, 0, G_OPTION_ARG_NONE, &apply_only, N_("Just apply settings and quit"), NULL }, - { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0, + { "get-legacy", 0, 0, G_OPTION_ARG_NONE, &get_legacy, N_("Retrieve and store legacy settings"), NULL }, - { NULL, '\0', 0, NULL, 0, NULL, NULL } + { NULL } }; bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); + context = g_option_context_new (NULL); + g_option_context_add_main_entries (context, cap_options, GETTEXT_PACKAGE); + gnome_program_init (argv[0], VERSION, LIBGNOMEUI_MODULE, argc, argv, - GNOME_PARAM_POPT_TABLE, cap_options, + GNOME_PARAM_GOPTION_CONTEXT, context, NULL); if (!bonobo_init (&argc, argv))