[evolution-rss] adapt to evo/eds changes part 1
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] adapt to evo/eds changes part 1
- Date: Sun, 29 Jul 2012 19:52:15 +0000 (UTC)
commit 08970c0271cf5956d419946bb926bab77c8c0d46
Author: Lucian Langa <lucilanga gnome org>
Date: Wed Jul 11 09:41:58 2012 +0200
adapt to evo/eds changes part 1
src/network-soup.c | 4 +++
src/network-soup.h | 6 ++++-
src/parser.c | 18 ++++++++++++-
src/parser.h | 7 ++++-
src/rss-cache.c | 5 ++++
src/rss-evo-common.c | 7 +++++
src/rss-evo-common.h | 4 +++
src/rss-image.c | 15 +++++++++++-
src/rss-image.h | 3 +-
src/rss.c | 63 +++++++++++++++++++++++++++++++++----------------
10 files changed, 105 insertions(+), 27 deletions(-)
---
diff --git a/src/network-soup.c b/src/network-soup.c
index 11b4c15..ec0ae4c 100644
--- a/src/network-soup.c
+++ b/src/network-soup.c
@@ -30,9 +30,13 @@
#include <libsoup/soup-gnome-features.h>
#endif
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
#if (DATASERVER_VERSION >= 2023001)
#include <libedataserver/e-proxy.h>
#endif
+#endif
extern int rss_verbose_debug;
diff --git a/src/network-soup.h b/src/network-soup.h
index eec3d76..82874e6 100644
--- a/src/network-soup.h
+++ b/src/network-soup.h
@@ -19,10 +19,14 @@
* vim: tabstop=4 shiftwidth=4 noexpandtab :
*/
-
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
#if (DATASERVER_VERSION >= 2023001)
#include <libedataserver/e-proxy.h>
#endif
+#endif
+
#include <libsoup/soup.h>
#ifdef HAVE_LIBSOUP_GNOME
#include <libsoup/soup-gnome.h>
diff --git a/src/parser.c b/src/parser.c
index 381166b..1e45323 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -30,13 +30,24 @@
#else
#include <mail/mail-ops.h>
#endif
+
+#if (EVOLUTION_VERSION > 30501)
+#include <em-format/e-mail-formatter.h>
+#else
#include <mail/em-format-html.h>
+#endif
+
#if (DATASERVER_VERSION >= 2031001)
#include <camel/camel.h>
#else
#include <camel/camel-url.h>
#endif
+
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
#include <libedataserver/e-data-server-util.h>
+#endif
extern int rss_verbose_debug;
@@ -49,7 +60,7 @@ extern int rss_verbose_debug;
#include "misc.h"
#include "network-soup.h"
-extern GConfClient *rss_gconf;
+//extern GConfClient *rss_gconf;
void asyncr_context_free(AsyncData *asyncr);
GQueue *display_channel_items_sync(AsyncData *ayncr);
@@ -945,7 +956,8 @@ tree_walk (xmlNodePtr root, RDF *r)
static const char *html_const[4] = {"img", "a", NULL};
gchar *
-process_images(gchar *text, gchar *link, gboolean decode, EMFormatHTML *format)
+//process_images(gchar *text, gchar *link, gboolean decode, EMFormatHTML *format)
+process_images(gchar *text, gchar *link, gboolean decode, EMailFormatter *format)
{
xmlChar *buff = NULL;
guint size = 0;
@@ -1339,6 +1351,7 @@ display_channel_items_sync(AsyncData *asyncr)
subj = g_strdup(CF->subj);
ftotal++;
+#if 0
if (gconf_client_get_bool(rss_gconf, GCONF_KEY_DOWNLOAD_ENCLOSURES, NULL)) {
if (CF->encl) {
process_enclosure(CF);
@@ -1348,6 +1361,7 @@ display_channel_items_sync(AsyncData *asyncr)
goto done;
}
}
+#endif
if (!freeze) {
camel_folder_freeze(mail_folder);
diff --git a/src/parser.h b/src/parser.h
index 274547c..2da8717 100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -20,7 +20,11 @@
#ifndef __PARSER_H__
#define __PARSER_H__
+#if (EVOLUTION_VERSION > 30501)
+#include <em-format/e-mail-formatter.h>
+#else
#include <mail/em-format-html.h>
+#endif
typedef struct {
RDF *r;
@@ -105,7 +109,8 @@ gchar *media_rss(xmlNode *node, gchar *search, gchar *fail);
gchar *dublin_core_rss(xmlNode *node, gchar *fail);
void syndication_rss(void);
gchar *wfw_rss(xmlNode *node, gchar *fail);
-gchar *process_images(gchar *text, gchar *link, gboolean decode, EMFormatHTML *format);
+//gchar *process_images(gchar *text, gchar *link, gboolean decode, EMFormatHTML *format);
+gchar *process_images(gchar *text, gchar *link, gboolean decode, EMailFormatter *format);
#endif /*__RSS_H__*/
diff --git a/src/rss-cache.c b/src/rss-cache.c
index 816f4ba..38fab90 100644
--- a/src/rss-cache.c
+++ b/src/rss-cache.c
@@ -24,7 +24,12 @@
#include <camel/camel-data-cache.h>
#include <camel/camel-file-utils.h>
#endif
+
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
#include <libedataserver/e-data-server-util.h>
+#endif
#include "rss.h"
#include "rss-cache.h"
diff --git a/src/rss-evo-common.c b/src/rss-evo-common.c
index 70582e0..6a9fa75 100644
--- a/src/rss-evo-common.c
+++ b/src/rss-evo-common.c
@@ -35,7 +35,14 @@
#endif
#include <mail/e-mail-reader.h>
#include <mail/em-folder-utils.h>
+
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
+#if (DATASERVER_VERSION >= 2023001)
#include <libedataserver/e-proxy.h>
+#endif
+#endif
#ifdef HAVE_LIBSOUP_GNOME
diff --git a/src/rss-evo-common.h b/src/rss-evo-common.h
index bd682ee..1b5d030 100644
--- a/src/rss-evo-common.h
+++ b/src/rss-evo-common.h
@@ -22,7 +22,11 @@
#include <mail/e-mail-backend.h>
#include <camel/camel.h>
+#if EVOLUTION_VERSION > 30501
+#include <libedataserver/libedataserver.h>
+#else
#include <libedataserver/e-proxy.h>
+#endif
struct _copy_folder_data {
#if EVOLUTION_VERSION >= 30101
diff --git a/src/rss-image.c b/src/rss-image.c
index 166c9ef..71c69b1 100644
--- a/src/rss-image.c
+++ b/src/rss-image.c
@@ -20,9 +20,21 @@
#include <glib.h>
#include <glib/gstdio.h>
#include <camel/camel.h>
+
+#if (DATASERVER_VERSION > 3005001)
+#include <libedataserver/libedataserver.h>
+#else
#include <libedataserver/e-data-server-util.h>
+#endif
+
#include <mail/em-folder-tree.h>
+
+#if (EVOLUTION_VERSION > 30501)
+#include <em-format/e-mail-formatter.h>
+#else
#include <mail/em-format-html.h>
+#endif
+
#include <sys/time.h>
#include <string.h>
@@ -594,7 +606,8 @@ file_is_image(gchar *image, gboolean cleanup)
* because we could end up with wrong file as image
*/
gchar *
-verify_image(gchar *uri, EMFormatHTML *format)
+//verify_image(gchar *uri, EMFormatHTML *format)
+verify_image(gchar *uri, EMailFormatter *format)
{
gchar *nurl, *turl;
gchar *feed_dir, *name;
diff --git a/src/rss-image.h b/src/rss-image.h
index ff7045e..e418d79 100644
--- a/src/rss-image.h
+++ b/src/rss-image.h
@@ -44,7 +44,8 @@ finish_create_icon_stream (SoupSession *soup_sess,
SoupMessage *msg, FEED_IMAGE *user_data);
#endif
-gchar *verify_image(gchar *uri, EMFormatHTML *format);
+//gchar *verify_image(gchar *uri, EMFormatHTML *format);
+gchar *verify_image(gchar *uri, EMailFormatter *format);
void
#if LIBSOUP_VERSION < 2003000
diff --git a/src/rss.c b/src/rss.c
index cf95ce4..0c020fb 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -96,11 +96,14 @@ int rss_verbose_debug = 0;
#endif
#endif
+#if (EVOLUTION_VERSION > 30501)
+#include <em-format/e-mail-formatter.h>
+#else
+#include <mail/em-format-html.h>
#if EVOLUTION_VERSION >= 30400
#include <mail/em-format-hook.h>
#endif
-
-//#include <mail/em-format-html.h>
+#endif
#include <sys/types.h>
#include <dirent.h>
@@ -239,9 +242,12 @@ typedef struct _EMFormatRSSControlsPURI EMFormatRSSControlsPURI;
struct _EMFormatRSSControlsPURI {
- EMFormatPURI puri;
+ //EMFormatPURI puri;
+ EMailPart puri;
+
+ //EMFormatHTML *format;
+ EMailFormatter *format;
- EMFormatHTML *format;
GtkWidget *html;
GtkWidget *container;
GtkWidget *forwbut; //browser forward button
@@ -298,7 +304,8 @@ gint browser_fill = 0; //how much data currently written to browser
gchar *process_feed(RDF *r);
gchar *display_doc (RDF *r);
-gchar *display_comments (RDF *r, EMFormatHTML *format);
+//gchar *display_comments (RDF *r, EMFormatHTML *format);
+gchar *display_comments (RDF *r, EMailFormatter *format);
void check_folders(void);
CamelMimePart *file_to_message(const char *name);
void check_feed_age(void);
@@ -307,11 +314,14 @@ gboolean display_feed_async(gpointer key);
gboolean fetch_one_feed(gpointer key, gpointer value, gpointer user_data);
gboolean fetch_feed(gpointer key, gpointer value, gpointer user_data);
gboolean custom_fetch_feed(gpointer key, gpointer value, gpointer user_data);
-void fetch_comments(gchar *url, gchar *mainurl, EMFormatHTML *stream);
+//void fetch_comments(gchar *url, gchar *mainurl, EMFormatHTML *stream);
+void fetch_comments(gchar *url, gchar *mainurl, EMailFormatter *stream);
guint fallback_engine(void);
-gchar *print_comments(gchar *url, gchar *stream, EMFormatHTML *format);
+//gchar *print_comments(gchar *url, gchar *stream, EMFormatHTML *format);
+gchar *print_comments(gchar *url, gchar *stream, EMailFormatter *format);
+
//static void refresh_cb (GtkWidget *button, EMFormatHTMLPObject *pobject);
#ifdef HAVE_WEBKIT
@@ -1034,14 +1044,15 @@ summary_cb (GtkWidget *button, EMFormatHTMLPObject *pobject)
}*/
static void
-summary_cb (GtkWidget *button, EMFormatPURI *puri)
+//summary_cb (GtkWidget *button, EMFormatPURI *puri)
+summary_cb (GtkWidget *button, EMailPart *puri)
{
rf->cur_format = rf->cur_format^1;
rf->chg_format = 1;
//#if EVOLUTION_VERSION >= 23190
// em_format_queue_redraw((EMFormat *)puri);
//#else
- em_format_redraw((EMFormat *)puri);
+ //em_format_redraw((EMFormat *)puri);
//#endif
}
@@ -1799,8 +1810,9 @@ rss_get_mail_session(void)
static GtkWidget *
org_gnome_rss_browser (EMFormat *emf,
- EMFormatPURI *puri,
- GCancellable *cancellable)
+ //EMFormatPURI *puri,
+ EMailPart *puri,
+ GCancellable *cancellable)
{
GtkWidget *box;
EMFormatRSSControlsPURI *po = (EMFormatRSSControlsPURI *) puri;
@@ -2043,7 +2055,8 @@ org_gnome_rss_rfrcomm (EMFormatHTML *efh, void *eb,
static GtkWidget *
org_gnome_rss_controls (EMFormat *emf,
- EMFormatPURI *puri,
+ //EMFormatPURI *puri,
+ EMailPart *puri,
GCancellable *cancellable)
{
GtkWidget *box;
@@ -2316,7 +2329,8 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
static void
write_rss_controls (EMFormat *emf,
- EMFormatPURI *puri,
+ //EMFormatPURI *puri,
+ EMailPart *puri,
CamelStream *stream,
EMFormatWriterInfo *info,
GCancellable *cancellable)
@@ -2332,7 +2346,8 @@ write_rss_controls (EMFormat *emf,
static void
write_rss_content (EMFormat *emf,
- EMFormatPURI *puri,
+ //EMFormatPURI *puri,
+ EMailPart *puri,
CamelStream *stream,
EMFormatWriterInfo *info,
GCancellable *cancellable)
@@ -2344,7 +2359,8 @@ write_rss_content (EMFormat *emf,
static void
write_rss_error (EMFormat *emf,
- EMFormatPURI *puri,
+ //EMFormatPURI *puri,
+ EMailPart *puri,
CamelStream *stream,
EMFormatWriterInfo *info,
GCancellable *cancellable)
@@ -3984,14 +4000,16 @@ void
#if LIBSOUP_VERSION < 2003000
finish_comments (SoupMessage *msg, EMFormatHTML *user_data);
#else
-finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMFormatHTML *user_data);
+//finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMFormatHTML *user_data);
+finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMailFormatter *user_data);
#endif
void
#if LIBSOUP_VERSION < 2003000
finish_comments (SoupMessage *msg, EMFormatHTML *user_data)
#else
-finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMFormatHTML *user_data)
+//finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMFormatHTML *user_data)
+finish_comments (SoupSession *soup_sess, SoupMessage *msg, EMailFormatter *user_data)
#endif
{
guint reload=0;
@@ -4035,7 +4053,8 @@ refresh_cb (GtkWidget *button, EMFormatHTMLPObject *pobject)
#endif
gchar *
-print_comments(gchar *url, gchar *stream, EMFormatHTML *format)
+//print_comments(gchar *url, gchar *stream, EMFormatHTML *format)
+print_comments(gchar *url, gchar *stream, EMailFormatter *format)
{
RDF *r = NULL;
xmlDocPtr doc;
@@ -4064,7 +4083,8 @@ print_comments(gchar *url, gchar *stream, EMFormatHTML *format)
void
-fetch_comments(gchar *url, gchar *mainurl, EMFormatHTML *stream)
+//fetch_comments(gchar *url, gchar *mainurl, EMFormatHTML *stream)
+fetch_comments(gchar *url, gchar *mainurl, EMailFormatter *stream)
{
GError *err = NULL;
SoupSession *comm_sess = NULL;
@@ -5645,12 +5665,13 @@ file_to_message(const char *filename)
#else
camel_object_unref(content);
#endif
-
+#if 0
#if EVOLUTION_VERSION < 22900
type = em_utils_snoop_type(msg);
#else
type = em_format_snoop_type(msg);
#endif
+#endif
if (type)
camel_data_wrapper_set_mime_type((CamelDataWrapper *)msg, type);
@@ -5903,7 +5924,7 @@ update_comments(RDF *r)
}
gchar *
-display_comments (RDF *r, EMFormatHTML *format)
+display_comments (RDF *r, EMailFormatter *format)
{
gchar *tmp;
xmlNodePtr root = xmlDocGetRootElement (r->cache);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]