* Prevents the Expunged messages from appear
[modest] / src / maemo / modest-main-window.c
index 03576fd..7bde64d 100644 (file)
@@ -59,7 +59,7 @@
 #include "modest-tny-msg.h"
 #include "modest-mail-operation.h"
 #include "modest-icon-names.h"
-#include "modest-progress-bar-widget.h"
+#include "modest-progress-bar.h"
 #include "modest-text-utils.h"
 #include "modest-ui-dimming-manager.h"
 #include "maemo/modest-osso-state-saving.h"
@@ -1491,7 +1491,7 @@ modest_main_window_show_toolbar (ModestWindow *self,
                toolbar_resize (MODEST_MAIN_WINDOW (self));
                
                /* Add ProgressBar (Transfer toolbar) */ 
-               priv->progress_bar = modest_progress_bar_widget_new ();
+               priv->progress_bar = modest_progress_bar_new ();
                gtk_widget_set_no_show_all (priv->progress_bar, TRUE);
                placeholder = gtk_ui_manager_get_widget (parent_priv->ui_manager, "/ToolBar/ProgressBarView");
                insert_index = gtk_toolbar_get_item_index(GTK_TOOLBAR (parent_priv->toolbar), GTK_TOOL_ITEM(placeholder));
@@ -1903,6 +1903,7 @@ on_msg_count_changed (ModestHeaderView *header_view,
                      TnyFolderChange *change,
                      ModestMainWindow *main_window)
 {
+       gboolean refilter = FALSE;
        gboolean folder_empty = FALSE;
        gboolean all_marked_as_deleted = FALSE;
        ModestMainWindowPrivate *priv;
@@ -1925,6 +1926,9 @@ on_msg_count_changed (ModestHeaderView *header_view,
                if (changed & TNY_FOLDER_CHANGE_CHANGED_ADDED_HEADERS) {
                        modest_platform_push_email_notification ();
                }
+
+               if ((changed) & TNY_FOLDER_CHANGE_CHANGED_EXPUNGED_HEADERS)
+                       refilter = TRUE;
        }
 
        /* Check if all messages are marked to be deleted */
@@ -1941,10 +1945,8 @@ on_msg_count_changed (ModestHeaderView *header_view,
                                                       MODEST_MAIN_WINDOW_CONTENTS_STYLE_HEADERS);
        }
 
-       /* Finally refilter the model. Do this *after* setting the
-          contents style because otherwise we could get into troubles
-          with the "No messages to show" banner */
-       modest_header_view_refilter (priv->header_view);
+       if (refilter)
+               modest_header_view_refilter (header_view);
 }