[Commits] [SCM] claws branch, master, updated. 3.10.1-170-g53de074

ticho at claws-mail.org ticho at claws-mail.org
Sat Oct 18 13:58:22 CEST 2014


The branch, master has been updated
       via  53de074939d1bbf21b4b29897616c2c438dc34f7 (commit)
       via  532c08a452e0b8c11a818442b814832d15594022 (commit)
      from  c6dc3e229f361f11ab4920d84bb11b5821bc4e86 (commit)

Summary of changes:
 src/plugins/rssyl/rssyl.c |   46 +++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 42 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 53de074939d1bbf21b4b29897616c2c438dc34f7
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Oct 18 13:55:38 2014 +0200

    RSSyl: Copy RFolderItem private data properly.

diff --git a/src/plugins/rssyl/rssyl.c b/src/plugins/rssyl/rssyl.c
index c87fde9..928d21c 100644
--- a/src/plugins/rssyl/rssyl.c
+++ b/src/plugins/rssyl/rssyl.c
@@ -39,6 +39,7 @@
 #include <xml.h>
 #include <toolbar.h>
 #include <prefs_toolbar.h>
+#include <utils.h>
 
 /* Local includes */
 #include "libfeed/feeditem.h"
@@ -807,6 +808,7 @@ static gboolean rssyl_subscribe_uri(Folder *folder, const gchar *uri)
 static void rssyl_copy_private_data(Folder *folder, FolderItem *oldi,
 		FolderItem *newi)
 {
+	gchar *dpathold, *dpathnew;
 	RFolderItem *olditem = (RFolderItem *)oldi,
 									*newitem = (RFolderItem *)newi;
 
@@ -814,15 +816,42 @@ static void rssyl_copy_private_data(Folder *folder, FolderItem *oldi,
 	g_return_if_fail(olditem != NULL);
 	g_return_if_fail(newitem != NULL);
 
-	if( olditem->url != NULL ) {
+	if (olditem->url != NULL) {
 		g_free(newitem->url);
 		newitem->url = g_strdup(olditem->url);
 	}
 
-	if( olditem->official_title != NULL ) {
+	if (olditem->official_title != NULL) {
 		g_free(newitem->official_title);
 		newitem->official_title = g_strdup(olditem->official_title);
 	}
+
+	if (olditem->source_id != NULL) {
+		g_free(newitem->source_id);
+		newitem->source_id = g_strdup(olditem->source_id);
+	}
+
+	newitem->keep_old = olditem->keep_old;
+	newitem->default_refresh_interval = olditem->default_refresh_interval;
+	newitem->refresh_interval = olditem->refresh_interval;
+	newitem->fetch_comments = olditem->fetch_comments;
+	newitem->fetch_comments_max_age = olditem->fetch_comments_max_age;
+	newitem->silent_update = olditem->silent_update;
+	newitem->write_heading = olditem->write_heading;
+	newitem->ignore_title_rename = olditem->ignore_title_rename;
+	newitem->ssl_verify_peer = olditem->ssl_verify_peer;
+	newitem->refresh_id = olditem->refresh_id;
+	newitem->fetching_comments = olditem->fetching_comments;
+	newitem->last_update = olditem->last_update;
+
+	dpathold = g_strconcat(rssyl_item_get_path(oldi->folder, oldi),
+			G_DIR_SEPARATOR_S, RSSYL_DELETED_FILE, NULL);
+	dpathnew = g_strconcat(rssyl_item_get_path(newi->folder, newi),
+			G_DIR_SEPARATOR_S, RSSYL_DELETED_FILE, NULL);
+	move_file(dpathold, dpathnew, TRUE);
+	g_free(dpathold);
+	g_free(dpathnew);
+
 }
 
 /************************************************************************/

commit 532c08a452e0b8c11a818442b814832d15594022
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Oct 18 13:18:17 2014 +0200

    Revert "RSSyl: Just copy all of the custom folderlist xml tags in copy_private_data via folder_item_{get,set}_xml class functions, instead of handling feed properties one by one."
    
    This reverts commit dc8728ee3222dbe49cdac81e6dc72b2ba206a046.

diff --git a/src/plugins/rssyl/rssyl.c b/src/plugins/rssyl/rssyl.c
index ff4a356..c87fde9 100644
--- a/src/plugins/rssyl/rssyl.c
+++ b/src/plugins/rssyl/rssyl.c
@@ -807,13 +807,22 @@ static gboolean rssyl_subscribe_uri(Folder *folder, const gchar *uri)
 static void rssyl_copy_private_data(Folder *folder, FolderItem *oldi,
 		FolderItem *newi)
 {
+	RFolderItem *olditem = (RFolderItem *)oldi,
+									*newitem = (RFolderItem *)newi;
+
 	g_return_if_fail(folder != NULL);
-	g_return_if_fail(oldi != NULL);
-	g_return_if_fail(newi != NULL);
+	g_return_if_fail(olditem != NULL);
+	g_return_if_fail(newitem != NULL);
 
-	rssyl_item_set_xml(newi->folder, newi,
-			rssyl_item_get_xml(folder, oldi));
+	if( olditem->url != NULL ) {
+		g_free(newitem->url);
+		newitem->url = g_strdup(olditem->url);
+	}
 
+	if( olditem->official_title != NULL ) {
+		g_free(newitem->official_title);
+		newitem->official_title = g_strdup(olditem->official_title);
+	}
 }
 
 /************************************************************************/

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list