[Commits] [SCM] claws branch, vfolder, updated. 3.10.1-166-g8b984ad

miras at claws-mail.org miras at claws-mail.org
Sun Jul 27 01:18:54 CEST 2014


The branch, vfolder has been updated
       via  8b984ad80bb1916e161899ae97ba9c9d774971bb (commit)
       via  315615459a4e08ad50b5c62b9cbf8a39bcfdb442 (commit)
       via  3a6a70c7b3fa9288198c2aafc74b6d778b6320cb (commit)
       via  4f09c01265edb0f7c4cd3f8f205f960277900994 (commit)
       via  76d37e0ac4cb6a451e44523f76201d7d57d45799 (commit)
       via  b1a697d628595ef353ded83e7af5e8ebde47f56b (commit)
       via  973011215ffad1e1b2acdcfab52f042bd8823ce7 (commit)
       via  d0ad5f6a2835f12e6ede145e86253801f4432da5 (commit)
       via  da036db0b5d61742164be368fdee45fbda592102 (commit)
       via  491f369b6b868667e774da3d75735332712292cc (commit)
       via  1a51762c493c8b1cf109d138e6619a3f9dca391e (commit)
       via  ae895c83393ec495cdf3454de4ff12e89dcc65c8 (commit)
       via  c3b1f98e46c26df4d33de4b280960b301c0555a6 (commit)
       via  7acbddf5cb01a75d97ee210a6dde1f7289de8a14 (commit)
       via  51530948537b9c22fa94fe735d9b814546ea634d (commit)
       via  7fbc8356e3b6b097b5b0d0d3f6b3f257a18fdb9b (commit)
       via  cb8a2cde4548c62a3ad8052cb6305caa4dcbb8dd (commit)
       via  9ff86db84bc2fdee00d1379fa875d2e6d9e48c2d (commit)
       via  45a6494a22ca888132efbf5f2096e57fd0fb1970 (commit)
       via  fa7987cbb02b09596019d1100604f16c08344528 (commit)
       via  175213a5326a1f14b21f8b6aee89d55f086eca59 (commit)
       via  1316680290aea575cbc04e664b51457b82aff506 (commit)
       via  5d65cf9f805b141f4862a7b9ffea427c64b32da0 (commit)
       via  3abe2e6d328a1b890475391fd0f5c31869eb3ea5 (commit)
       via  723acc9063cd53cbf22810724135da2be370c703 (commit)
       via  d28575b79c20d7f2e8eed9c1981abb33f88a7b01 (commit)
       via  4e1163d87da4ef8986f505e7837eb0af01a09594 (commit)
       via  93fd269f9e2e7b4b32cf5753ab5e103513981b72 (commit)
       via  678ea51e829fe212e95bc32103251cf24e2674a5 (commit)
       via  f146a82069d03ca436712096482a33f4f4991abf (commit)
       via  bf3f91d9ce21acf3fd52ed6ad4c25a956f1490aa (commit)
       via  96dbb8027447a57c613507f5d4f98b3973a3ddae (commit)
       via  ea91b4e8016b555ebef33222cd71c36c0fa40fbb (commit)
       via  07b568e24aeb319f2a36cf7bc4b934827a4d274b (commit)
       via  ff9dc7bb115755662cb7b1c4175c032f35f73988 (commit)
       via  58a62e07e425e957a5f3ae53d51e60b3a103fd20 (commit)
       via  fe89b3a7fbcefc21dcf195929c948bd8be603788 (commit)
       via  b0a0fd75fb84a8bfffebc945faa241b06feb91bf (commit)
       via  18d334146bf505666a2f0d5ea8d6dd5fcd22ee1a (commit)
       via  91c3b966eab571ec49974c4e570c128022f3d235 (commit)
       via  23c8b42d76d7cc5fedca520d79ee1f6d0659e792 (commit)
      from  bb3931b147e8f77cb4b35a79efcb734ed2b8cf69 (commit)

