aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mail-notification
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-24 13:14:44 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-24 13:14:44 +0800
commit4f4615a46d5ba518c1e6a0c2412b1edf1e268d99 (patch)
tree828acaa7b76aa12a490a3238b0ec4a7086b8be16 /plugins/mail-notification
parent076b7c45131482b87d18963d34d035435491ee8d (diff)
downloadgsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.gz
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.tar.zst
gsoc2013-evolution-4f4615a46d5ba518c1e6a0c2412b1edf1e268d99.zip
Merge revisions 36737:36810 from trunk.
svn path=/branches/kill-bonobo/; revision=36811
Diffstat (limited to 'plugins/mail-notification')
-rw-r--r--plugins/mail-notification/ChangeLog11
-rw-r--r--plugins/mail-notification/mail-notification.c23
2 files changed, 33 insertions, 1 deletions
diff --git a/plugins/mail-notification/ChangeLog b/plugins/mail-notification/ChangeLog
index 3e489aca96..96c5abc9e4 100644
--- a/plugins/mail-notification/ChangeLog
+++ b/plugins/mail-notification/ChangeLog
@@ -1,3 +1,14 @@
+2008-11-19 Srinivasa Ragavan <sragavan@novell.com>
+
+ * mail-notification.c: Fix compilation error.
+
+2008-11-19 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for BNC bug #434320
+
+ * plugins/mail-notification/mail-notification.c: When the popup is
+ clicked close the status icon.
+
2008-09-16 Sankar P <psankar@novell.com>
License Changes
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index f3da922a79..a501d99bb1 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -56,6 +56,7 @@
static gboolean enabled = FALSE;
static GtkWidget *get_cfg_widget (void);
+static GStaticMutex mlock = G_STATIC_MUTEX_INIT;
/**
* each part should "implement" its own "public" functions:
@@ -441,6 +442,26 @@ popup_menu_status (GtkStatusIcon *status_icon, guint button, guint activate_time
g_object_unref (menu);
}
+#ifdef HAVE_LIBNOTIFY
+static void
+notifyActionCallback (NotifyNotification *n, gchar *label, gpointer a)
+{
+ g_static_mutex_lock (&mlock);
+
+ gtk_status_icon_set_visible (status_icon, FALSE);
+ g_object_unref (status_icon);
+
+ if (blink_timeout_id) {
+ g_source_remove (blink_timeout_id);
+ blink_timeout_id = 0;
+ }
+
+ status_icon = NULL;
+ status_count = 0;
+ g_static_mutex_unlock (&mlock);
+}
+#endif
+
static void
new_notify_status (EMEventTargetFolder *t)
{
@@ -487,6 +508,7 @@ new_notify_status (EMEventTargetFolder *t)
notify_notification_set_urgency (notify, NOTIFY_URGENCY_NORMAL);
notify_notification_set_timeout (notify, NOTIFY_EXPIRES_DEFAULT);
+ notify_notification_add_action(notify, "default", "Default", notifyActionCallback, NULL, NULL);
g_timeout_add (500, notification_callback, notify);
}
}
@@ -835,7 +857,6 @@ void org_gnome_mail_read_notify (EPlugin *ep, EMEventTargetMessage *t);
int e_plugin_lib_enable (EPluginLib *ep, int enable);
GtkWidget *e_plugin_lib_get_configure_widget (EPlugin *epl);
-static GStaticMutex mlock = G_STATIC_MUTEX_INIT;
void
org_gnome_mail_new_notify (EPlugin *ep, EMEventTargetFolder *t)