* expunge deleted messages when switching folders or closing;
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 26 Jun 2007 14:05:47 +0000 (14:05 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Tue, 26 Jun 2007 14:05:47 +0000 (14:05 +0000)
  otherwise it's not possible to delete at all...

this should fix NB#61769, NB#61764

pmo-trunk-r2430

src/widgets/modest-attachment-view.c
src/widgets/modest-folder-view.c

index db1280d..b76fa17 100644 (file)
@@ -128,7 +128,7 @@ modest_attachment_view_set_part (TnyMimePartView *self, TnyMimePart *mime_part)
 
 static gboolean
 get_size_idle_func (gpointer data)
-{
+{      
        gdk_threads_enter ();
 
        ModestAttachmentView *self = (ModestAttachmentView *) data;
index 2769cde..93f8ecc 100644 (file)
@@ -573,6 +573,10 @@ modest_folder_view_finalize (GObject *obj)
        }
 
        if (priv->cur_folder_store) {
+               if (TNY_IS_FOLDER(priv->cur_folder_store))
+                       tny_folder_sync (TNY_FOLDER(priv->cur_folder_store), TRUE, NULL);
+                       /* expunge the message */
+
                g_object_unref (priv->cur_folder_store);
                priv->cur_folder_store = NULL;
        }
@@ -940,7 +944,8 @@ on_selection_changed (GtkTreeSelection *sel, gpointer user_data)
        /* Current folder was unselected */
        if (priv->cur_folder_store) {
                if (TNY_IS_FOLDER(priv->cur_folder_store))
-                       tny_folder_sync (TNY_FOLDER(priv->cur_folder_store), FALSE, NULL);
+                       tny_folder_sync (TNY_FOLDER(priv->cur_folder_store), TRUE, NULL);
+               /* expunge the message */
 
                g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0,
                               priv->cur_folder_store, FALSE);