Calls gdk_threads_enter/leave without gdk_threads_init
Fix GTK+ multi-threading. https://bugzilla.gnome.org/show_bug.cgi?id=610003
This commit is contained in:
parent
de51788c8d
commit
e34e6b4eeb
2 changed files with 6 additions and 0 deletions
|
@ -38,6 +38,8 @@ init_appearance_data (int *argc, char ***argv, GOptionContext *context)
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
|
|
||||||
g_thread_init (NULL);
|
g_thread_init (NULL);
|
||||||
|
gdk_threads_init ();
|
||||||
|
gdk_threads_enter ();
|
||||||
theme_thumbnail_factory_init (*argc, *argv);
|
theme_thumbnail_factory_init (*argc, *argv);
|
||||||
capplet_init (context, argc, argv);
|
capplet_init (context, argc, argv);
|
||||||
activate_settings_daemon ();
|
activate_settings_daemon ();
|
||||||
|
@ -207,6 +209,7 @@ main (int argc, char **argv)
|
||||||
|
|
||||||
/* start the mainloop */
|
/* start the mainloop */
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
gdk_threads_leave ();
|
||||||
|
|
||||||
/* free stuff */
|
/* free stuff */
|
||||||
g_free (data);
|
g_free (data);
|
||||||
|
|
|
@ -613,6 +613,7 @@ static void
|
||||||
transfer_done_cb (GtkWidget *dialog,
|
transfer_done_cb (GtkWidget *dialog,
|
||||||
TransferData *tdata)
|
TransferData *tdata)
|
||||||
{
|
{
|
||||||
|
gdk_threads_enter ();
|
||||||
/* XXX: path should be on the local filesystem by now? */
|
/* XXX: path should be on the local filesystem by now? */
|
||||||
|
|
||||||
if (dialog != NULL) {
|
if (dialog != NULL) {
|
||||||
|
@ -623,6 +624,8 @@ transfer_done_cb (GtkWidget *dialog,
|
||||||
|
|
||||||
g_free (tdata->path);
|
g_free (tdata->path);
|
||||||
g_free (tdata);
|
g_free (tdata);
|
||||||
|
|
||||||
|
gdk_threads_leave ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue