[Commits] [SCM] claws branch, vfolder, updated. 3.10.1-198-ga4d1e9e
miras at claws-mail.org
miras at claws-mail.org
Wed Sep 10 22:56:07 CEST 2014
The branch, vfolder has been updated
via a4d1e9ee5c2c5aa3ccacb7af032e8af8ee26fa89 (commit)
via bfe76f921b11810696de585ae58ae8706fd8bb43 (commit)
via ecb5946bbb9c2262678752c0958c4d18bf13e8b7 (commit)
via 250094ca69c43d406027a1071cefb1f4065196af (commit)
via 8c7418e621902913b0f1ecfce19eecc8557de6a3 (commit)
via bbf4c48e9e1357e752f4edc4841d8eeced6931ee (commit)
via 6ab4f38a4f6e8c541fd6df93d7221bfc14fe7d7f (commit)
via 7d0fc8614bba03387110f92587cd3de3b0e4152d (commit)
via f1fd770f62d2239bfc0f4ad0e8369f30c370b789 (commit)
via 7a114d508a42a8d7282011a2c46cf8aa7aa4eaef (commit)
from 5cbb0f3527a182bc4dc00d11bdc9fcbe3f510b5e (commit)
Summary of changes:
AUTHORS | 1 +
po/es.po | 6 +++---
src/account.c | 9 ++++++++-
src/codeconv.c | 23 +++++++++++------------
src/common/session.c | 2 +-
src/common/ssl.c | 12 ++----------
src/common/ssl.h | 7 -------
src/common/template.c | 8 +++++++-
src/common/template.h | 3 ++-
src/common/utils.c | 18 +++++++++++++++---
src/compose.c | 18 ++++++++++++++++++
src/folderview.c | 4 ++--
src/gtk/authors.h | 1 +
src/plugins/vfolder/vfolder.c | 34 ++++++++++++++++++++++++++++------
src/prefs_template.c | 27 +++++++++++++++++++++++++--
15 files changed, 124 insertions(+), 49 deletions(-)
- Log -----------------------------------------------------------------
commit a4d1e9ee5c2c5aa3ccacb7af032e8af8ee26fa89
Author: Michael Rasmussen <mir at datanom.net>
Date: Wed Sep 10 22:55:50 2014 +0200
Fix bug. Copy flags from source when creating virtual folder
diff --git a/src/plugins/vfolder/vfolder.c b/src/plugins/vfolder/vfolder.c
index 933ceab..6bb3f0f 100644
--- a/src/plugins/vfolder/vfolder.c
+++ b/src/plugins/vfolder/vfolder.c
@@ -70,17 +70,33 @@ GHashTable* vfolders;
static gboolean existing_tree_found = FALSE;
static MsgInfo* vfolder_msgvault_get_msginfo(VFolderItem* vitem, gint num, gboolean vmsginfo) {
+ MsgInfo* msginfo = NULL;
+ guint* pnum;
+ gint msgnum;
+
if (! vitem || ! vitem->msgvault) return NULL;
if (vmsginfo) {
debug_print("src->dest: Look up [%d] from %s\n", num, vitem->source_id);
- return g_hash_table_lookup(vitem->msgvault->src_to_virt, GINT_TO_POINTER(num));
+ pnum = g_hash_table_lookup(vitem->msgvault->src_to_virt, GINT_TO_POINTER(num));
+ if (pnum) {
+ msgnum = GPOINTER_TO_INT(pnum);
+ //folder_get_item_from_identifier
+ msginfo = folder_item_get_msginfo(FOLDER_ITEM(vitem), msgnum);
+ }
} else {
gchar* id = folder_item_get_identifier(FOLDER_ITEM(vitem));
debug_print("dest->src: Look up [%d] from %s\n", num, id);
g_free(id);
- return g_hash_table_lookup(vitem->msgvault->virt_to_src, GINT_TO_POINTER(num));
+ pnum = g_hash_table_lookup(vitem->msgvault->virt_to_src, GINT_TO_POINTER(num));
+ if (pnum) {
+ msgnum = GPOINTER_TO_INT(pnum);
+ //folder_get_item_from_identifier(vitem->
+ msginfo = folder_item_get_msginfo(vitem->source, msgnum);
+ }
}
+
+ return msginfo;
}
static void vfolder_free_hashtable(gpointer data) {
@@ -613,7 +629,7 @@ static gchar* vfolder_fetch_msg(Folder* folder, FolderItem* item, gint num) {
}
static MsgInfo* vfolder_get_msginfo(Folder* folder, FolderItem* item, gint num) {
- MsgInfo* msginfo = NULL;
+ MsgInfo *msginfo = NULL, *srcmsg;
gchar* file;
MsgFlags flags;
@@ -629,7 +645,13 @@ static MsgInfo* vfolder_get_msginfo(Folder* folder, FolderItem* item, gint num)
return NULL;
}
- flags.perm_flags = MSG_NEW | MSG_UNREAD;
+ // copy flags from msg
+ srcmsg = vfolder_msgvault_get_msginfo(VFOLDER_ITEM(item), num, FALSE);
+ if (srcmsg)
+ flags.perm_flags = srcmsg->flags.perm_flags;
+ else
+ flags.perm_flags = MSG_NEW | MSG_UNREAD;
+
flags.tmp_flags = 0;
msginfo = procheader_parse_file(file, flags, TRUE, TRUE);
@@ -640,8 +662,8 @@ static MsgInfo* vfolder_get_msginfo(Folder* folder, FolderItem* item, gint num)
if (!msginfo->folder)
msginfo->folder = item;
- if (VFOLDER_ITEM(item)->first_run)
- msginfo->flags.perm_flags = 0;
+// if (VFOLDER_ITEM(item)->first_run)
+// msginfo->flags.perm_flags = 0;
g_free(file);
commit bfe76f921b11810696de585ae58ae8706fd8bb43
Merge: 5cbb0f3 ecb5946
Author: Michael Rasmussen <mir at datanom.net>
Date: Fri Sep 5 18:26:58 2014 +0200
Merge branch 'master' into vfolder
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list