Reverted again the gdk_threads_enter/leave sentences:
[modest] / src / widgets / modest-header-view.c
index ed2d8ec..acf8f72 100644 (file)
@@ -1397,6 +1397,8 @@ on_focus_in (GtkWidget     *self,
 static void
 idle_notify_headers_count_changed_destroy (gpointer data)
 {
+       gdk_threads_enter ();
+
        HeadersCountChangedHelper *helper = NULL;
 
        g_return_if_fail (data != NULL);
@@ -1404,11 +1406,15 @@ idle_notify_headers_count_changed_destroy (gpointer data)
 
        g_object_unref (helper->change);
        g_slice_free (HeadersCountChangedHelper, helper);
+
+       gdk_threads_leave ();
 }
 
 static gboolean
 idle_notify_headers_count_changed (gpointer data)
 {
+       gdk_threads_enter ();
+
        TnyFolder *folder = NULL;
        ModestHeaderViewPrivate *priv = NULL;
        HeadersCountChangedHelper *helper = NULL;
@@ -1432,6 +1438,8 @@ idle_notify_headers_count_changed (gpointer data)
            
        g_mutex_unlock (priv->observers_lock);
 
+       gdk_threads_leave ();
+
        return FALSE;
 }