From 9975a0cc644da92188a67a6264e5016489c96d58 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 18 Mar 2007 14:25:53 +0000 Subject: [PATCH] Initialise threads early, and fix option context translation. Bug #416239. 2007-03-18 Christian Persch * sound-properties-capplet.c: (create_dialog), (main): Initialise threads early, and fix option context translation. Bug #416239. svn path=/trunk/; revision=7388 --- capplets/sound/ChangeLog | 5 +++++ capplets/sound/sound-properties-capplet.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/capplets/sound/ChangeLog b/capplets/sound/ChangeLog index e345e2b35..33c7db794 100644 --- a/capplets/sound/ChangeLog +++ b/capplets/sound/ChangeLog @@ -1,3 +1,8 @@ +2007-03-18 Christian Persch + + * sound-properties-capplet.c: (create_dialog), (main): Initialise + threads early, and fix option context translation. Bug #416239. + 2007-02-10 Jens Granseuer Patch by: Patrick Wade diff --git a/capplets/sound/sound-properties-capplet.c b/capplets/sound/sound-properties-capplet.c index 5bfb9bbfd..03aef8bce 100644 --- a/capplets/sound/sound-properties-capplet.c +++ b/capplets/sound/sound-properties-capplet.c @@ -172,7 +172,7 @@ create_dialog (void) view = sound_view_new (props); box = glade_xml_get_widget (dialog, "events_vbox"); gtk_box_pack_start (GTK_BOX (box), view, TRUE, TRUE, 0); - gtk_widget_show_all (view); + gtk_widget_show (view); g_signal_connect_swapped (G_OBJECT (widget), "destroy", (GCallback) gtk_object_destroy, props); @@ -1019,7 +1019,15 @@ main (int argc, char **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); - context = g_option_context_new (_("- GNOME Sound Preferences")); + /* 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 ());