Summary of changes:
 Makefile.am                                        |    5 +-
 appdata/Makefile.am                                |    5 +-
 autogen.sh                                         |   10 ++-
 config/Makefile.am                                 |    4 --
 doc/Makefile.am                                    |    5 +-
 doc/man/Makefile.am                                |    5 +-
 m4/Makefile.am                                     |    5 +-
 manual/Makefile.am                                 |    5 +-
 manual/de/Makefile.am                              |    5 +-
 manual/de/dist/Makefile.am                         |    5 +-
 manual/de/dist/html/Makefile.am                    |    5 +-
 manual/de/dist/pdf/Makefile.am                     |    5 +-
 manual/de/dist/ps/Makefile.am                      |    7 +-
 manual/de/dist/txt/Makefile.am                     |    5 +-
 manual/dist/Makefile.am                            |    5 +-
 manual/dist/html/Makefile.am                       |    5 +-
 manual/dist/pdf/Makefile.am                        |    5 +-
 manual/dist/ps/Makefile.am                         |    7 +-
 manual/dist/txt/Makefile.am                        |    5 +-
 manual/dtd/Makefile.am                             |    5 +-
 manual/es/Makefile.am                              |    5 +-
 manual/es/dist/Makefile.am                         |    5 +-
 manual/es/dist/html/Makefile.am                    |    5 +-
 manual/es/dist/pdf/Makefile.am                     |    5 +-
 manual/es/dist/ps/Makefile.am                      |    7 +-
 manual/es/dist/txt/Makefile.am                     |    5 +-
 manual/fr/Makefile.am                              |    5 +-
 manual/fr/dist/Makefile.am                         |    5 +-
 manual/fr/dist/html/Makefile.am                    |    5 +-
 manual/fr/dist/pdf/Makefile.am                     |    5 +-
 manual/fr/dist/ps/Makefile.am                      |    7 +-
 manual/fr/dist/txt/Makefile.am                     |    5 +-
 manual/pl/Makefile.am                              |    5 +-
 manual/pl/dist/Makefile.am                         |    5 +-
 manual/pl/dist/html/Makefile.am                    |    5 +-
 manual/pl/dist/pdf/Makefile.am                     |    5 +-
 manual/pl/dist/ps/Makefile.am                      |    7 +-
 manual/pl/dist/txt/Makefile.am                     |    5 +-
 src/Makefile.am                                    |    6 +-
 src/common/Makefile.am                             |    5 +-
 src/common/w32_stdio.c                             |   20 ++++++
 src/compose.c                                      |    2 +-
 src/etpan/Makefile.am                              |    5 +-
 src/folderview.c                                   |   41 +++++++++++
 src/gtk/Makefile.am                                |    5 +-
 src/gtk/headers.h                                  |    5 +-
 src/gtk/quicksearch.c                              |    1 -
 src/imap.c                                         |   14 ++--
 src/mainwindow.c                                   |   25 ++++++-
 src/matcher_parser_lex.h                           |   41 ++++++++++-
 src/plugins/Makefile.am                            |    5 +-
 src/plugins/acpi_notifier/Makefile.am              |    5 +-
 src/plugins/address_keeper/Makefile.am             |    5 +-
 src/plugins/archive/Makefile.am                    |    7 +-
 src/plugins/att_remover/Makefile.am                |    5 +-
 src/plugins/attachwarner/Makefile.am               |    5 +-
 src/plugins/bogofilter/Makefile.am                 |    5 +-
 src/plugins/bsfilter/Makefile.am                   |    5 +-
 src/plugins/clamd/Makefile.am                      |    5 +-
 src/plugins/clamd/libclamd/Makefile.am             |    5 +-
 src/plugins/demo/Makefile.am                       |    5 +-
 src/plugins/fancy/Makefile.am                      |    5 +-
 src/plugins/fancy/fancy_prefs.c                    |   72 ++++++++++++++++++--
 src/plugins/fancy/fancy_prefs.h                    |    5 +-
 src/plugins/fancy/fancy_viewer.c                   |    8 ++-
 src/plugins/fancy/fancy_viewer.h                   |    4 +-
 src/plugins/fetchinfo/Makefile.am                  |    5 +-
 src/plugins/gdata/Makefile.am                      |    5 +-
 src/plugins/geolocation/Makefile.am                |    5 +-
 src/plugins/libravatar/Makefile.am                 |    5 +-
 src/plugins/libravatar/libravatar.c                |    3 +-
 src/plugins/libravatar/libravatar_missing.c        |    2 +-
 src/plugins/mailmbox/Makefile.am                   |    5 +-
 src/plugins/newmail/Makefile.am                    |    5 +-
 src/plugins/notification/Makefile.am               |    5 +-
 src/plugins/notification/gtkhotkey/Makefile.am     |    5 +-
 .../notification/gtkhotkey/gtk-hotkey-marshal.c    |   17 +++++
 .../notification/gtkhotkey/gtk-hotkey-marshal.h    |   17 +++++
 src/plugins/notification/gtkhotkey/gtkhotkey.h     |   17 +++++
 src/plugins/pdf_viewer/Makefile.am                 |    5 +-
 src/plugins/perl/Makefile.am                       |    5 +-
 src/plugins/perl/tools/Makefile.am                 |    5 +-
 src/plugins/pgpcore/Makefile.am                    |    5 +-
 src/plugins/pgpcore/sgpgme.c                       |   34 +++++----
 src/plugins/pgpinline/Makefile.am                  |    5 +-
 src/plugins/pgpmime/Makefile.am                    |    5 +-
 src/plugins/python/Makefile.am                     |    5 +-
 src/plugins/python/composewindowtype.c             |   18 +----
 src/plugins/python/examples/Makefile.am            |    5 +-
 src/plugins/python/python_plugin.c                 |    2 +-
 src/plugins/rssyl/Makefile.am                      |    5 +-
 src/plugins/rssyl/libfeed/date.c                   |    5 +-
 src/plugins/rssyl/libfeed/feed.h                   |    2 +-
 src/plugins/rssyl/libfeed/feeditem.c               |    5 +-
 src/plugins/rssyl/libfeed/parser.c                 |    2 +-
 src/plugins/rssyl/libfeed/parser_atom10.c          |   40 +++++++----
 src/plugins/rssyl/libfeed/parser_rdf.c             |    2 +
 src/plugins/rssyl/opml_export.c                    |   12 +++-
 src/plugins/rssyl/opml_import.c                    |    9 ++-
 src/plugins/rssyl/rssyl.c                          |    2 +-
 src/plugins/rssyl/rssyl_add_item.c                 |   36 ++++++----
 src/plugins/rssyl/rssyl_deleted.c                  |   14 ++--
 src/plugins/rssyl/rssyl_parse_feed.c               |   32 ++++++++-
 src/plugins/rssyl/rssyl_subscribe.c                |   14 ++++
 src/plugins/rssyl/rssyl_subscribe_gtk.c            |   22 +++---
 src/plugins/rssyl/rssyl_subscribe_gtk.h            |    2 +-
 src/plugins/rssyl/rssyl_update_comments.c          |    1 +
 src/plugins/rssyl/rssyl_update_feed.c              |    9 ++-
 src/plugins/rssyl/rssyl_update_format.c            |    8 ++-
 src/plugins/smime/Makefile.am                      |    5 +-
 src/plugins/spam_report/Makefile.am                |    5 +-
 src/plugins/spam_report/spam_report.c              |   14 ++--
 src/plugins/spamassassin/Makefile.am               |    5 +-
 src/plugins/tnef_parse/Makefile.am                 |    5 +-
 src/plugins/tnef_parse/mapi.h                      |   22 ++++++
 src/plugins/tnef_parse/mapidefs.h                  |   22 ++++++
 src/plugins/tnef_parse/mapitags.h                  |   22 ++++++
 src/plugins/tnef_parse/tnef-errors.h               |   22 ++++++
 src/plugins/tnef_parse/tnef-types.h                |   22 ++++++
 src/plugins/tnef_parse/ytnef.h                     |   22 ++++++
 src/plugins/vcalendar/Makefile.am                  |    5 +-
 src/plugins/vcalendar/libical/Makefile.am          |    5 +-
 .../vcalendar/libical/design-data/Makefile.am      |    5 +-
 src/plugins/vcalendar/libical/scripts/Makefile.am  |    5 +-
 src/plugins/vfolder/vfolder.c                      |   51 +++++++++++---
 src/plugins/vfolder/vfolder.h                      |    3 +-
 src/plugins/vfolder/vfolder_prop.c                 |    6 +-
 src/prefs_common.c                                 |    2 +
 src/prefs_common.h                                 |    1 +
 src/quote_fmt.h                                    |   19 ++++++
 src/quote_fmt_lex.h                                |   41 ++++++++++-
 src/summaryview.c                                  |    9 ++-
 tools/Makefile.am                                  |    5 +-
 133 files changed, 956 insertions(+), 304 deletions(-)


