[evolution-rss] fix build with older evolution version



commit ecffc1be18efd31577efa4903fa3720367d7bfd2
Author: Lucian Langa <lucilanga gnome org>
Date:   Sun Mar 21 21:40:25 2010 +0200

    fix build with older evolution version

 src/notification.c |   53 ++++++++++++++++++++++++++-------------------------
 src/notification.h |   12 ++++++++++-
 src/rss.c          |   10 ++++++++-
 3 files changed, 47 insertions(+), 28 deletions(-)
---
diff --git a/src/notification.c b/src/notification.c
index c34d499..82b47d0 100644
--- a/src/notification.c
+++ b/src/notification.c
@@ -20,16 +20,22 @@
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#include <e-util/e-alert-dialog.h>
 #include <mail/em-utils.h>
+#if (EVOLUTION_VERSION >= 22900) //kb//
+#include <e-util/e-alert-dialog.h>
 #include <shell/e-shell-taskbar.h>
 #include <shell/e-shell-view.h>
+#else
+#include <e-util/e-error.h>
+#endif
 
 #include "notification.h"
 #include "rss.h"
 #include "network-soup.h"
 
+#if (EVOLUTION_VERSION >= 22900) //kb//
 extern EShellView *rss_shell_view;
+#endif
 extern rssfeed *rf;
 
 static void
@@ -328,30 +334,7 @@ taskbar_op_set_progress(gchar *key, gchar *msg, gdouble progress)
 	}
 }
 
-/*void
-taskbar_op_finish(gchar *key)
-{
-#if  EVOLUTION_VERSION < 22900 //kb//
-	EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
-#endif
-	if (rf->activity) {
-#if  EVOLUTION_VERSION < 22900 //kb//
-		guint activity_key = GPOINTER_TO_INT(g_hash_table_lookup(rf->activity, key));
-#else
-		EActivity *activity_key = g_hash_table_lookup(rf->activity, key);
-#endif
-		g_print("activity_key:%p\n", activity_key);
-		if (activity_key)
-#if  EVOLUTION_VERSION < 22900 //kb//
-			e_activity_handler_operation_finished(activity_handler, activity_key);
-#else
-			e_activity_complete (activity_key);
-#endif
-		g_hash_table_remove(rf->activity, key);
-	}
-}*/
-
-
+#if (EVOLUTION_VERSION >= 22900) //kb//
 void
 taskbar_op_finish(EActivity *id)
 {
@@ -359,7 +342,7 @@ taskbar_op_finish(EActivity *id)
 	if (id == NULL) {
 		activity_key = g_hash_table_lookup(rf->activity, "main");
 		if (activity_key) {
-		dp("activity_key:%p\n", activity_key);
+			dp("activity_key:%p\n", activity_key);
 			e_activity_complete (activity_key);
 			g_hash_table_remove(rf->activity, "main");
 		}
@@ -368,8 +351,26 @@ taskbar_op_finish(EActivity *id)
 		g_hash_table_remove(rf->activity, id);
 	}
 }
+#else
+void
+taskbar_op_finish(gchar *key)
+{
+	EActivityHandler *activity_handler = mail_component_peek_activity_handler (mail_component_peek ());
+	if (rf->activity) {
+		guint activity_key = GPOINTER_TO_INT(g_hash_table_lookup(rf->activity, key));
+		g_print("activity_key:%p\n", activity_key);
+		if (activity_key)
+			e_activity_handler_operation_finished(activity_handler, activity_key);
+		g_hash_table_remove(rf->activity, key);
+	}
+}
+#endif
 
+#if (EVOLUTION_VERSION >= 22900) //kb//
 EActivity*
+#else
+guint
+#endif
 taskbar_op_message(gchar *msg, gchar *unikey)
 {
 		gchar *tmsg;
diff --git a/src/notification.h b/src/notification.h
index 777390a..40705ee 100644
--- a/src/notification.h
+++ b/src/notification.h
@@ -16,10 +16,20 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-EActivity* taskbar_op_message(gchar *msg, gchar *unikey);
+#if (EVOLUTION_VERSION >= 22900) //kb//
+EActivity*
+taskbar_op_message(gchar *msg, gchar *unikey);
+#else
+guint
+taskbar_op_message(gchar *msg, gchar *unikey);
+#endif
 void taskbar_op_abort(gpointer key);
 void taskbar_op_set_progress(gchar *key, gchar *msg, gdouble progress);
+#if (EVOLUTION_VERSION >= 22900) //kb//
 void taskbar_op_finish(EActivity *id);
+#else
+void taskbar_op_finish(gchar *key);
+#endif
 void taskbar_push_message(gchar *message);
 void taskbar_pop_message(void);
 
diff --git a/src/rss.c b/src/rss.c
index f6a8366..5e776d3 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -406,6 +406,7 @@ browser_write(gchar *string, gint length, gchar *base)
 	switch (engine) {
 	case 2:
 #ifdef HAVE_GECKO
+	base = NULL;
 	gtk_moz_embed_open_stream((GtkMozEmbed *)rf->mozembed,
 			base, "text/html");
 	while (length > 0) {
@@ -2578,6 +2579,7 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
 	g_return_if_fail (folder != NULL);
 	folder_name = folder->full_name;
 #else
+	guint taskid;
 	folder_name = t->uri;
 #endif
 	if (folder_name == NULL
@@ -2910,7 +2912,11 @@ finish_setup_feed(
 	gchar *tmsgkey;
 	GError *err = NULL;
 	gchar *tmsg = feed->tmsg;
+#if (EVOLUTION_VERSION >= 22900) //kb//
 	EActivity *aid;
+#else
+	guint aid;
+#endif
 	gpointer crc_feed = gen_md5(feed->feed_url);
 
 	r = g_new0 (RDF, 1);
@@ -3256,8 +3262,10 @@ generic_finish_feed(rfMessage *msg, gpointer user_data)
 	gboolean deleted = 0;
 	GString *response;
 	RDF *r;
+#if (EVOLUTION_VERSION >= 22900) //kb//
 	EActivity *aid;
-#if EVOLUTION_VERSION < 22900
+#else
+	guint aid;
 	MailComponent *mc = mail_component_peek ();
 #endif
 



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