[evolution] Call g_thread_init() conditionally
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Call g_thread_init() conditionally
- Date: Mon, 24 Oct 2011 07:43:03 +0000 (UTC)
commit 8c67e84f9bf1803108f7a004513e37c6ef22d41f
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 24 09:42:48 2011 +0200
Call g_thread_init() conditionally
capplet/anjal-settings-main.c | 2 ++
capplet/settings/mail-guess-servers.c | 2 ++
shell/main.c | 2 ++
3 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/capplet/anjal-settings-main.c b/capplet/anjal-settings-main.c
index 99e0b4a..91e3690 100644
--- a/capplet/anjal-settings-main.c
+++ b/capplet/anjal-settings-main.c
@@ -167,8 +167,10 @@ main (gint argc,
if (!gtk_init_with_args (&argc, &argv, NULL, entries, NULL, &error))
g_error ("%s", error->message);
+ #if !GLIB_CHECK_VERSION(2,31,0)
if (!g_thread_get_initialized ())
g_thread_init (NULL);
+ #endif
e_passwords_init ();
categories_icon_theme_hack ();
diff --git a/capplet/settings/mail-guess-servers.c b/capplet/settings/mail-guess-servers.c
index 0b14494..0b15271 100644
--- a/capplet/settings/mail-guess-servers.c
+++ b/capplet/settings/mail-guess-servers.c
@@ -343,7 +343,9 @@ 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/shell/main.c b/shell/main.c
index bb056e3..5b76a2e 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -492,8 +492,10 @@ main (gint argc,
textdomain (GETTEXT_PACKAGE);
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
if (!g_thread_get_initialized ())
g_thread_init (NULL);
+ #endif
/* do not require Gtk+ for --force-shutdown */
if (argc == 2 && argv[1] && g_str_equal (argv[1], "--force-shutdown")) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]