[evolution-rss] Bug 631899 - Be able to build against eds/evo 2.91.6
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] Bug 631899 - Be able to build against eds/evo 2.91.6
- Date: Mon, 21 Feb 2011 22:44:05 +0000 (UTC)
commit de44a4851fd9e1fc1aea253e3294d42a02f31637
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 22 00:31:48 2011 +0200
Bug 631899 - Be able to build against eds/evo 2.91.6
configure.ac | 19 +++++++++++++++----
m4/evolution.m4 | 11 ++++++++---
src/rss-config-factory.c | 14 +++++++++++---
src/rss.c | 4 ++--
src/rss.h | 4 ++--
5 files changed, 38 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 15da785..8d5ea82 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,13 +78,20 @@ fi
dnl base packages and versions
LIBGLIB_REQUIRED=2.16.2
+LIBGTK_VERSION=2
LIBGTK_REQUIRED=2.12.0
EVOLUTION_REQUIRED=2.4.1
LIBSOUP_REQUIRED=2.2
+if test "$EVOLUTION_BASE_VERSION_S" = "-3.0"; then
+ LIBGTK_VERSION=3
+ LIBGTK_REQUIRED=2.99.3
+ EVOLUTION_REQUIRED=2.91.6
+fi
+
PKG_CHECK_MODULES(EVOLUTION_RSS_EPLUGIN,
[ glib-2.0 >= $LIBGLIB_REQUIRED dnl
- gtk+-2.0 >= $LIBGTK_REQUIRED dnl
+ gtk+-$LIBGTK_VERSION.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
@@ -95,11 +102,15 @@ GTKHTML_EDITOR_VERSION=`$PKG_CONFIG --modversion gtkhtml-editor 2>/dev/null`
if test -n "$GTKHTML_EDITOR_VERSION"; then
PKG_CHECK_MODULES([GTKHTML_EDITOR], gtkhtml-editor, [GTKHTMLEDITOR=yes], [GTKHTMLEDITOR=no])
else
- gtkhtml_api_versions='14 15'
+ if test "$EVOLUTION_BASE_VERSION_S" = "-3.0"; then
+ gtkhtml_api_versions='4.0'
+ else
+ gtkhtml_api_versions='3.15 3.14'
+ fi
for i in $gtkhtml_api_versions; do
- GTKHTML_EDITOR_VERSION=`$PKG_CONFIG --modversion gtkhtml-editor-3.$i 2>/dev/null`
+ GTKHTML_EDITOR_VERSION=`$PKG_CONFIG --modversion gtkhtml-editor-$i 2>/dev/null`
if test -n "$GTKHTML_EDITOR_VERSION"; then
- PKG_CHECK_MODULES([GTKHTML_EDITOR], gtkhtml-editor-3.$i, [GTKHTMLEDITOR=yes], [GTKHTMLEDITOR=no])
+ PKG_CHECK_MODULES([GTKHTML_EDITOR], gtkhtml-editor-$i, [GTKHTMLEDITOR=yes], [GTKHTMLEDITOR=no])
AC_DEFINE_UNQUOTED(HAVE_GTKHTMLEDITOR, 1, [gthtml editor component present])
AC_SUBST(HAVE_GTKHTMLEDITOR)
AC_SUBST(GTKHTML_EDITOR_CFLAGS)
diff --git a/m4/evolution.m4 b/m4/evolution.m4
index 8497d0f..2aba701 100644
--- a/m4/evolution.m4
+++ b/m4/evolution.m4
@@ -24,11 +24,16 @@ AC_PROG_AWK
AC_MSG_CHECKING(Evolution version)
dnl is this a reasonable thing to do ?
-EVOLUTION_VERSION=`$PKG_CONFIG --modversion evolution-shell 2>/dev/null`
+EVOLUTION_VERSION=`$PKG_CONFIG --modversion evolution-shell-3.0 2>/dev/null`
+if test -n "$EVOLUTION_VERSION"; then
+ EVOLUTION_BASE_VERSION_S="-3.0"
+else
+ EVOLUTION_VERSION=`$PKG_CONFIG --modversion evolution-shell 2>/dev/null`
+ EVOLUTION_BASE_VERSION_S=""
+fi
if test -n "$EVOLUTION_VERSION"; then
EVOLUTION_BASE_VERSION=$EVOLUTION_VERSION
- EVOLUTION_BASE_VERSION_S=""
- EVOLUTION_EXEC_VERSION=`$PKG_CONFIG --variable=execversion evolution-shell 2>/dev/null`
+ EVOLUTION_EXEC_VERSION=`$PKG_CONFIG --variable=execversion evolution-shell$EVOLUTION_BASE_VERSION_S 2>/dev/null`
if test -n "$EVOLUTION_EXEC_VERSION"; then
break;
else
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 8098b43..33196ab 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -789,14 +789,22 @@ build_dialog_add(gchar *url, gchar *feed_text)
ok,
"activate",
accel_group,
+ #if GTK_CHECK_VERSION(2,99,0)
+ GDK_KEY_Return,
+ #else
GDK_Return,
+ #endif
(GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
gtk_widget_add_accelerator (
ok,
"activate",
accel_group,
+ #if GTK_CHECK_VERSION(2,99,0)
+ GDK_KEY_KP_Enter,
+ #else
GDK_KP_Enter,
+ #endif
(GdkModifierType) 0,
GTK_ACCEL_VISIBLE);
gtk_window_add_accel_group (
@@ -3777,12 +3785,12 @@ rss_config_control_new (void)
//make sure something (first row) is selected
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
- gtk_tree_model_iter_nth_child(
+ if (gtk_tree_model_iter_nth_child(
GTK_TREE_MODEL(store),
&iter,
NULL,
- 0);
- gtk_tree_selection_select_iter(selection, &iter);
+ 0))
+ gtk_tree_selection_select_iter(selection, &iter);
gtk_tree_view_columns_autosize (treeview);
g_signal_connect((gpointer) treeview,
diff --git a/src/rss.c b/src/rss.c
index 41126a6..23f2d6d 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -297,12 +297,12 @@ rss_find_enabled(void)
/* hash table of ops->dialogue of active errors */
static GHashTable *active_errors = NULL;
-void error_destroy(GtkObject *o, void *data)
+void error_destroy(GObject *o, void *data)
{
g_hash_table_remove(active_errors, data);
}
-void error_response(GtkObject *o, int button, void *data)
+void error_response(GObject *o, int button, void *data)
{
gtk_widget_destroy((GtkWidget *)o);
}
diff --git a/src/rss.h b/src/rss.h
index 2c77a53..0542e67 100644
--- a/src/rss.h
+++ b/src/rss.h
@@ -344,9 +344,9 @@ void compare_enabled(
gpointer value,
guint *data);
guint rss_find_enabled(void);
-void error_destroy(GtkObject *o, void *data);
+void error_destroy(GObject *o, void *data);
void error_response(
- GtkObject *o,
+ GObject *o,
int button,
void *data);
void abort_active_op(gpointer key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]