[evolution-rss] make feed enclosures work again



commit b346c380ce0ddbd004169828d5b3ee2d92a92583
Author: Lucian Langa <lucilanga gnome org>
Date:   Fri Feb 13 23:09:54 2015 +0100

    make feed enclosures work again

 src/parser.c |   19 +++++++++++++++----
 src/rss.c    |    9 +++++++++
 2 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/src/parser.c b/src/parser.c
index cc95086..1d7847d 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -1,5 +1,5 @@
 /*  Evoution RSS Reader Plugin
- *  Copyright (C) 2007-2010 Lucian Langa <cooly gnome eu org>
+ *  Copyright (C) 2007-2015 Lucian Langa <cooly gnome eu org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -69,7 +69,11 @@ extern int rss_verbose_debug;
 #include "misc.h"
 #include "network-soup.h"
 
-//extern GConfClient *rss_gconf;
+#if EVOLUTION_VERSION < 30304
+extern GConfClient *rss_gconf;
+#else
+static GSettings *rss_settings;
+#endif
 void asyncr_context_free(AsyncData *asyncr);
 GQueue *display_channel_items_sync(AsyncData *ayncr);
 
@@ -1354,8 +1358,16 @@ display_channel_items_sync(AsyncData *asyncr)
                subj = g_strdup(CF->subj);
 
                ftotal++;
-#if 0
+#if EVOLUTION_VERSION < 30304
+               GConfClient *client = gconf_client_get_default();
+#else
+               rss_settings = g_settings_new(RSS_CONF_SCHEMA);
+#endif
+#if EVOLUTION_VERSION < 30304
                if (gconf_client_get_bool(rss_gconf, GCONF_KEY_DOWNLOAD_ENCLOSURES, NULL)) {
+#else
+               if (g_settings_get_boolean(rss_settings, CONF_DOWNLOAD_ENCLOSURES)) {
+#endif
                        if (CF->encl) {
                                process_enclosure(CF);
                                goto done;
@@ -1364,7 +1376,6 @@ display_channel_items_sync(AsyncData *asyncr)
                                goto done;
                        }
                }
-#endif
 
                if (!freeze) {
                        camel_folder_freeze(mail_folder);
diff --git a/src/rss.c b/src/rss.c
index c28571b..983434a 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -540,6 +540,11 @@ download_chunk(
                progress = (NetStatusProgress*)statusdata;
                if (progress->current > 0 && progress->total > 0) {
 #if EVOLUTION_VERSION < 30304
+                       rss_gconf = gconf_client_get_default();
+#else
+                       rss_settings = g_settings_new(RSS_CONF_SCHEMA);
+#endif
+#if EVOLUTION_VERSION < 30304
                        guint encl_max_size = (gint)gconf_client_get_float(
                                rss_gconf, GCONF_KEY_ENCLOSURE_SIZE, NULL);
 #else
@@ -1304,7 +1309,11 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
 
        editor = e_msg_composer_get_editor (t->composer);
        view = e_html_editor_get_view (editor);
+#if EVOLUTION_VERSION >= 31390
+       text = e_html_editor_view_get_text_html (view, NULL, NULL);
+#else
        text = e_html_editor_view_get_text_html (view);
+#endif
        length = strlen (text);
 #else
        /* unfortunately e_msg_composer does not have raw get/set text body


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