evolution-rss r446 - in trunk: . src



Author: lucilanga
Date: Mon Feb 16 08:39:53 2009
New Revision: 446
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=446&view=rev

Log:
2009-02-16  Lucian Langa  <lucilanga gnome org>

* src/parser.c: (update_channel) - free CF descriptor to prevent 
leaking if no new articles found

** Fix for bug #571956

* src/parser.c: (update_channel) ensure folder is created even if we
do not have feeds articles

Modified:
   trunk/ChangeLog
   trunk/src/parser.c
   trunk/src/rss.c
   trunk/src/rss.h

Modified: trunk/src/parser.c
==============================================================================
--- trunk/src/parser.c	(original)
+++ trunk/src/parser.c	Mon Feb 16 08:39:53 2009
@@ -974,6 +974,7 @@
 	gchar *encl;
 	gchar *subj;
 	create_feed *CF;
+	CamelFolder *mail_folder;
 	gchar *chn_name = r->title;
 	gchar *url = r->uri;
 	gchar *main_date = r->maindate;
@@ -999,6 +1000,9 @@
 	FILE *fr = fopen(feed_name, "r");
 	FILE *fw = fopen(feed_name, "a+");
 	//int fw = g_open (feed_name, O_WRONLY | O_CREAT| O_APPEND | O_BINARY, 0666);
+	
+	mail_folder = check_feed_folder(chn_name);
+	camel_object_unref(mail_folder);
 
 	for (i=0; NULL != (el = g_array_index(item, xmlNodePtr, i)); i++) {
 		update_sr_message();
@@ -1041,7 +1045,8 @@
 			farticle++;
 			d(g_print("put success()\n"));
 			update_status_icon(chn_name, subj);
-		}
+		} else
+			free_cf(CF);
         }
 out:	g_free(sender);
 

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Mon Feb 16 08:39:53 2009
@@ -1485,12 +1485,12 @@
 {
 	struct _org_gnome_rss_controls_pobject *po = (struct _org_gnome_rss_controls_pobject *) pobject;
 	GtkWidget *vbox = gtk_vbox_new (TRUE, 1);
-	gtk_widget_show (vbox);
+//	gtk_widget_show (vbox);
 	GtkWidget *hbox2 = gtk_hbox_new (FALSE, 0);
-	gtk_widget_show (hbox2);
+//	gtk_widget_show (hbox2);
 
 	GtkWidget *label3 = gtk_label_new ("");
-	gchar *mem = g_strdup_printf(" <b>%s :</b>", _("Feed view"));
+	gchar *mem = g_strdup_printf(" <b>%s: </b>", _("Feed view"));
 	gtk_label_set_markup_with_mnemonic(GTK_LABEL(label3), mem);
 	gtk_widget_show (label3);
 	gtk_box_pack_start (GTK_BOX (hbox2), label3, TRUE, TRUE, 0);
@@ -1504,10 +1504,10 @@
                         rf->cur_format ? "text-x-generic" : "text-html",
 			GTK_ICON_SIZE_BUTTON));
 
-	g_signal_connect (button, "clicked", G_CALLBACK(summary_cb), efh);
 	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_HALF);
-        gtk_widget_show (button);
+	g_signal_connect (button, "clicked", G_CALLBACK(summary_cb), efh);
 	gtk_box_pack_start (GTK_BOX (hbox2), button, TRUE, TRUE, 0);
+        gtk_widget_show (button);
 	if (rf->cur_format)
 	{
         	GtkWidget *button4 = gtk_button_new_from_stock (GTK_STOCK_GO_BACK);
@@ -1538,8 +1538,10 @@
 		gtk_widget_set_sensitive (button3, rf->online);
         	gtk_widget_show (button3);
 		gtk_box_pack_start (GTK_BOX (hbox2), button3, TRUE, TRUE, 0);
+//	gtk_widget_show (hbox2);
 	}
 	gtk_box_pack_start (GTK_BOX (vbox), hbox2, FALSE, FALSE, 0);
+	gtk_widget_show_all (vbox);
 
       	int width = vbox->allocation.width;
        	int height = vbox->allocation.height;

Modified: trunk/src/rss.h
==============================================================================
--- trunk/src/rss.h	(original)
+++ trunk/src/rss.h	Mon Feb 16 08:39:53 2009
@@ -323,6 +323,7 @@
 static void custom_feed_timeout(void);
 void gio_finish_feed (GObject *object, GAsyncResult *res, gpointer user_data);
 gchar *encode_rfc2047(gchar *str);
+CamelFolder *check_feed_folder(gchar *folder_name);
 
 
 typedef struct FEED_FOLDERS {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]