[Commits] [SCM] claws branch, vfolder, updated. 3.10.1-115-g7e79e73

miras at claws-mail.org miras at claws-mail.org
Mon Jun 23 02:21:12 CEST 2014


The branch vfolder of project "claws" (Claws Mail) has been updated
       via  7e79e7389af86c15258c2b9259ae534c74d66a80 (commit)
      from  7d7028fa1195758575a43ceae45cbcea9d006e0d (commit)

Summary of changes:
 src/plugins/vfolder/vfolder.c      |    4 ++++
 src/plugins/vfolder/vfolder.h      |    1 +
 src/plugins/vfolder/vfolder_prop.c |    2 ++
 3 files changed, 7 insertions(+)


- Log -----------------------------------------------------------------
commit 7e79e7389af86c15258c2b9259ae534c74d66a80
Author: Michael Rasmussen <mir at datanom.net>
Date:   Mon Jun 23 02:21:03 2014 +0200

    When creating the vfolder for the first time reset message flags to read and not new

diff --git a/src/plugins/vfolder/vfolder.c b/src/plugins/vfolder/vfolder.c
index 937e1a1..e4c0f4f 100644
--- a/src/plugins/vfolder/vfolder.c
+++ b/src/plugins/vfolder/vfolder.c
@@ -44,6 +44,7 @@
 #include "statusbar.h"
 #include "mainwindow.h"
 #include "folderview.h"
+#include "msgcache.h"
 
 #include "vfolder.h"
 #include "vfolder_gtk.h"
@@ -613,6 +614,9 @@ 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;
+
 	g_free(file);
 
 	return msginfo;
diff --git a/src/plugins/vfolder/vfolder.h b/src/plugins/vfolder/vfolder.h
index c1a9326..71c992f 100644
--- a/src/plugins/vfolder/vfolder.h
+++ b/src/plugins/vfolder/vfolder.h
@@ -66,6 +66,7 @@ struct _VFolderItem {
 	gboolean		frozen;				/* Automatic update or not */
 	gboolean		updating;			/* Is this VFolder currently updating */
 	gboolean		changed;
+	gboolean		first_run;
 
 	SearchType		search;
 	FolderItem*		source;				/* Source folder for virtual folder */
diff --git a/src/plugins/vfolder/vfolder_prop.c b/src/plugins/vfolder/vfolder_prop.c
index 6a3ba36..57be81c 100644
--- a/src/plugins/vfolder/vfolder_prop.c
+++ b/src/plugins/vfolder/vfolder_prop.c
@@ -255,6 +255,7 @@ static gboolean vfolder_create_msgs_list(VFolderItem* item) {
 			filelist = procmsg_get_message_file_list(filtered);
 			if (filelist) {
 				gint n = folder_item_add_msgs(FOLDER_ITEM(item), filelist, FALSE);
+				item->first_run = FALSE;
 				FOLDER_ITEM(item)->last_num = n;
 				procmsg_message_file_list_free(filelist);
 			}
@@ -412,6 +413,7 @@ gboolean vfolder_edit_item_dialog(VFolderItem** vitem_ptr, FolderItem* item) {
 					alertpanel_error(_("Can't create the folder '%s'."), str);
 					goto error;
 				}
+				vitem->first_run = TRUE;
 				vfolder_set_msgs_filter(vitem);
 				*vitem_ptr = vitem;
 			} else {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list