Re: Patch: update the message counts in list store on delayed poke status
- From: José Dapena Paz <jdapena igalia com>
- To: tinymail-devel-list <tinymail-devel-list gnome org>
- Subject: Re: Patch: update the message counts in list store on delayed poke status
- Date: Tue, 30 Jun 2009 14:13:10 +0200
El mar, 30-06-2009 a las 12:20 +0200, José Dapena Paz escribió:
> Hi,
>
> This is a small change over the delayed refresh development. ON running
> the delayed refresh poke status calls, we update the list store message
> counts, to get proper feedback of the message count changes.
>
> Changelog entry:
> * libtinymailui-gtk/tny-gtk-folder-list-store.c:
> update message counts on running delayed poke_status.
Wrong fix, that didn't face the real problem. The problem was in the
way the folders were iterated in the case.
So new patch, this removes the mark_for_removal handling in folder list
store, that's preventing the forced recursive refresh to work, and also
prevents proper updates of message counts with delayed refresh mode.
Changelog entry:
* libtinymailui-gtk/tny-gtk-folder-list-store.c: remove
mark_for_removal handling as this is breaking delayed refresh
mode, and also detecting new folders in some cases.
--
José Dapena Paz <jdapena igalia com>
Igalia
diff --git a/libtinymailui-gtk/tny-gtk-folder-list-store.c b/libtinymailui-gtk/tny-gtk-folder-list-store.c
index 12719dc..c963ccf 100644
--- a/libtinymailui-gtk/tny-gtk-folder-list-store.c
+++ b/libtinymailui-gtk/tny-gtk-folder-list-store.c
@@ -264,7 +264,6 @@ recurse_folders_async_cb (TnyFolderStore *store,
TnyFolderStore *folder_store = NULL;
GtkTreeIter miter;
gboolean found = FALSE;
- GObject *mark_for_removal = NULL;
if (instance && (TNY_IS_FOLDER (instance) || TNY_IS_MERGE_FOLDER (instance)))
folder = TNY_FOLDER (instance);
@@ -290,25 +289,6 @@ recurse_folders_async_cb (TnyFolderStore *store,
break;
}
- /* We search whether this folder that we have in the
- * model, still exists in the actual list. Because if
- * not, it probably got removed remotely (and we need
- * to get rid of it in the model now) */
-
- niter = tny_list_create_iterator (folders);
- while (!tny_iterator_is_done (niter))
- {
- TnyFolder *ifound = TNY_FOLDER (tny_iterator_get_current (niter));
- if (citem == (GObject *) ifound) {
- if (mark_for_removal)
- g_object_unref (mark_for_removal);
- mark_for_removal = g_object_ref (ifound);
- }
- g_object_unref (ifound);
- tny_iterator_next (niter);
- }
- g_object_unref (niter);
-
if (citem)
g_object_unref (citem);
@@ -400,18 +380,11 @@ recurse_folders_async_cb (TnyFolderStore *store,
do_poke_status))
tny_folder_poke_status (TNY_FOLDER (folder));
- if (mark_for_removal) {
- g_object_unref (mark_for_removal);
- mark_for_removal = NULL;
- }
} else {
if (folder && do_poke_status)
tny_folder_poke_status (TNY_FOLDER (folder));
- if (mark_for_removal) {
- g_object_unref (mark_for_removal);
- mark_for_removal = NULL;
- } else if (folder_store) {
+ if (folder_store) {
_RefreshInfo *new_info = g_slice_new (_RefreshInfo);
/* We still keep recursing already fetch folders, to know if there are new child
folders */
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]