[evolution-rss] fix evolution version detection



commit ad1906980d66fb866fb4aab83e98a68c47a97b3b
Author: Lucian Langa <lucilanga gnome org>
Date:   Mon Nov 30 21:51:53 2009 +0200

    fix evolution version detection

 configure.ac    |    2 +-
 m4/evolution.m4 |   19 +++++++++----------
 server.mk       |    2 +-
 src/Makefile.am |    4 ++--
 src/rss.c       |   12 ++++++------
 5 files changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d2bce58..1150715 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,7 +62,7 @@ EVOLUTION_INIT
 dnl locate libsoup flavour
 SOUP=
 PKG_CHECK_MODULES([LIBSOUP_24], libsoup-2.4, [SOUP=2.4], [SOUP=])
-if test "x$SOUP" != "x2.4" -a "$evolution_exec_int" -ge "22190"; then
+if test "x$SOUP" != "x2.4" -a "$evolution_version_int" -ge "22190"; then
 	AC_MSG_ERROR([libsoup-2.4 devel headers required])
 else
 if test "x$SOUP" != "x2.4"; then
diff --git a/m4/evolution.m4 b/m4/evolution.m4
index 1a8fac0..89403b4 100644
--- a/m4/evolution.m4
+++ b/m4/evolution.m4
@@ -1,16 +1,16 @@
 #  Evoution RSS Reader Plugin
-#  Copyright (C) 2007-2008 Lucian Langa <cooly gnome eu org> 
-#  
+#  Copyright (C) 2007-2008 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
-#  the Free Software Foundation; either version 2 of the License, or 
+#  the Free Software Foundation; either version 2 of the License, or
 #  (at your option) any later version.
-#  
+#
 #  This program is distributed in the hope that it will be useful,
 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 #  GNU General Public License for more details.
-#  
+#
 #  You should have received a copy of the GNU General Public License
 #  along with this program; if not, write to the Free Software
 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
@@ -62,17 +62,16 @@ else
 fi
 AC_SUBST(EVOLUTION_VERSION)
 AC_MSG_RESULT($EVOLUTION_VERSION)
-AC_SUBST(EVOLUTION_BASE_VERSION)
 AC_SUBST(EVOLUTION_EXEC_VERSION)
 
-evolution_exec_int="$(echo "$EVOLUTION_EXEC_VERSION" | $AWK -F . '{print [$]1 * 10000 + [$]2 * 100 + [$]3}')"
-if test "$evolution_exec_int" -ge "21100"; then
+evolution_version_int="$(echo "$EVOLUTION_VERSION" | $AWK -F . '{print [$]1 * 10000 + [$]2 * 100 + [$]3}')"
+if test "$evolution_version_int" -ge "21100"; then
         AC_DEFINE_UNQUOTED(EVOLUTION_2_12,1, [evolution mail 2.12 present])
         AC_SUBST(EVOLUTION_2_12)
 fi
-AC_SUBST(evolution_exec_int)
+AC_SUBST(evolution_version_int)
 
-MINOR_VERSION="$(echo $EVOLUTION_EXEC_VERSION|cut -d. -f2|$AWK -F . '{print 1000 * [$]1}')"
+MINOR_VERSION="$(echo $EVOLUTION_VERSION|cut -d. -f2|$AWK -F . '{print 1000 * [$]1}')"
 AC_SUBST(MINOR_VERSION)
 
 dnl Evolution plugin install directory
diff --git a/server.mk b/server.mk
index 8e023bf..6dd9d2f 100644
--- a/server.mk
+++ b/server.mk
@@ -1,7 +1,7 @@
 %.server.in: %.server.in.in
 	sed -e 's|\ PLUGINDIR_IN_SERVER_FILE\@|$(PLUGINDIR_IN_SERVER_FILE)|'    \
 	-e 's|\ IMAGESDIR_IN_SERVER_FILE\@|$(IMAGESDIR_IN_SERVER_FILE)|'        \
-	-e 's|\ VERSION\@|$(EVOLUTION_EXEC_VERSION)|' 			\
+	-e 's|\ VERSION\@|$(EVOLUTION_EXEC_VERSION)|'			\
 	-e 's|\ EXEEXT\@|$(EXEEXT)|'				\
 	-e 's|\ SOEXT\@|$(SOEXT)|' $< > $@
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 4e53873..36cd2a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES =							\
 	-DGETTEXT_PACKAGE="\"$(GETTEXT_PACKAGE)\""		\
 	-DLOCALEDIR="\"$(LOCALEDIR)\""				\
 	-DEVOLUTION_VERSION_STRING=\"$(EVOLUTION_EXEC_VERSION)\"\
-	-DEVOLUTION_VERSION=$(evolution_exec_int)		\
+	-DEVOLUTION_VERSION=$(evolution_version_int)		\
 	-DDATASERVER_VERSION=$(DATASERVER_VERSION)		\
 	-DEVOLUTION_GLADEDIR=\""$(gladedir)"\"			\
 	-DEVOLUTION_ICONDIR=\""$(ICON_DIR)"\"			\
@@ -28,7 +28,7 @@ endif
 
 RSS_MENU = \
 	<hook class=\"org.gnome.evolution.mail.bonobomenu:1.0\">\n		\
-      		<menu target=\"select\" id=\"org.gnome.evolution.mail.browser\">\n	\
+		<menu target=\"select\" id=\"org.gnome.evolution.mail.browser\">\n	\
 	\n								\
       <ui file=\"+PLUGIN_INSTALL_DIR+/org-gnome-evolution-rss.xml\"/>\n	\
           <item verb=\"RSSTask\" type=\"item\" path=\"/commands/RSSTask\" activate=\"org_gnome_cooly_rss_refresh\"/>\n		\
diff --git a/src/rss.c b/src/rss.c
index 9ce61b8..675dbf3 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -1886,6 +1886,11 @@ gecko_click(GtkMozEmbed *mozembed, gpointer dom_event, gpointer user_data)
 	gint button;
 	GtkMenu *menu;
 	gchar *link = NULL;
+        GSList *menus = NULL;
+	gint i=0, menu_size;
+#if EVOLUTION_VERSION < 22900
+        EPopup *emp;
+#endif
 
 	if (-1 == (button = gecko_get_mouse_event_button (dom_event))) {
                 g_warning ("Cannot determine mouse button!\n");
@@ -1902,11 +1907,6 @@ gecko_click(GtkMozEmbed *mozembed, gpointer dom_event, gpointer user_data)
 	if (button == 2)
 		e_popup_menu (menu, NULL);
 #else
-
-        EPopup *emp;
-        GSList *menus = NULL;
-	gint i=0, menu_size;
-
 	emp = em_popup_new("org.gnome.evolution.mail.formathtmldisplay.popup");
 	menu_size=sizeof(rss_menu_items)/sizeof(rss_menu_items[0]);
 	if (strlen(link))
@@ -2675,9 +2675,9 @@ void org_gnome_cooly_folder_icon(void *ep, EMEventTargetCustomIcon *t)
 {
 	gchar *rss_folder, *ofolder, *key;
 	gchar *main_folder = get_main_folder();
-	gchar *icon_file;
 #if (EVOLUTION_VERSION < 22703)
 	GdkPixbuf *icon, *pixbuf;
+	gchar *iconfile;
 #endif
 
 	main_folder = get_main_folder();



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