Commit 317403ed authored by Lucian Langa's avatar Lucian Langa Committed by Lucian Langa
Browse files

- misc code cleanups

2009-03-27  Lucian Langa  <lucilanga@gnome.org>

* src/rss.c,src/parser.c: - misc code cleanups

svn path=/trunk/; revision=479
parent ac9f41f8
2009-03-27 Lucian Langa <lucilanga@gnome.org>
* src/rss.c,src/parser.c: - misc code cleanups
2009-03-26 Philip Withnall <philip@tecnocode.co.uk>
* configure.ac: Added en_GB to ALL_LINGUAS.
......
......@@ -52,10 +52,7 @@
* add icon to feed setup panel
* add handling parser error to setup_feed (check HIG for error msg)
* handle slash categories
* add feed logo in title
* use favico if feed does not provide an icon
* hook update in the properties of folder
* search favicon in the subdomain->domain
* use combo popup for moving and placement of feed folders
* trigger resync after folder rename
* check webbuttons for webkit
......
......@@ -406,7 +406,7 @@ net_get_status(const char *url, GError **err)
SoupURI *suri = NULL;
#endif
SoupMessage *req = NULL;
guint response = NULL;
guint response = 0;
SoupSession *soup_sess = NULL;
GSList *headers;
......@@ -640,6 +640,6 @@ out:
void
rss_soup_init(void)
{
// SoupCookieJar *soup_jar;
// soup_jar = soup_cookie_jar_sqlite_new ("/home/cooly/.newcookies.sqlite", TRUE);
// SoupCookieJar *soup_jar;
// soup_jar = soup_cookie_jar_sqlite_new ("/home/cooly/.newcookies.sqlite", TRUE);
}
......@@ -391,7 +391,7 @@ layer_find (xmlNodePtr node,
/* returns all matched nodes disregarding type
*/
static char *
GList *
layer_find_all (xmlNodePtr node,
char *match,
char *fail)
......@@ -416,7 +416,7 @@ layer_find_all (xmlNodePtr node,
return category;
else {
g_list_free(category);
return fail;
return (GList *)fail;
}
}
......@@ -441,7 +441,7 @@ content_rss(xmlNode *node, gchar *fail)
return fail;
}
void
gchar *
dublin_core_rss(xmlNode *node, gchar *fail)
{
gchar *content;
......
......@@ -378,7 +378,7 @@ create_dialog_add(gchar *text, gchar *feed_text)
GtkWidget *radiobutton5 = (GtkWidget *)glade_xml_get_widget (gui, "ttl");
GtkWidget *radiobutton6 = (GtkWidget *)glade_xml_get_widget (gui, "ttl_disabled");
GtkWidget *ttl_value = (GtkWidget *)glade_xml_get_widget (gui, "ttl_value");
gtk_spin_button_set_range(ttl_value, 0, MAX_TTL);
gtk_spin_button_set_range((GtkSpinButton *)ttl_value, 0, (guint)MAX_TTL);
switch (del_feed)
{
......
......@@ -205,11 +205,12 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data);
#endif
static void
#if LIBSOUP_VERSION < 2003000
finish_create_image (SoupMessage *msg, CamelStream *user_data);
finish_create_image (SoupMessage *msg, gchar *user_data);
#else
finish_create_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data);
finish_create_image (SoupSession *soup_sess, SoupMessage *msg, gchar *user_data);
#endif
gchar *get_main_folder(void);
void fetch_comments(gchar *url, CamelStream *stream);
struct _MailComponentPrivate {
GMutex *lock;
......@@ -1794,11 +1795,16 @@ void org_gnome_cooly_format_rss(void *ep, EMFormatHookTarget *t) //camelmimepart
g_object_unref(pixbuf);
goto render_body;
}
gchar *iconfile = g_build_filename (EVOLUTION_ICONDIR,
"rss-16.png",
NULL);
camel_stream_printf (fstream,
"<div style=\"border: solid 0px; background-color: #%06x; padding: 2px; color: #%06x;\">"
"<img height=16 src=%s>"
"<b><font size=+1><a href=%s>%s</a></font></b></div>",
content_colour & 0xEDECEB & 0xffffff, text_colour & 0xffffff,
website, subject);
iconfile, website, subject);
g_free(iconfile);
render_body: if (category)
camel_stream_printf(fstream,
"<div style=\"border: solid 0px; background-color: #%06x; padding: 2px; color: #%06x;\">"
......@@ -1821,7 +1827,7 @@ render_body: if (category)
commstream = NULL;
}
else {
fetch_comments(comments, t->format);
fetch_comments(comments, (CamelStream *)t->format);
}
camel_stream_printf (fstream, "</div>");
}
......@@ -2772,7 +2778,7 @@ finish_update_feed_image (SoupSession *soup_sess, SoupMessage *msg, gpointer use
rfmsg->body = (gchar *)(msg->response_body->data);
rfmsg->length = msg->response_body->length;
#endif
xmlNode *app;
xmlChar *app;
xmlNode *doc = (xmlNode *)parse_html_sux (rfmsg->body, rfmsg->length);
while (doc) {
doc = html_find(doc, "link");
......@@ -4064,9 +4070,9 @@ finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data)
static void
#if LIBSOUP_VERSION < 2003000
finish_create_image (SoupMessage *msg, CamelStream *user_data)
finish_create_image (SoupMessage *msg, gchar *user_data)
#else
finish_create_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data)
finish_create_image (SoupSession *soup_sess, SoupMessage *msg, gchar *user_data)
#endif
{
g_print("finish_image(): status:%d, user_data;%s\n", msg->status_code);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment