From 363aef1952cc3fffaa6c7d49d3c793c77a7dc70c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 24 Oct 2011 09:42:48 +0200 Subject: [PATCH] Call g_thread_init() conditionally [Alexandre Rostovtsev : backport to 2.32] --- calendar/gui/alarm-notify/notify-main.c | 2 ++ capplet/anjal-settings-main.c | 2 ++ capplet/settings/mail-guess-servers.c | 2 ++ plugins/backup-restore/backup.c | 2 ++ shell/main.c | 2 ++ 5 files changed, 10 insertions(+), 0 deletions(-) diff --git a/calendar/gui/alarm-notify/notify-main.c b/calendar/gui/alarm-notify/notify-main.c index 6104610..3ee8e9c 100644 --- a/calendar/gui/alarm-notify/notify-main.c +++ b/calendar/gui/alarm-notify/notify-main.c @@ -87,7 +87,9 @@ main (gint argc, gchar **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); + #if !GLIB_CHECK_VERSION(2,31,0) g_thread_init (NULL); + #endif #ifdef G_OS_WIN32 path = g_build_path (";", _e_get_bindir (), g_getenv ("PATH"), NULL); diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c index 7b6e252..f338863 100644 --- a/capplet/anjal-settings-main.c +++ b/capplet/anjal-settings-main.c @@ -247,8 +247,10 @@ main (gint argc, gchar *argv[]) g_error_free(error); } + #if !GLIB_CHECK_VERSION(2,31,0) if (!g_thread_get_initialized ()) g_thread_init (NULL); + #endif client = gconf_client_get_default(); diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c index 69e0d8d..bb2fb9d 100644 --- a/capplet/settings/mail-guess-servers.c +++ b/capplet/settings/mail-guess-servers.c @@ -325,7 +325,9 @@ gint main (gint argc, gchar **argv) { EmailProvider *provider; + #if !GLIB_CHECK_VERSION(2,31,0) g_thread_init (NULL); + #endif g_type_init (); provider = g_new0(EmailProvider, 1); diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c index e90c73d..f23c562 100644 --- a/plugins/backup-restore/backup.c +++ b/plugins/backup-restore/backup.c @@ -663,7 +663,9 @@ main (gint argc, gchar **argv) bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); + #if !GLIB_CHECK_VERSION(2,31,0) g_thread_init (NULL); + #endif gtk_init_with_args ( &argc, &argv, NULL, options, (gchar *) GETTEXT_PACKAGE, &error); diff --git a/shell/main.c b/shell/main.c index 3ab9d7e..788c91b 100644 --- a/shell/main.c +++ b/shell/main.c @@ -520,8 +520,10 @@ main (gint argc, gchar **argv) } g_type_init (); + #if !GLIB_CHECK_VERSION(2,31,0) if (!g_thread_get_initialized ()) g_thread_init (NULL); + #endif #ifdef HAVE_ICAL_UNKNOWN_TOKEN_HANDLING ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN); -- 1.7.8.5