Fremantle: sync folders on closing header window instead of selection change.
authorJose Dapena Paz <jdapena@igalia.com>
Tue, 19 May 2009 14:15:11 +0000 (16:15 +0200)
committerJose Dapena Paz <jdapena@igalia.com>
Tue, 19 May 2009 14:18:43 +0000 (16:18 +0200)
* src/hildon2/modest-header-window.c (..._finalize): sync the folder on
  closing the header window (useful for updating in server delete/seen flags).
* src/widgets/modest-folder-view.c: don't do a sync on folder selection
  changed signal in fremantle.

src/hildon2/modest-header-window.c
src/widgets/modest-folder-view.c

index a07d999..4783508 100644 (file)
@@ -255,6 +255,9 @@ modest_header_window_finalize (GObject *obj)
 
        priv = MODEST_HEADER_WINDOW_GET_PRIVATE(obj);
 
 
        priv = MODEST_HEADER_WINDOW_GET_PRIVATE(obj);
 
+       tny_folder_sync_async (TNY_FOLDER (priv->folder),
+                              FALSE, NULL, NULL, NULL);
+
        g_object_unref (priv->folder);
        g_object_unref (priv->header_view);
        g_object_unref (priv->empty_view);
        g_object_unref (priv->folder);
        g_object_unref (priv->header_view);
        g_object_unref (priv->empty_view);
index 051fef6..b58349b 100644 (file)
@@ -2414,9 +2414,11 @@ on_selection_changed (GtkTreeSelection *sel, gpointer user_data)
                   cause (and it actually does it) a free of the
                   summary of the folder (because the main window will
                   clear the headers view */
                   cause (and it actually does it) a free of the
                   summary of the folder (because the main window will
                   clear the headers view */
+#ifndef MODEST_TOOLKIT_HILDON2
                if (TNY_IS_FOLDER(priv->cur_folder_store))
                        tny_folder_sync_async (TNY_FOLDER(priv->cur_folder_store),
                                               FALSE, NULL, NULL, NULL);
                if (TNY_IS_FOLDER(priv->cur_folder_store))
                        tny_folder_sync_async (TNY_FOLDER(priv->cur_folder_store),
                                               FALSE, NULL, NULL, NULL);
+#endif
 
                g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0,
                       priv->cur_folder_store, FALSE);
 
                g_signal_emit (G_OBJECT(tree_view), signals[FOLDER_SELECTION_CHANGED_SIGNAL], 0,
                       priv->cur_folder_store, FALSE);