[evolution-rss] update package requirements, bump configure.ac
- From: Lucian Langa <lucilanga src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-rss] update package requirements, bump configure.ac
- Date: Sun, 23 Aug 2009 08:01:31 +0000 (UTC)
commit fcbc3b7a8b7daa23e73e75ee212ba252526369e3
Author: Lucian Langa <lucilanga gnome org>
Date: Sun Aug 23 11:00:43 2009 +0300
update package requirements, bump configure.ac
configure.ac | 24 +++++++++++++++++++-----
src/Makefile.am | 4 +++-
src/fetch.c | 1 -
src/network-soup.c | 16 ++++++++++++++++
src/network-soup.h | 6 +++++-
src/rss-config-factory.c | 16 +++++++++++++++-
src/rss.c | 25 +++++++++++++++++++++++++
src/rss.h | 5 +++++
8 files changed, 88 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a3cd311..39bb084 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([evolution-rss], [0.1.3], http://bugzilla.gnome.org/enter_bug.cgi?product=evolution-rss)
+AC_INIT([evolution-rss], [0.1.4], http://bugzilla.gnome.org/enter_bug.cgi?product=evolution-rss)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE
@@ -49,21 +49,35 @@ fi
fi
dnl base packages and versions
-LIBGTK_REQUIRED=2.4.0
+LIBGLIB_REQUIRED=2.16.2
+LIBGTK_REQUIRED=2.12.0
EVOLUTION_REQUIRED=2.4.1
LIBSOUP_REQUIRED=2.2
LIBGLADE_REQUIRED=2.0
+LIBGTKHTML_REQUIRED=3.18.3
PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
-[ gtk+-2.0 >= $LIBGTK_REQUIRED dnl
+[ glib-2.0 >= $LIBGLIB_REQUIRED dnl
+ gtk+-2.0 >= $LIBGTK_REQUIRED dnl
libsoup$SOUP >= $LIBSOUP_REQUIRED dnl
evolution-plugin$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl
evolution-shell$EVOLUTION_BASE_VERSION_S >= $EVOLUTION_REQUIRED dnl
libglade-2.0 dnl
- libgtkhtml-3.14 dnl
- gtkhtml-editor dnl
+ libgtkhtml-3.14 >= $LIBGTKHTML_REQUIRED
])
+PKG_CHECK_MODULES([GTKHTML_EDITOR], gtkhtml-editor, [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)
+ AC_SUBST(GTKHTML_EDITOR_LIBS)
+fi
+
+DATASERVER_VERSION=`$PKG_CONFIG --modversion evolution-data-server-1.2`
+DATASERVER_VERSION=`echo $DATASERVER_VERSION|$AWK -F . '{print $1 * 1000000 + $2 * 1000 + $3}'`
+AC_SUBST(DATASERVER_VERSION)
+
dnl default renderer and fall it it in case no other render is found
RENDER=gtkhtml
RENDER_N=0
diff --git a/src/Makefile.am b/src/Makefile.am
index 3597213..f2255b4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,10 +5,12 @@ INCLUDES = \
$(RENDER_CFLAGS) \
$(DBUS_CFLAGS) \
$(LIBSOUP_GNOME_CFLAGS) \
+ $(GTKHTML_EDITOR_CFLAGS) \
-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\"" \
-DLOCALEDIR="\"$(LOCALEDIR)\"" \
-DEVOLUTION_VERSION_STRING=\"$(EVOLUTION_EXEC_VERSION)\"\
-DEVOLUTION_VERSION=$(evolution_exec_int) \
+ -DDATASERVER_VERSION=$(DATASERVER_VERSION) \
-DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \
-DEVOLUTION_ICONDIR=\""$(ICON_DIR)"\" \
-DGTK_VERSION="$(GTK_VERSION)" \
@@ -87,7 +89,7 @@ SOURCES+= dbus.c
endif
liborg_gnome_evolution_rss_la_SOURCES = $(SOURCES)
-liborg_gnome_evolution_rss_la_LIBADD = $(WEBKIT_LIBS) $(GECKO_LIBS) $(LIBSOUP_LIBS) $(NO_UNDEFINED_LIBS)
+liborg_gnome_evolution_rss_la_LIBADD = $(WEBKIT_LIBS) $(GECKO_LIBS) $(LIBSOUP_LIBS) $(GTKHTML_EDITOR_LIBS) $(NO_UNDEFINED_LIBS)
liborg_gnome_evolution_rss_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
#$(GECKO_RPATH)
diff --git a/src/fetch.c b/src/fetch.c
index 6d2bd5f..d10599b 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -21,7 +21,6 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
-#include "file-gio.h"
#include "network.h"
#include "file-gio.h"
#include "network-soup.h"
diff --git a/src/network-soup.c b/src/network-soup.c
index 5083970..57d11c4 100644
--- a/src/network-soup.c
+++ b/src/network-soup.c
@@ -28,7 +28,10 @@
#include <libsoup/soup-gnome.h>
#include <libsoup/soup-gnome-features.h>
#endif
+
+#if (DATASERVER_VERSION >= 2023001)
#include <libedataserver/e-proxy.h>
+#endif
#include "network.h"
#include "network-soup.h"
@@ -42,12 +45,16 @@
#define d(x)
+#if LIBSOUP_VERSION > 2024000
SoupCookieJar *rss_soup_jar = NULL;
+#endif
gint proxy_type = 0;
extern rssfeed *rf;
extern GConfClient *rss_gconf;
extern SoupSession *webkit_session;
+#if (DATASERVER_VERSION >= 2023001)
EProxy *proxy;
+#endif
typedef struct {
NetStatusCallback user_cb;
@@ -188,6 +195,7 @@ unblock_free (gpointer user_data, GObject *ex_msg)
soup_session_abort (user_data);
}
+#if (DATASERVER_VERSION >= 2023001)
EProxy *
proxy_init(void)
{
@@ -253,6 +261,7 @@ proxify_session(EProxy *proxy, SoupSession *session, gchar *uri)
}
}
+#endif
guint
read_up(gpointer data)
@@ -511,11 +520,16 @@ net_get_unblocking(gchar *url,
// soup_session_async_new_with_options(SOUP_SESSION_TIMEOUT, SS_TIMEOUT, NULL);
soup_session_async_new();
+
+#if LIBSOUP_VERSION > 2024000
if (rss_soup_jar) {
soup_session_add_feature(soup_sess, SOUP_SESSION_FEATURE(rss_soup_jar));
}
+#endif
+#if (DATASERVER_VERSION >= 2023001)
proxify_session(proxy, soup_sess, url);
+#endif
if (cb && data) {
info = g_new0(CallbackInfo, 1);
info->user_cb = cb;
@@ -643,7 +657,9 @@ net_post_blocking(gchar *url, GSList *headers, GString *post,
#endif
g_free(agstr);
+#if (DATASERVER_VERSION >= 2023001)
proxify_session(proxy, soup_sess, url);
+#endif
rf->b_session = soup_sess;
rf->b_msg_session = req;
soup_session_send_message(soup_sess, req);
diff --git a/src/network-soup.h b/src/network-soup.h
index 9cc3dfb..7d11b82 100644
--- a/src/network-soup.h
+++ b/src/network-soup.h
@@ -19,7 +19,9 @@
*/
+#if (DATASERVER_VERSION >= 2023001)
#include <libedataserver/e-proxy.h>
+#endif
void abort_all_soup(void);
gboolean cancel_soup_sess(gpointer key, gpointer value, gpointer user_data);
@@ -36,13 +38,15 @@ GString *net_post_blocking(gchar *url, GSList *headers, GString *post,
#define NET_ERROR net_error_quark()
int net_error_quark(void);
+#if (DATASERVER_VERSION >= 2023001)
+EProxy *proxy_init(void);
void proxify_webkit_session(EProxy *proxy, gchar *uri);
void proxify_session(EProxy *proxy, SoupSession *session, gchar *uri);
+#endif
guint save_up(gpointer data);
guint del_up(gpointer data);
void rss_soup_init(void);
-EProxy *proxy_init(void);
guint read_up(gpointer data);
void sync_gecko_cookies(void);
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 06557e1..67abc8e 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -64,7 +64,9 @@ extern gchar *buffer;
extern GSList *rss_list;
extern GConfClient *rss_gconf;
extern GHashTable *icons;
+#if LIBSOUP_VERSION > 2024000
extern SoupCookieJar *rss_soup_jar;
+#endif
#define RSS_CONTROL_ID "OAFIID:GNOME_Evolution_RSS:" EVOLUTION_VERSION_STRING
#define FACTORY_ID "OAFIID:GNOME_Evolution_RSS_Factory:" EVOLUTION_VERSION_STRING
@@ -1781,6 +1783,7 @@ export_opml(gchar *file)
}
+#if LIBSOUP_VERSION > 2024000
SoupCookieJar *
import_cookies(gchar *file)
{
@@ -1850,6 +1853,7 @@ process_cookies(SoupCookieJar *jar)
//copy gecko data over (gecko will open database locked exclusively)
sync_gecko_cookies();
}
+#endif
static void
select_export_response(GtkWidget *selector, guint response, gpointer user_data)
@@ -1868,6 +1872,7 @@ select_export_response(GtkWidget *selector, guint response, gpointer user_data)
}
+#if LIBSOUP_VERSION > 2024000
static void
select_import_cookies_response(GtkWidget *selector, guint response, gpointer user_data)
{
@@ -1887,6 +1892,7 @@ select_import_cookies_response(GtkWidget *selector, guint response, gpointer use
gtk_widget_destroy(selector);
}
+#endif
static void
decorate_export_fs (gpointer data)
@@ -1957,7 +1963,9 @@ decorate_import_cookies_fs (gpointer data)
gtk_file_filter_add_pattern (filter, "*.txt");
gtk_file_filter_add_pattern (filter, "*.sqilte");
gtk_file_chooser_set_filter(data, filter);
+#if LIBSOUP_VERSION > 2024000
g_signal_connect(data, "response", G_CALLBACK(select_import_cookies_response), data);
+#endif
g_signal_connect(data, "destroy", G_CALLBACK(gtk_widget_destroy), data);
}
@@ -2274,6 +2282,7 @@ rss_folder_factory (EPlugin *epl, EConfigHookItemFactoryData *data)
gchar *main_folder = lookup_main_folder();
gchar *folder = target->folder->full_name;
add_feed *feed = NULL;
+ GtkWidget *action_area;
//filter only rss folders
if (folder == NULL
@@ -2292,7 +2301,12 @@ rss_folder_factory (EPlugin *epl, EConfigHookItemFactoryData *data)
if (url) {
feed = build_dialog_add(url, ofolder);
//we do not need ok/cancel buttons here
- GtkWidget *action_area = gtk_dialog_get_action_area(GTK_DIALOG(feed->dialog));
+
+#if GTK_VERSION >= 2014000
+ action_area = gtk_dialog_get_action_area(GTK_DIALOG(feed->dialog));
+#else
+ action_area = GTK_DIALOG (feed->dialog)->action_area;
+#endif
gtk_widget_hide(action_area);
gtk_widget_ref(feed->child);
gtk_container_remove (GTK_CONTAINER (feed->child->parent), feed->child);
diff --git a/src/rss.c b/src/rss.c
index 6a2537b..727916b 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -48,8 +48,10 @@ int rss_verbose_debug = 0;
#include <mail/em-event.h>
#endif
+#include <mail/em-popup.h>
#include <mail/em-utils.h>
#include <mail/em-folder-tree.h>
+#include <mail/em-folder-view.h>
#include <mail/mail-component.h>
#include <mail/mail-tools.h>
#include <mail/mail-ops.h>
@@ -81,7 +83,9 @@ int rss_verbose_debug = 0;
#include <camel/camel-data-cache.h>
#include <camel/camel-file-utils.h>
+#ifdef HAVE_GTKHTMLEDITOR
#include <editor/gtkhtml-editor.h>
+#endif
#include <libxml/HTMLtree.h>
@@ -175,9 +179,13 @@ gchar *pixfile;
char *pixfilebuf;
gsize pixfilelen;
extern int xmlSubstituteEntitiesDefaultValue;
+#if (DATASERVER_VERSION >= 2023001)
extern EProxy *proxy;
+#endif
SoupSession *webkit_session = NULL;
+#if LIBSOUP_VERSION > 2024000
SoupCookieJar *rss_soup_jar;
+#endif
extern guint rsserror;
gboolean single_pending = FALSE;
@@ -383,6 +391,7 @@ taskbar_op_new(gchar *message, gpointer key)
taskbar_op_new(gchar *message)
#endif
{
+ GdkPixbuf *progress_icon;
EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
char *mcp = g_strdup_printf("%p", mail_component_peek());
guint activity_id =
@@ -533,7 +542,9 @@ browser_write(gchar *string, gint length, gchar *base)
break;
case 1:
#ifdef HAVE_WEBKIT
+#if (DATASERVER_VERSION >= 2023001)
proxify_webkit_session(proxy, base);
+#endif
webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(rf->mozembed),
str,
base);
@@ -650,8 +661,13 @@ create_user_pass_dialog(RSS_AUTH *auth)
gtk_container_set_border_width (GTK_CONTAINER (widget), 12);
GtkWidget *password_dialog = GTK_WIDGET (widget);
+#if GTK_VERSION >= 2014000
action_area = gtk_dialog_get_action_area (GTK_DIALOG(password_dialog));
content_area = gtk_dialog_get_content_area (GTK_DIALOG(password_dialog));
+#else
+ action_area = GTK_DIALOG (password_dialog)->action_area;
+ content_area = NULL;
+#endif
/* Override GtkDialog defaults */
gtk_box_set_spacing (GTK_BOX (action_area), 12);
@@ -1463,6 +1479,7 @@ gecko_set_preferences(void)
gecko_prefs_set_int("browser.ssl_override_behaviour", 2);
gecko_prefs_set_bool("browser.xul.error_pages.enabled", FALSE);
g_free(agstr);
+#if (DATASERVER_VERSION >= 2023001)
//I'm only forcing scheme here
uri = e_proxy_peek_uri_for(proxy, "http:///");
if (uri) {
@@ -1470,6 +1487,7 @@ gecko_set_preferences(void)
gecko_prefs_set_int("network.proxy.http_port", uri->port);
gecko_prefs_set_int("network.proxy.type", 1);
}
+#endif
// soup_uri_free(uri);
// uri = e_proxy_peek_uri_for(proxy, "https:///");
// gecko_prefs_set_string("network.proxy.ssl", uri->host);
@@ -1511,7 +1529,9 @@ rss_popup_link_copy(EPopup *ep, EPopupItem *pitem, void *data)
static void
rss_popup_link_open(EPopup *ep, EPopupItem *pitem, void *data)
{
+#if (EVOLUTION_VERSION >= 22505)
e_show_uri (NULL, data);
+#endif
}
EPopupItem rss_menu_items[] = {
@@ -1922,6 +1942,7 @@ free_rss_browser(EMFormatHTMLPObject *o)
void
org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
{
+#ifdef HAVE_GTKHTMLEDITOR
xmlChar *buff = NULL;
gint size;
gsize length;
@@ -1933,6 +1954,7 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
*/
text = gtkhtml_editor_get_text_html ((GtkhtmlEditor *)t->composer, &length);
+
xmlDoc *doc = rss_html_url_decode(text, strlen(text));
if (doc) {
htmlDocDumpMemory(doc, &buff, &size);
@@ -1940,6 +1962,7 @@ org_gnome_evolution_presend (EPlugin *ep, EMEventTargetComposer *t)
}
gtkhtml_editor_set_text_html((GtkhtmlEditor *)t->composer, (gchar *)buff, size);
+#endif
}
EMFormat *fom;
@@ -4364,7 +4387,9 @@ e_plugin_lib_enable(EPluginLib *ep, int enable)
status_msg = g_queue_new();
get_feed_folders();
rss_build_stock_images();
+#if (DATASERVER_VERSION >= 2023001)
proxy = proxy_init();
+#endif
rss_soup_init();
#if HAVE_DBUS
d(g_print("init_dbus()\n"));
diff --git a/src/rss.h b/src/rss.h
index ff011d1..07cf724 100644
--- a/src/rss.h
+++ b/src/rss.h
@@ -16,6 +16,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#if HAVE_DBUS
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
@@ -25,6 +29,7 @@
#ifndef __RSS_H_
#define __RSS_H_
+#include <gtk/gtk.h>
#include <libsoup/soup.h>
#include <mail/mail-component.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]