File evolution-rss-evo3.11.91.patch of Package evolution-rss
Index: evolution-rss-0.3.93/configure.ac
===================================================================
--- evolution-rss-0.3.93.orig/configure.ac
+++ evolution-rss-0.3.93/configure.ac
@@ -92,11 +92,17 @@ if test "$EVOLUTION_BASE_VERSION_S" = "-
EVOLUTION_ADDITIONAL="libemail-engine"
fi
+EVOLUTION_PLUGIN_CHECK="evolution-plugin$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED"
+
+if test "$evolution_version_int" -ge "31191"; then
+ EVOLUTION_PLUGIN_CHECK=
+fi
+
PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
[ glib-2.0 >= $LIBGLIB_REQUIRED dnl
gtk+-$LIBGTK_VERSION.0 >= $LIBGTK_REQUIRED dnl
libsoup$SOUP >= $LIBSOUP_REQUIRED dnl
- evolution-plugin$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl
+ $EVOLUTION_PLUGIN_CHECK dnl
evolution-shell$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl
$EVOLUTION_ADDITIONAL dnl
libebook-1.2 dnl
Index: evolution-rss-0.3.93/m4/evolution.m4
===================================================================
--- evolution-rss-0.3.93.orig/m4/evolution.m4
+++ evolution-rss-0.3.93/m4/evolution.m4
@@ -78,10 +78,17 @@ AC_SUBST(MINOR_VERSION)
dnl Evolution plugin install directory
AC_ARG_WITH(plugin-install-dir, [ --with-plugin-install-dir=PATH path to evolution plugin directory])
if test "x$with_plugin_install_dir" = "x"; then
- PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-plugin$EVOLUTION_BASE_VERSION_S`
- if test "x$PLUGIN_INSTALL_DIR" = "x"; then
- AC_MSG_ERROR(Unable to find plugin directory)
- break;
+ if test "$evolution_version_int" -ge "031191"; then
+ PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-shell$EVOLUTION_BASE_VERSION_S`
+ if test "x$PLUGIN_INSTALL_DIR" = "x"; then
+ PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=privlibdir evolution-shell$EVOLUTION_BASE_VERSION_S`/plugins
+ fi
+ else
+ PLUGIN_INSTALL_DIR=`$PKG_CONFIG --variable=plugindir evolution-plugin$EVOLUTION_BASE_VERSION_S`
+ if test "x$PLUGIN_INSTALL_DIR" = "x"; then
+ AC_MSG_ERROR(Unable to find plugin directory)
+ break;
+ fi
fi
fi
AC_SUBST(PLUGIN_INSTALL_DIR)
@@ -97,7 +104,11 @@ fi
AC_SUBST(ICON_DIR)
dnl Evolution e-error install directory
-ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-plugin$EVOLUTION_BASE_VERSION_S`
+if test "$evolution_version_int" -ge "031191"; then
+ ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-shell$EVOLUTION_BASE_VERSION_S`
+else
+ ERROR_DIR=`$PKG_CONFIG --variable=errordir evolution-plugin$EVOLUTION_BASE_VERSION_S`
+fi
if test "x$ERROR_DIR" = "x"; then
AC_MSG_ERROR(Unable to find error file directory)
fi
@@ -107,7 +118,7 @@ dnl test required for bonobo server inst
dnl dnl user might specify wrong prefix or not specify at all
AC_ARG_WITH(bonobo-servers-dir, [ --with-bonobo-servers-dir=PATH path to bonobo servers directory])
if test "x$with_bonobo_servers_dir" = "x" ; then
- BONOBO_LIBDIR=`$PKG_CONFIG --variable=libdir evolution-plugin$EVOLUTION_BASE_VERSION_S`
+ BONOBO_LIBDIR=`$PKG_CONFIG --variable=libdir evolution-shell$EVOLUTION_BASE_VERSION_S`
if test "x$BONOBO_LIBDIR" = "x"; then
AC_MSG_ERROR(Unable to find bonobo servers file directory)
fi
Index: evolution-rss-0.3.93/src/network-soup.c
===================================================================
--- evolution-rss-0.3.93.orig/src/network-soup.c
+++ evolution-rss-0.3.93/src/network-soup.c
@@ -288,7 +288,7 @@ proxify_webkit_session_async(EProxy *pro
case 0:
soup_session_add_feature_by_type (
webkit_session,
- SOUP_TYPE_PROXY_RESOLVER_GNOME);
+ SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
break;
#endif
}
@@ -337,7 +337,7 @@ proxify_session(EProxy *proxy, SoupSessi
#ifdef HAVE_LIBSOUP_GNOME
case 0:
soup_session_add_feature_by_type (
- session, SOUP_TYPE_PROXY_RESOLVER_GNOME);
+ session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
break;
#endif
}
@@ -464,7 +464,7 @@ proxify_session_async(EProxy *proxy, STN
#ifdef HAVE_LIBSOUP_GNOME
case 0:
soup_session_add_feature_by_type (
- stnet->ss, SOUP_TYPE_PROXY_RESOLVER_GNOME);
+ stnet->ss, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
break;
#endif
}
@@ -1240,7 +1240,7 @@ rss_soup_init(void)
g_free(feed_dir);
rss_soup_jar =
- soup_cookie_jar_sqlite_new (cookie_path, FALSE);
+ soup_cookie_jar_db_new (cookie_path, FALSE);
if (!g_file_test(moz_cookie_path, G_FILE_TEST_EXISTS|G_FILE_TEST_IS_SYMLINK)) {
sync_gecko_cookies();
Index: evolution-rss-0.3.93/src/rss-config-factory.c
===================================================================
--- evolution-rss-0.3.93.orig/src/rss-config-factory.c
+++ evolution-rss-0.3.93/src/rss-config-factory.c
@@ -3016,7 +3016,7 @@ import_cookies(gchar *file)
fclose(f);
if (!g_ascii_strncasecmp(header, SQLITE_MAGIC, sizeof(SQLITE_MAGIC))) {
#ifdef HAVE_LIBSOUP_GNOME
- jar = soup_cookie_jar_sqlite_new(file, TRUE);
+ jar = soup_cookie_jar_db_new(file, TRUE);
#else
g_print("Importing sqlite format requires libsoup-gnome\n");
#endif
Index: evolution-rss-0.3.93/src/misc.c
===================================================================
--- evolution-rss-0.3.93.orig/src/misc.c
+++ evolution-rss-0.3.93/src/misc.c
@@ -31,6 +31,7 @@
#include <camel/camel-mime-utils.h>
#endif
+#include <mail/e-mail-reader-utils.h>
#include "rss.h"
#include "parser.h"
@@ -683,3 +684,9 @@ textcb(NetStatusType status, gpointer st
#endif
+gchar *
+rss_component_peek_base_directory(void)
+{
+ return g_strdup_printf("%s" G_DIR_SEPARATOR_S "rss",
+ mail_session_get_data_dir ());
+}
Index: evolution-rss-0.3.93/src/misc.h
===================================================================
--- evolution-rss-0.3.93.orig/src/misc.h
+++ evolution-rss-0.3.93/src/misc.h
@@ -53,5 +53,6 @@ void write_feed_status_line(gchar *file,
void dup_auth_data(gchar *origurl, gchar *url);
void sanitize_path_separator(gchar *);
void textcb(NetStatusType status, gpointer statusdata, gpointer data);
+gchar *rss_component_peek_base_directory(void);
#endif
Index: evolution-rss-0.3.93/src/rss-formatter.c
===================================================================
--- evolution-rss-0.3.93.orig/src/rss-formatter.c
+++ evolution-rss-0.3.93/src/rss-formatter.c
@@ -172,11 +172,3 @@ rss_get_display(void)
reader = E_MAIL_READER (shell_content);
return e_mail_reader_get_mail_display (reader);
}
-
-gchar *
-rss_component_peek_base_directory(void)
-{
- return g_strdup_printf("%s" G_DIR_SEPARATOR_S "rss",
- mail_session_get_data_dir ());
-}
-
Index: evolution-rss-0.3.93/src/rss-formatter.h
===================================================================
--- evolution-rss-0.3.93.orig/src/rss-formatter.h
+++ evolution-rss-0.3.93/src/rss-formatter.h
@@ -28,7 +28,6 @@ gchar *rss_process_feed(gchar *feed, gui
gchar *rss_process_website(gchar *content, gchar *website);
gboolean rss_get_current_view(void);
void rss_set_current_view(gboolean value);
-gchar *rss_component_peek_base_directory(void);
gboolean rss_get_changed_view(void);
void rss_set_changed_view(gboolean value);
gboolean rss_get_is_html(gchar *feedid);
Index: evolution-rss-0.3.93/src/e-mail-formatter-evolution-rss.c
===================================================================
--- evolution-rss-0.3.93.orig/src/e-mail-formatter-evolution-rss.c
+++ evolution-rss-0.3.93/src/e-mail-formatter-evolution-rss.c
@@ -91,13 +91,23 @@ emfe_evolution_rss_format (EMailFormatte
EMailFormatter *formatter,
EMailFormatterContext *context,
EMailPart *part,
+#if EVOLUTION_VERSION < 31191
CamelStream *stream,
+#else
+ GOutputStream *stream,
+#endif
GCancellable *cancellable)
{
- CamelStream *decoded_stream;
CamelDataWrapper *dw;
gchar *str;
+#if EVOLUTION_VERSION < 31191
+ CamelStream *decoded_stream;
GByteArray *ba;
+#else
+ GOutputStream *decoded_stream;
+ gpointer data;
+ gsize len;
+#endif
gchar *src;
CamelMimePart *message = e_mail_part_ref_mime_part (part);
gchar *website, *subject, *category, *feedid, *comments;
@@ -123,8 +133,13 @@ emfe_evolution_rss_format (EMailFormatte
"height=\"0\" width=\"100%%\" data=\"%s\" id=\"%s\"></object>",
e_mail_part_get_id(part),
e_mail_part_get_id(part));
+#if EVOLUTION_VERSION < 31191
camel_stream_write_string (
stream, str, cancellable, NULL);
+#else
+ g_output_stream_write_all(stream, str,
+ strlen(str), NULL, cancellable, NULL);
+#endif
gchar *h = g_strdup(e_web_view_get_html (E_WEB_VIEW (rss_get_display())));
website = camel_medium_get_header (
@@ -189,25 +204,53 @@ emfe_evolution_rss_format (EMailFormatte
text_col & 0xffffff,
iconfile, website, subject);
+#if EVOLUTION_VERSION < 31191
camel_stream_write_string (
stream, str, cancellable, NULL);
+#else
+ g_output_stream_write_all(stream, str,
+ strlen(str), NULL, cancellable, NULL);
+#endif
+#if EVOLUTION_VERSION < 31191
decoded_stream = camel_stream_mem_new ();
+#else
+ decoded_stream = g_memory_output_stream_new_resizable ();
+#endif
e_mail_formatter_format_text (
formatter, part, decoded_stream, cancellable);
+#if EVOLUTION_VERSION < 31191
g_seekable_seek (G_SEEKABLE (decoded_stream), 0, G_SEEK_SET, cancellable, NULL);
ba = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (decoded_stream));
src = rss_process_feed((gchar *)ba->data, ba->len);
+#else
+ data = g_memory_output_stream_get_data (
+ G_MEMORY_OUTPUT_STREAM (decoded_stream));
+ len = g_memory_output_stream_get_data_size (
+ G_MEMORY_OUTPUT_STREAM (decoded_stream));
+ src = rss_process_feed((gchar *)data, len);
+#endif
+#if EVOLUTION_VERSION < 31191
camel_stream_write_string(stream, src, cancellable, NULL);
+#else
+ g_output_stream_write_all(stream, src, strlen(src), NULL, cancellable, NULL);
+#endif
g_free(src);
g_object_unref (decoded_stream);
+#if EVOLUTION_VERSION < 31191
camel_stream_write_string (
stream, "</div></div>", cancellable, NULL);
+#else
+ gchar *tstr = g_strdup("</div></div>");
+ g_output_stream_write_all(stream, tstr,
+ strlen(tstr), NULL, cancellable, NULL);
+ g_free(tstr);
+#endif
} else {
GError *err = NULL;
gchar *str;
@@ -226,12 +269,28 @@ emfe_evolution_rss_format (EMailFormatte
frame_col & 0xffffff,
cont_col & 0xffffff,
text_col & 0xffffff);
+#if EVOLUTION_VERSION < 31191
camel_stream_write_string (stream, str, cancellable, NULL);
- g_free (str);
camel_stream_write_string (stream, "<div style=\"border: solid 0px; padding: 4px;\">\n", cancellable, NULL);
camel_stream_write_string (stream, "<h3>Error!</h3>", cancellable, NULL);
camel_stream_write_string (stream, err->message, cancellable, NULL);
camel_stream_write_string (stream, "</div>", cancellable, NULL);
+#else
+ g_output_stream_write_all(stream, str, strlen(str), NULL, cancellable, NULL);
+ gchar *tstr;
+ tstr = g_strdup("<div style=\"border: solid 0px; padding: 4px;\">\n");
+ g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL);
+ g_free(tstr);
+ tstr = g_strdup("<h3>Error!</h3>");
+ g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL);
+ g_free(tstr);
+ g_output_stream_write_all(stream, err->message, strlen(err->message), NULL, cancellable, NULL);
+ tstr = g_strdup("</div>");
+ g_output_stream_write_all(stream, tstr, strlen(tstr), NULL, cancellable, NULL);
+ g_free(tstr);
+#endif
+ g_free (str);
+
return TRUE;
}