2007-01-06  Lucas Rocha <lucasr.at.mundo@gmail.com>

	Fixes #336286

	* sound-properties-capplet.c (main): switched from popt to GOptionContext.

svn path=/trunk/; revision=7058
This commit is contained in:
Lucas Rocha 2007-01-06 18:56:09 +00:00 committed by Rodrigo Moya
parent 83c0670baa
commit d0ea4adb94
2 changed files with 17 additions and 7 deletions

View file

@ -1,3 +1,9 @@
2007-01-06 Lucas Rocha <lucasr.at.mundo@gmail.com>
Fixes #336286
* sound-properties-capplet.c (main): switched from popt to GOptionContext.
2007-01-07 Jan Arne Petersen <jap@gnome.org>
* sound-properties-capplet.c: (setup_hal_devices): do proper

View file

@ -770,30 +770,34 @@ main (int argc, char **argv)
{
GConfChangeSet *changeset;
GladeXML *dialog = NULL;
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 (compatibility only; now handled by daemon)"), 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 (compatibility only; now handled by daemon)"), 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);
gst_init (&argc, &argv);
context = g_option_context_new (_("- GNOME Sound Preferences"));
g_option_context_add_main_entries (context, cap_options, GETTEXT_PACKAGE);
gnome_program_init ("gnome-sound-properties", VERSION,
LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_POPT_TABLE, cap_options,
GNOME_PARAM_GOPTION_CONTEXT, context,
NULL);
gst_init (&argc, &argv);
activate_settings_daemon ();
gconf_client = gconf_client_get_default ();