aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--configure.in11
-rw-r--r--libsylph/libsylph-0.def1
-rw-r--r--libsylph/procmsg.c3
-rw-r--r--libsylph/procmsg.h2
-rw-r--r--src/inc.c5
-rw-r--r--src/summaryview.c49
-rw-r--r--src/summaryview.h2
8 files changed, 74 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c05c462..a5fe43eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-30
+
+ * libsylph/procmsg.[ch]
+ src/inc.c
+ src/summaryview.[ch]: update summary view on receiving on the fly.
+ * configure.in: updated/fixed libtool version.
+
2010-06-18
* libsylph/pop.c
diff --git a/configure.in b/configure.in
index b3dc70fe..9db3ac1b 100644
--- a/configure.in
+++ b/configure.in
@@ -10,7 +10,7 @@ MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=beta1
-BUILD_REVISION=1006
+BUILD_REVISION=1100
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl define if this is a development release
@@ -40,9 +40,12 @@ fi
dnl libtool versioning
LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION
-LT_CURRENT=`expr 1 + $MICRO_VERSION - $INTERFACE_AGE`
-LT_REVISION=$INTERFACE_AGE
-LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
+dnl LT_CURRENT=`expr 1 + $MICRO_VERSION - $INTERFACE_AGE`
+dnl LT_REVISION=$INTERFACE_AGE
+dnl LT_AGE=`expr $BINARY_AGE - $INTERFACE_AGE`
+LT_CURRENT=2
+LT_REVISION=0
+LT_AGE=1
AC_SUBST(LT_RELEASE)
AC_SUBST(LT_CURRENT)
AC_SUBST(LT_REVISION)
diff --git a/libsylph/libsylph-0.def b/libsylph/libsylph-0.def
index 4a39cd53..b717c4da 100644
--- a/libsylph/libsylph-0.def
+++ b/libsylph/libsylph-0.def
@@ -676,3 +676,4 @@ EXPORTS
imap_msg_list_set_colorlabel_flags @ 674
filter_get_addressbook_func @ 675
filter_set_addressbook_func @ 676
+ procmsg_flaginfo_list_free @ 677
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c
index d9dacd6d..2f6ebaad 100644
--- a/libsylph/procmsg.c
+++ b/libsylph/procmsg.c
@@ -721,7 +721,7 @@ void procmsg_add_mark_queue(FolderItem *item, gint num, MsgFlags flags)
item->mark_queue = g_slist_prepend(item->mark_queue, flaginfo);
}
-static void procmsg_flaginfo_list_free(GSList *flaglist)
+void procmsg_flaginfo_list_free(GSList *flaglist)
{
GSList *cur;
MsgFlagInfo *flaginfo;
@@ -778,6 +778,7 @@ void procmsg_add_cache_queue(FolderItem *item, gint num, MsgInfo *msginfo)
queue_msginfo = procmsg_msginfo_copy(msginfo);
queue_msginfo->msgnum = num;
+ queue_msginfo->folder = item;
if (queue_msginfo->file_path) {
g_free(queue_msginfo->file_path);
queue_msginfo->file_path = NULL;
diff --git a/libsylph/procmsg.h b/libsylph/procmsg.h
index a83dde0e..32ec3dff 100644
--- a/libsylph/procmsg.h
+++ b/libsylph/procmsg.h
@@ -247,6 +247,8 @@ void procmsg_write_flags_list (FolderItem *item,
void procmsg_write_flags_for_multiple_folders
(GSList *mlist);
+void procmsg_flaginfo_list_free (GSList *flaglist);
+
void procmsg_flush_mark_queue (FolderItem *item,
FILE *fp);
void procmsg_add_mark_queue (FolderItem *item,
diff --git a/src/inc.c b/src/inc.c
index 36305814..b97adca1 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -1036,12 +1036,17 @@ static gboolean hash_remove_func(gpointer key, gpointer value, gpointer data)
static void inc_update_folderview(IncProgressDialog *inc_dialog,
IncSession *inc_session)
{
+ MainWindow *mainwin;
+
if (g_hash_table_size(inc_session->tmp_folder_table) > 0) {
folderview_update_item_foreach(inc_session->tmp_folder_table,
FALSE);
g_hash_table_foreach_remove(inc_session->tmp_folder_table,
hash_remove_func, NULL);
}
+
+ mainwin = main_window_get();
+ summary_show_queued_msgs(mainwin->summaryview);
}
static void inc_progress_dialog_update_periodic(IncProgressDialog *inc_dialog,
diff --git a/src/summaryview.c b/src/summaryview.c
index 49742199..b705fbd9 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -197,6 +197,9 @@ static void summary_update_status (SummaryView *summaryview);
/* display functions */
static void summary_status_show (SummaryView *summaryview);
+static void summary_set_row (SummaryView *summaryview,
+ GtkTreeIter *iter,
+ MsgInfo *msginfo);
static void summary_set_tree_model_from_list
(SummaryView *summaryview,
GSList *mlist);
@@ -1020,6 +1023,50 @@ void summary_clear_all(SummaryView *summaryview)
summary_status_show(summaryview);
}
+void summary_show_queued_msgs(SummaryView *summaryview)
+{
+ FolderItem *item;
+ GSList *qlist, *cur;
+ MsgInfo *msginfo;
+ GtkTreeStore *store = GTK_TREE_STORE(summaryview->store);
+ GtkTreeIter iter;
+
+ if (summary_is_locked(summaryview))
+ return;
+
+ item = summaryview->folder_item;
+ if (!item || !item->path || !item->cache_queue ||
+ item->stype == F_VIRTUAL)
+ return;
+
+ debug_print("summary_show_queued_msgs: appending queued messages to summary (%s)\n", item->path);
+
+ qlist = g_slist_reverse(item->cache_queue);
+ item->cache_queue = NULL;
+ if (item->mark_queue) {
+ procmsg_flaginfo_list_free(item->mark_queue);
+ item->mark_queue = NULL;
+ }
+
+ for (cur = qlist; cur != NULL; cur = cur->next) {
+ msginfo = (MsgInfo *)cur->data;
+
+ debug_print("summary_show_queued_msgs: appending msg %u\n",
+ msginfo->msgnum);
+ msginfo->folder = item;
+ gtk_tree_store_append(store, &iter, NULL);
+ summary_set_row(summaryview, &iter, msginfo);
+
+ summaryview->total_size += msginfo->size;
+ }
+
+ summaryview->all_mlist = g_slist_concat(summaryview->all_mlist, qlist);
+
+ item->cache_dirty = TRUE;
+
+ debug_print("summary_show_queued_msgs: done.\n");
+}
+
void summary_lock(SummaryView *summaryview)
{
summaryview->lock_count++;
@@ -2501,7 +2548,7 @@ gint summary_write_cache(SummaryView *summaryview)
for (cur = summaryview->all_mlist; cur != NULL; cur = cur->next) {
MsgInfo *msginfo = (MsgInfo *)cur->data;
- if (msginfo->folder->mark_queue != NULL) {
+ if (msginfo->folder && msginfo->folder->mark_queue != NULL) {
MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW);
}
if (fps.cache_fp)
diff --git a/src/summaryview.h b/src/summaryview.h
index 230318f0..fdc1d9b7 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -168,6 +168,8 @@ gboolean summary_show (SummaryView *summaryview,
void summary_clear_list (SummaryView *summaryview);
void summary_clear_all (SummaryView *summaryview);
+void summary_show_queued_msgs (SummaryView *summaryview);
+
void summary_lock (SummaryView *summaryview);
void summary_unlock (SummaryView *summaryview);
gboolean summary_is_locked (SummaryView *summaryview);