Use capplet_init()
Fri Oct 24 18:28:54 2008 Søren Sandmann <sandmann@redhat.com> * sound-properties-capplet.c (main): Use capplet_init() Fri Oct 24 18:29:14 2008 Søren Sandmann <sandmann@redhat.com> * capplet-util.c: Call g_option_context_set_translation_domain on the context. svn path=/trunk/; revision=9106
This commit is contained in:
parent
2f8de6c511
commit
06a74d0ef1
5 changed files with 18 additions and 23 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Oct 24 18:29:14 2008 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* capplet-util.c: Call g_option_context_set_translation_domain on
|
||||
the context.
|
||||
|
||||
Fri Oct 24 18:22:06 2008 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* capplet-util.[ch]: Add new capplet_init() function
|
||||
|
|
|
@ -192,6 +192,10 @@ capplet_init (GOptionContext *context,
|
|||
textdomain (GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
#if GLIB_CHECK_VERSION (2, 12, 0)
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
#endif
|
||||
|
||||
if (context) {
|
||||
g_option_context_add_group (context, gtk_get_option_group (TRUE));
|
||||
|
||||
|
|
|
@ -431,8 +431,8 @@ main (int argc, char **argv)
|
|||
GladeXML *dialog;
|
||||
GtkWidget *dialog_win, *w;
|
||||
gchar *start_page = NULL;
|
||||
GError *err = NULL;
|
||||
|
||||
GOptionContext *context;
|
||||
GOptionEntry cap_options[] = {
|
||||
{"show-page", 'p', G_OPTION_FLAG_IN_MAIN,
|
||||
G_OPTION_ARG_STRING,
|
||||
|
@ -443,15 +443,9 @@ main (int argc, char **argv)
|
|||
{NULL}
|
||||
};
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
if (!gtk_init_with_args (&argc, &argv, _("- GNOME Mouse Preferences"), cap_options, GETTEXT_PACKAGE, &err)) {
|
||||
g_printerr ("%s\n", err->message);
|
||||
|
||||
return 1;
|
||||
}
|
||||
context = g_option_context_new (_("- GNOME Mouse Preferences"));
|
||||
g_option_context_add_main_entries (context, cap_options, GETTEXT_PACKAGE);
|
||||
capplet_init (context, &argc, &argv);
|
||||
|
||||
capplet_init_stock_icons ();
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
Fri Oct 24 18:28:54 2008 Søren Sandmann <sandmann@redhat.com>
|
||||
|
||||
* sound-properties-capplet.c (main): Use capplet_init()
|
||||
|
||||
2008-10-10 Bastien Nocera <hadess@hadess.net>
|
||||
|
||||
* Makefile.am:
|
||||
|
|
|
@ -1175,7 +1175,6 @@ main (int argc, char **argv)
|
|||
{
|
||||
GConfChangeSet *changeset;
|
||||
GladeXML *dialog;
|
||||
GnomeProgram *program;
|
||||
GOptionContext *context;
|
||||
gboolean apply_only = FALSE;
|
||||
gboolean get_legacy = FALSE;
|
||||
|
@ -1189,26 +1188,16 @@ main (int argc, char **argv)
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
/* Since gstreamer and gnome-vfs require threads, we
|
||||
* have to initialise threads here as the first call to glib.
|
||||
*/
|
||||
g_thread_init (NULL);
|
||||
|
||||
context = g_option_context_new (N_("- GNOME Sound Preferences"));
|
||||
#if GLIB_CHECK_VERSION (2, 12, 0)
|
||||
g_option_context_set_translation_domain (context, GETTEXT_PACKAGE);
|
||||
#endif
|
||||
g_option_context_add_main_entries (context, cap_options, GETTEXT_PACKAGE);
|
||||
g_option_context_add_group (context, gst_init_get_option_group ());
|
||||
|
||||
program = gnome_program_init ("gnome-sound-properties", VERSION,
|
||||
LIBGNOMEUI_MODULE, argc, argv,
|
||||
GNOME_PARAM_GOPTION_CONTEXT, context,
|
||||
NULL);
|
||||
capplet_init (context, &argc, &argv);
|
||||
|
||||
activate_settings_daemon ();
|
||||
|
||||
|
@ -1239,7 +1228,6 @@ main (int argc, char **argv)
|
|||
}
|
||||
|
||||
g_object_unref (gconf_client);
|
||||
g_object_unref (program);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue