[gnome-control-center] Calls gdk_threads_enter/leave without gdk_threads_init
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] Calls gdk_threads_enter/leave without gdk_threads_init
- Date: Wed, 10 Mar 2010 12:25:27 +0000 (UTC)
commit e34e6b4eebbb957107e88334faef2ed8a02d5eea
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Mar 10 12:18:52 2010 +0000
Calls gdk_threads_enter/leave without gdk_threads_init
Fix GTK+ multi-threading.
https://bugzilla.gnome.org/show_bug.cgi?id=610003
capplets/appearance/appearance-main.c | 3 +++
capplets/appearance/theme-installer.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/capplets/appearance/appearance-main.c b/capplets/appearance/appearance-main.c
index e02a50a..98055b4 100644
--- a/capplets/appearance/appearance-main.c
+++ b/capplets/appearance/appearance-main.c
@@ -38,6 +38,8 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context)
GError *err = NULL;
g_thread_init (NULL);
+ gdk_threads_init ();
+ gdk_threads_enter ();
theme_thumbnail_factory_init (*argc, *argv);
capplet_init (context, argc, argv);
activate_settings_daemon ();
@@ -207,6 +209,7 @@ main (int argc, char **argv)
/* start the mainloop */
gtk_main ();
+ gdk_threads_leave ();
/* free stuff */
g_free (data);
diff --git a/capplets/appearance/theme-installer.c b/capplets/appearance/theme-installer.c
index 6a90c16..d9df443 100644
--- a/capplets/appearance/theme-installer.c
+++ b/capplets/appearance/theme-installer.c
@@ -613,6 +613,7 @@ static void
transfer_done_cb (GtkWidget *dialog,
TransferData *tdata)
{
+ gdk_threads_enter ();
/* XXX: path should be on the local filesystem by now? */
if (dialog != NULL) {
@@ -623,6 +624,8 @@ transfer_done_cb (GtkWidget *dialog,
g_free (tdata->path);
g_free (tdata);
+
+ gdk_threads_leave ();
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]