- Log -----------------------------------------------------------------
commit 8b984ad80bb1916e161899ae97ba9c9d774971bb
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sun Jul 27 01:18:48 2014 +0200

    Fix major bug. It is very likely that vfolders can share source folder!!

diff --git a/src/plugins/vfolder/vfolder.c b/src/plugins/vfolder/vfolder.c
index 214ec30..3ca21f3 100644
--- a/src/plugins/vfolder/vfolder.c
+++ b/src/plugins/vfolder/vfolder.c
@@ -290,18 +290,21 @@ static FolderItem* vfolder_item_new(Folder* folder) {
 
 static void vfolder_item_destroy(Folder* folder, FolderItem* item) {
 	VFolderItem* vitem = VFOLDER_ITEM(item);
+	gchar* key;
 
 	cm_return_if_fail(vitem != NULL);
 
 	if (vitem->source_id) {
 		debug_print("%s: Removing virtual folder from message store\n", vitem->source_id);
-		g_hash_table_remove(vfolders, vitem->source_id);
+		key = vfolder_compute_unique_id(vitem);
+		g_hash_table_remove(vfolders, key);
 		g_free(vitem->source_id);
 		vitem->source_id = NULL;
 	} else {
 		vfolder_msgvault_free(vitem->msgvault);
 	}
 
+	g_free(key);
 	g_free(vitem->filter);
 	vitem->filter = NULL;
 	vitem->msgvault = NULL;
@@ -853,10 +856,16 @@ gint vfolder_get_source_msg_num(VFolderItem* vitem, gint virtnum) {
 }
 
 gboolean vfolder_msgvault_add(VFolderItem* vitem) {
+	gchar* key;
+
 	cm_return_val_if_fail(vitem != NULL, TRUE);
 	cm_return_val_if_fail(vitem->source_id != NULL, TRUE);
 
-	g_hash_table_replace(vfolders, g_strdup(vitem->source_id), vitem);
+	debug_print("%s: Added to message vault\n", vitem->source_id);
+	key = vfolder_compute_unique_id(vitem);
+	debug_print("New key: %s\n", key);
+	g_hash_table_replace(vfolders, g_strdup(key), vitem);
+	g_free(key);
 
 	return FALSE;
 }
@@ -1055,19 +1064,23 @@ VFolderItem* vfolder_folder_item_watch(FolderItem* item) {
 
 void vfolder_source_path_change(VFolderItem* vitem, FolderItem* newItem) {
 	VFolderItem* newVitem = NULL;
-	gpointer key, value;
+	gpointer oldkey, value;
+	gchar* key;
 
 	cm_return_if_fail(vitem != NULL);
 
-	if (g_hash_table_lookup_extended(vfolders, vitem->source_id, &key, &value)) {
-		g_hash_table_steal(vfolders, vitem->source_id);
-		g_free(key);
+	key = vfolder_compute_unique_id(vitem);
+	if (g_hash_table_lookup_extended(vfolders, key, &oldkey, &value)) {
+		g_hash_table_steal(vfolders, oldkey);
+		g_free(oldkey);
 		newVitem = VFOLDER_ITEM(value);
 		newVitem->source = newItem;
 		g_free(newVitem->source_id);
 		newVitem->source_id = folder_item_get_identifier(newItem);
-		g_hash_table_replace(vfolders, g_strdup(newVitem->source_id), newVitem);
+		g_hash_table_replace(vfolders, g_strdup(key), newVitem);
 	}
+
+	g_free(key);
 }
 
 void vfolder_source_folder_remove(VFolderItem* vitem) {
@@ -1091,14 +1104,34 @@ void vfolder_source_folder_remove(VFolderItem* vitem) {
 	}
 }
 
-void vfolder_vfolders_change_key(VFolderItem* vitem, const gchar* key) {
+void vfolder_vfolders_change_key(VFolderItem* vitem) {
 	gpointer old_key, value;
+	gchar* key;
+	gchar* id;
 
 	cm_return_if_fail(vitem != NULL);
 
-	if (g_hash_table_lookup_extended(vfolders, vitem->source_id, &old_key, &value)) {
+	id = folder_item_get_identifier(FOLDER_ITEM(vitem));
+	if (g_hash_table_lookup_extended(vfolders, id, &old_key, &value)) {
 		g_hash_table_steal(vfolders, old_key);
 		g_free(old_key);
+		key = vfolder_compute_unique_id(vitem);
 		g_hash_table_replace(vfolders, g_strdup(key), value);
 	}
+
+	g_free(key);
+	g_free(id);
+}
+
+gchar* vfolder_compute_unique_id(VFolderItem* vitem) {
+	gchar* key;
+	gchar* id;
+
+	cm_return_val_if_fail(vitem != NULL, NULL);
+
+	id = folder_item_get_identifier(FOLDER_ITEM(vitem));
+	key = g_strconcat(vitem->source_id, id, NULL);
+	g_free(id);
+
+	return key;
 }
diff --git a/src/plugins/vfolder/vfolder.h b/src/plugins/vfolder/vfolder.h
index 5f897a4..5b9cf26 100644
--- a/src/plugins/vfolder/vfolder.h
+++ b/src/plugins/vfolder/vfolder.h
@@ -93,7 +93,8 @@ gint vfolder_get_virtual_msg_num(VFolderItem* vitem, gint srcnum);
 gint vfolder_get_source_msg_num(VFolderItem* vitem, gint virtnum);
 void vfolder_set_last_num(Folder *folder, FolderItem *item);
 gboolean vfolder_msgvault_add(VFolderItem* vitem);
-void vfolder_vfolders_change_key(VFolderItem* vitem, const gchar* key);
+gchar* vfolder_compute_unique_id(VFolderItem* vitem);
+void vfolder_vfolders_change_key(VFolderItem* vitem);
 
 void vfolder_msgvault_free(MsgVault* data);
 MsgVault* vfolder_msgvault_new();
diff --git a/src/plugins/vfolder/vfolder_prop.c b/src/plugins/vfolder/vfolder_prop.c
index 4543c70..4692a35 100644
--- a/src/plugins/vfolder/vfolder_prop.c
+++ b/src/plugins/vfolder/vfolder_prop.c
@@ -625,13 +625,11 @@ gboolean vfolder_edit_item_dialog(VFolderItem** vitem_ptr, FolderItem* item) {
 					ok = FALSE;
 					goto error;
 				}
-				id = folder_item_get_identifier(vitem->source);
 				if (vitem->source_id) {
-					vfolder_vfolders_change_key(vitem, id);
+					vfolder_vfolders_change_key(vitem);
 					g_free(vitem->source_id);
 				}
-				vitem->source_id = g_strdup(id);
-				g_free(id);
+				vitem->source_id = folder_item_get_identifier(vitem->source);
 				if (FOLDER_ITEM(vitem)->total_msgs > 0)
 					folder_item_remove_all_msg(FOLDER_ITEM(vitem));
 				if (! vitem->msg_filter_func)

commit 315615459a4e08ad50b5c62b9cbf8a39bcfdb442
Merge: bb3931b 3a6a70c
Author: Michael Rasmussen <mir at datanom.net>
Date:   Sat Jul 26 21:32:03 2014 +0200

    Merge branch 'master' into vfolder


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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list