* Optimization, do not refresh the INBOX after a s&r because update_account mail...
authorSergio Villar Senin <svillar@igalia.com>
Mon, 12 Nov 2007 12:58:55 +0000 (12:58 +0000)
committerSergio Villar Senin <svillar@igalia.com>
Mon, 12 Nov 2007 12:58:55 +0000 (12:58 +0000)
* Fixes NB#75176, modest no longer shows a never ending "Refreshing..." string in the status bar and a "Updating..." info banner when send&receive. The problem was that the signal that was issued when the operation ended was not issued inside the gtk lock

pmo-trunk-r3706

src/modest-mail-operation.c
src/modest-ui-actions.c

index dc4df3e..2e480d6 100644 (file)
@@ -1200,8 +1200,9 @@ idle_notify_queue (gpointer data)
 {
        ModestMailOperation *mail_op = MODEST_MAIL_OPERATION (data);
 
-       /* Do not need to block, the notify end will do it for us */    
+       gdk_threads_enter ();
        modest_mail_operation_notify_end (mail_op);
+       gdk_threads_leave ();
        g_object_unref (mail_op);
 
        return FALSE;
index c35e975..5e25f1d 100644 (file)
@@ -4801,7 +4801,11 @@ on_send_receive_finished (ModestMailOperation  *mail_op,
 
        folder_store = modest_folder_view_get_selected (MODEST_FOLDER_VIEW (folder_view));
        
-       if (folder_store && TNY_IS_FOLDER (folder_store)) {
+       /* Do not need to refresh INBOX again because the
+          update_account does it always automatically */
+       if (folder_store && TNY_IS_FOLDER (folder_store) && 
+           tny_folder_get_folder_type (TNY_FOLDER (folder_store)) != TNY_FOLDER_TYPE_INBOX) {
+
                header_view = modest_main_window_get_child_widget (main_win,
                                                                   MODEST_MAIN_WINDOW_WIDGET_TYPE_HEADER_VIEW);