* Added several gdk_threads_enter/leave stuff in the callbacks of the timeouts becau...
authorSergio Villar Senin <svillar@igalia.com>
Mon, 12 Nov 2007 15:49:49 +0000 (15:49 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 12 Nov 2007 15:49:49 +0000 (15:49 +0000)
pmo-trunk-r3711

src/maemo/modest-address-book.c
src/maemo/modest-main-window.c
src/maemo/modest-msg-view-window.c
src/widgets/modest-folder-view.c
src/widgets/modest-gtkhtml-msg-view.c

index 711dd0f..8fe6536 100644 (file)
@@ -633,9 +633,14 @@ show_check_names_banner (gpointer data)
 {
        GtkWidget **banner = (GtkWidget **) data;
 
+       /* We're outside the main lock */
+       gdk_threads_enter ();
+
        *banner = hildon_banner_show_animation (NULL, NULL, _("mail_ib_checking_names"));
        g_object_ref (G_OBJECT (*banner));
 
+       gdk_threads_leave ();
+
        return FALSE;
 }
 
index 75f0658..1e2090b 100644 (file)
@@ -432,11 +432,15 @@ restore_paned_timeout_handler (gpointer *data)
        ModestMainWindowPrivate *priv = MODEST_MAIN_WINDOW_GET_PRIVATE (main_window);
        ModestConf *conf;
 
+       /* Timeouts are outside the main lock */
+       gdk_threads_enter ();
        if (GTK_WIDGET_VISIBLE (main_window)) {
                conf = modest_runtime_get_conf ();
                modest_widget_memory_restore (conf, G_OBJECT(priv->main_paned),
                                              MODEST_CONF_MAIN_PANED_KEY);
        }
+       gdk_threads_leave ();
+
        return FALSE;
 }
 
@@ -2486,9 +2490,13 @@ show_updating_banner (gpointer user_data)
        priv = MODEST_MAIN_WINDOW_GET_PRIVATE (user_data);
 
        if (priv->updating_banner == NULL) {
+
+               /* We're outside the main lock */
+               gdk_threads_enter ();
                priv->updating_banner = 
                        modest_platform_animation_banner (GTK_WIDGET (user_data), NULL,
                                                          _CS ("ckdg_pb_updating"));
+               gdk_threads_leave ();
        }
 
        /* Remove timeout */
index ca09730..e6064c4 100644 (file)
@@ -2509,6 +2509,9 @@ show_remove_attachment_information (gpointer userdata)
        ModestMsgViewWindow *window = (ModestMsgViewWindow *) userdata;
        ModestMsgViewWindowPrivate *priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window);
 
+       /* We're outside the main lock */
+       gdk_threads_enter ();
+
        if (priv->remove_attachment_banner != NULL) {
                gtk_widget_destroy (priv->remove_attachment_banner);
                g_object_unref (priv->remove_attachment_banner);
@@ -2517,6 +2520,8 @@ show_remove_attachment_information (gpointer userdata)
        priv->remove_attachment_banner = g_object_ref (
                hildon_banner_show_animation (NULL, NULL, _("mcen_ib_removing_attachment")));
 
+       gdk_threads_leave ();
+
        return FALSE;
 }
 
index 1ffff14..8be8c19 100644 (file)
@@ -2279,7 +2279,7 @@ expand_row_timeout (gpointer data)
        GtkTreeViewDropPosition pos;
        gboolean result = FALSE;
        
-       GDK_THREADS_ENTER ();
+       gdk_threads_enter ();
        
        gtk_tree_view_get_drag_dest_row (tree_view,
                                         &dest_path,
@@ -2298,7 +2298,7 @@ expand_row_timeout (gpointer data)
                result = TRUE;
        }
        
-       GDK_THREADS_LEAVE ();
+       gdk_threads_leave ();
 
        return result;
 }
index 2151371..f615e2c 100644 (file)
@@ -969,6 +969,10 @@ html_adjustment_changed (GtkAdjustment *adj,
 gboolean
 idle_readjust_scroll (ModestGtkhtmlMsgView *self)
 {
+
+       /* We're out the main lock */
+       gdk_threads_enter ();
+
        if (GTK_WIDGET_DRAWABLE (self)) {
                ModestGtkhtmlMsgViewPrivate *priv = MODEST_GTKHTML_MSG_VIEW_GET_PRIVATE (self);
                GtkAdjustment *html_vadj;
@@ -985,6 +989,9 @@ idle_readjust_scroll (ModestGtkhtmlMsgView *self)
                gtk_adjustment_set_value (priv->vadj, 0.0);
        }
        g_object_unref (G_OBJECT (self));
+
+       gdk_threads_leave ();
+
        return FALSE;
 }