[evolution-rss] adapt to latest EAlert changes
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] adapt to latest EAlert changes
- Date: Mon, 18 Oct 2010 18:23:11 +0000 (UTC)
commit 80d760739d4948f017d975bb2c36d4d59ac4eec7
Author: Lucian Langa <lucilanga gnome org>
Date: Mon Oct 18 21:23:01 2010 +0300
adapt to latest EAlert changes
src/notification.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/notification.c b/src/notification.c
index 19f96f8..404a211 100644
--- a/src/notification.c
+++ b/src/notification.c
@@ -67,6 +67,7 @@ rss_error(gpointer key, gchar *name, gchar *error, gchar *emsg)
gpointer newkey;
#if (EVOLUTION_VERSION >= 22900) //kb//
EShell *shell;
+ EShellBackend *backend;
GtkWindow *parent;
GList *windows;
#else
@@ -82,15 +83,21 @@ rss_error(gpointer key, gchar *name, gchar *error, gchar *emsg)
#if (EVOLUTION_VERSION >= 22200)
if (key) {
if (!g_hash_table_lookup(rf->error_hash, key)) {
-// guint activity_id = g_hash_table_lookup(rf->activity, key);
#if (EVOLUTION_VERSION >= 22900) //kb//
shell = e_shell_get_default ();
windows = e_shell_get_watched_windows (shell);
parent = (windows != NULL) ? GTK_WINDOW (windows->data) : NULL;
+#if (EVOLUTION_VERSION >= 29102)
+ backend = e_shell_get_backend_by_name (shell, "mail");
+ e_mail_backend_submit_alert (
+ backend, "org-gnome-evolution-rss:feederr",
+ error, msg, NULL);
+#else
ed = e_alert_dialog_new_for_args(parent,
"org-gnome-evolution-rss:feederr",
error, msg, NULL);
+#endif
#else
ed = e_error_new(NULL, "org-gnome-evolution-rss:feederr",
error, msg, NULL);
@@ -108,10 +115,11 @@ rss_error(gpointer key, gchar *name, gchar *error, gchar *emsg)
G_CALLBACK(dialog_key_destroy),
newkey);
//lame widget destruction, seems e_activity timeout does not destroy it
- g_timeout_add_seconds(60,
+ g_timeout_add_seconds(60,
(GSourceFunc)gtk_widget_destroy,
ed);
+#if (EVOLUTION_VERSION < 29102)
#if (EVOLUTION_VERSION >= 22900) //kb//
em_utils_show_error_silent(ed);
g_hash_table_insert(
@@ -120,7 +128,7 @@ rss_error(gpointer key, gchar *name, gchar *error, gchar *emsg)
GINT_TO_POINTER(1));
#else
- activity_handler =
+ activity_handler =
mail_component_peek_activity_handler (mail_component_peek());
#if (EVOLUTION_VERSION >= 22203)
id = e_activity_handler_make_error (
@@ -139,6 +147,7 @@ rss_error(gpointer key, gchar *name, gchar *error, gchar *emsg)
newkey,
GINT_TO_POINTER(id));
#endif
+#endif
}
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]