[evolution-rss/evolution-rss-0-2-0] fix sending out rss messages
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss/evolution-rss-0-2-0] fix sending out rss messages
- Date: Fri, 3 Dec 2010 22:27:50 +0000 (UTC)
commit 17e1f8553f9abc2322dbe07893df75aa14cec7f1
Author: Lucian Langa <lucilanga gnome org>
Date: Sat Dec 4 00:19:37 2010 +0200
fix sending out rss messages
configure.ac | 26 +++++++++++++++-----------
src/parser.c | 25 +++++++------------------
2 files changed, 22 insertions(+), 29 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 41d921a..a14e77e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,6 +86,9 @@ EVOLUTION_REQUIRED=2.4.1
LIBSOUP_REQUIRED=2.2
LIBGTKHTML_REQUIRED=3.18.3
+GTKHTML_VERSION="libgtkhtml-3.14"
+GTKHTML_EDITOR_VERSION="gtkhtml-editor-3.14"
+
PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
[ glib-2.0 >= $LIBGLIB_REQUIRED dnl
gtk+-2.0 >= $LIBGTK_REQUIRED dnl
@@ -95,11 +98,11 @@ PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
libebook-1.2 dnl
libgnomecanvas-2.0 dnl
dnl evolution-data-server-1.2 dnl
- libgtkhtml-3.14 >= $LIBGTKHTML_REQUIRED
+ $GTKHTML_VERSION >= $LIBGTKHTML_REQUIRED
])
-PKG_CHECK_MODULES([GTKHTML_EDITOR], gtkhtml-editor, [GTKHTMLEDITOR=YES], [GTKHTMLEDITOR=NO])
-if test "x$GTKHTMLEDITOR" == "xYES"; then
+PKG_CHECK_MODULES([GTKHTML_EDITOR], $GTKHTML_EDITOR_VERSION, [GTKHTMLEDITOR=yes], [GTKHTMLEDITOR=no])
+if test "x$GTKHTMLEDITOR" == "xyes"; then
AC_DEFINE_UNQUOTED(HAVE_GTKHTMLEDITOR, 1, [gthtml editor component present])
AC_SUBST(HAVE_GTKHTMLEDITOR)
AC_SUBST(GTKHTML_EDITOR_CFLAGS)
@@ -431,13 +434,14 @@ AC_OUTPUT
echo "
Evolution RSS plugin successfully configured
- Source code location : $srcdir
- Installation path : $PLUGIN_INSTALL_DIR
- Prefix : $prefix
- HTML renders : $kits
- Primary HTML render : $RENDER
- D-BUS support : $have_dbus_build
- libsoup-gnome support : $have_libsoup_gnome
- Import feeds : $import_feeds
+ Source code location : $srcdir
+ Installation path : $PLUGIN_INSTALL_DIR
+ Prefix : $prefix
+ HTML renders : $kits
+ html editor (send mail as rss) : $GTKHTMLEDITOR
+ Primary HTML render : $RENDER
+ D-BUS support : $have_dbus_build
+ libsoup-gnome support : $have_libsoup_gnome
+ Import feeds : $import_feeds
"
diff --git a/src/parser.c b/src/parser.c
index c989f6a..6cf9e9a 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -56,9 +56,8 @@ rss_html_url_decode(const char *html, int len)
{
xmlDoc *src = NULL;
xmlDoc *doc = NULL;
- gchar *url, *tmpurl;
- gchar *base_dir = rss_component_peek_base_directory();
- gchar *feed_dir;
+ gchar *url;
+ gchar *duri = NULL;
src = (xmlDoc *)parse_html_sux(html, len);
@@ -67,29 +66,19 @@ rss_html_url_decode(const char *html, int len)
doc = src;
- feed_dir = g_build_path(G_DIR_SEPARATOR_S,
- base_dir,
- "static",
- "http",
- NULL);
- g_free(base_dir);
-
while ((doc = (xmlDoc *)html_find((xmlNode *)doc, (gchar *)"img"))) {
if ((url = (gchar *)xmlGetProp((xmlNodePtr)doc, (xmlChar *)"src"))) {
- if (strstr(url, feed_dir) == NULL) {
- g_free(feed_dir);
- return NULL;
+ if (strstr(url, "img:")) {
+ gchar *tmp = decode_image_cache_filename(url);
+ duri = g_strconcat("file://", tmp, NULL);
+ g_free(tmp);
}
- tmpurl = camel_url_decode_path(
- strstr(url, "http:"));
xmlSetProp(
(xmlNodePtr)doc,
(xmlChar *)"src",
- (xmlChar *)tmpurl);
- g_free(tmpurl);
+ (xmlChar *)duri);
}
}
- g_free(feed_dir);
return src;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]