From cbedf400e93dd3526607df4aedd3e623a54199d3 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Fri, 12 Dec 2008 15:49:38 +0000 Subject: gtk_init and g_thread_init shouldn't be called by libraries. Let applications do it. svn path=/trunk/; revision=1971 --- src/empathy-logs.c | 4 +++- src/empathy.c | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/empathy-logs.c b/src/empathy-logs.c index f805f9094..502be67d7 100644 --- a/src/empathy-logs.c +++ b/src/empathy-logs.c @@ -41,7 +41,9 @@ main (int argc, char *argv[]) { GtkWidget *window; - empathy_gtk_init (&argc, &argv); + g_thread_init (NULL); + gtk_init (&argc, &argv); + empathy_gtk_init (); g_set_application_name (PACKAGE_NAME); gtk_window_set_default_icon_name ("empathy"); diff --git a/src/empathy.c b/src/empathy.c index 1e506ba6e..815b2b487 100644 --- a/src/empathy.c +++ b/src/empathy.c @@ -401,19 +401,21 @@ main (int argc, char *argv[]) { NULL } }; - startup_timestamp = get_startup_timestamp (); - - if (!empathy_gtk_init_with_args (&argc, &argv, - _("- Empathy Instant Messenger"), - options, GETTEXT_PACKAGE, &error)) { + /* Init */ + g_thread_init (NULL); + if (!gtk_init_with_args (&argc, &argv, + _("- Empathy Instant Messenger"), + options, GETTEXT_PACKAGE, &error)) { g_warning ("Error in empathy init: %s", error->message); return EXIT_FAILURE; } + empathy_gtk_init (); g_set_application_name (PACKAGE_NAME); gtk_window_set_default_icon_name ("empathy"); textdomain (GETTEXT_PACKAGE); /* Setting up the bacon connection */ + startup_timestamp = get_startup_timestamp (); connection = bacon_message_connection_new ("empathy"); if (connection != NULL) { if (!bacon_message_connection_get_is_server (connection)) { -- cgit v1.2.3