diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/folderview.c | 2 | ||||
-rw-r--r-- | src/summaryview.c | 2 | ||||
-rw-r--r-- | src/syldap.c | 8 | ||||
-rw-r--r-- | src/trayicon.c | 2 |
5 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,10 @@ +2009-10-02 + + * src/trayicon.c + src/syldap.c + src/summaryview.c + src/folderview.c: added missing locks on idle callbacks. + 2009-10-01 * libsylph/imap.c: reimplemented using GThreadPool. diff --git a/src/folderview.c b/src/folderview.c index b0976750..438080fa 100644 --- a/src/folderview.c +++ b/src/folderview.c @@ -1890,7 +1890,9 @@ static gboolean folderview_focus_idle_func(gpointer data) { FolderView *folderview = (FolderView *)data; + gdk_threads_enter(); GTK_WIDGET_SET_FLAGS(folderview->treeview, GTK_CAN_FOCUS); + gdk_threads_leave(); return FALSE; } diff --git a/src/summaryview.c b/src/summaryview.c index 096869cf..af2451c8 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -5697,6 +5697,7 @@ static gboolean summary_display_msg_idle_func(gpointer data) GtkTreePath *path; GtkTreeIter iter; + gdk_threads_enter(); path = gtk_tree_row_reference_get_path(summaryview->selected); if (path) { gtk_tree_model_get_iter(GTK_TREE_MODEL(summaryview->store), @@ -5704,6 +5705,7 @@ static gboolean summary_display_msg_idle_func(gpointer data) gtk_tree_path_free(path); summary_display_msg(summaryview, &iter); } + gdk_threads_leave(); return FALSE; } diff --git a/src/syldap.c b/src/syldap.c index 036ea643..8e7bea9c 100644 --- a/src/syldap.c +++ b/src/syldap.c @@ -641,7 +641,9 @@ static gboolean syldap_display_search_results(SyldapServer *ldapServer) { /* NOTE: when this function is called the accompanying thread should * already be terminated. */ + gdk_threads_enter(); ldapServer->callBack(ldapServer); + gdk_threads_leave(); /* FIXME: match should know whether to free this SyldapServer stuff. */ g_free(ldapServer->thread); ldapServer->thread = NULL; @@ -673,11 +675,7 @@ gint syldap_read_data( SyldapServer *ldapServer ) { ldapServer->busyFlag = FALSE; if( ldapServer->callBack ) { /* make the ui thread update the search results */ - /* TODO: really necessary to call gdk_threads_XXX()??? gtk_idle_add() - * should do this - could someone check the GTK sources please? */ - gdk_threads_enter(); - ldapServer->idleId = gtk_idle_add((GtkFunction)syldap_display_search_results, ldapServer); - gdk_threads_leave(); + ldapServer->idleId = g_idle_add((GSourceFunc)syldap_display_search_results, ldapServer); } return ldapServer->retVal; diff --git a/src/trayicon.c b/src/trayicon.c index 9416141f..3d7bbb69 100644 --- a/src/trayicon.c +++ b/src/trayicon.c @@ -338,7 +338,9 @@ static gboolean trayicon_restore(gpointer data) { MainWindow *mainwin = (MainWindow *)data; + gdk_threads_enter(); mainwin->tray_icon = trayicon_create(mainwin); + gdk_threads_leave(); return FALSE; } |