empathy r2301 - trunk/src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2301 - trunk/src
- Date: Fri, 30 Jan 2009 17:08:26 +0000 (UTC)
Author: xclaesse
Date: Fri Jan 30 17:08:26 2009
New Revision: 2301
URL: http://svn.gnome.org/viewvc/empathy?rev=2301&view=rev
Log:
Always check if notifications are enabled when we update them.
Modified:
trunk/src/empathy-status-icon.c
Modified: trunk/src/empathy-status-icon.c
==============================================================================
--- trunk/src/empathy-status-icon.c (original)
+++ trunk/src/empathy-status-icon.c Fri Jan 30 17:08:26 2009
@@ -128,11 +128,27 @@
}
static void
+notification_close_helper (EmpathyStatusIconPriv *priv)
+{
+ if (priv->notification) {
+ notify_notification_close (priv->notification, NULL);
+ g_object_unref (priv->notification);
+ priv->notification = NULL;
+ }
+}
+
+static void
status_icon_update_notification (EmpathyStatusIcon *icon)
{
EmpathyStatusIconPriv *priv = GET_PRIV (icon);
GdkPixbuf *pixbuf = NULL;
+ if (!empathy_notification_is_enabled ()) {
+ /* always close the notification if this happens */
+ notification_close_helper (priv);
+ return;
+ }
+
if (priv->event) {
pixbuf = get_pixbuf_for_event (priv->event);
@@ -156,11 +172,7 @@
g_object_unref (pixbuf);
} else {
- if (priv->notification) {
- notify_notification_close (priv->notification, NULL);
- g_object_unref (priv->notification);
- priv->notification = NULL;
- }
+ notification_close_helper (priv);
}
}
@@ -234,10 +246,7 @@
status_icon_update_icon (icon);
status_icon_update_tooltip (icon);
-
- if (empathy_notification_is_enabled ()) {
- status_icon_update_notification (icon);
- }
+ status_icon_update_notification (icon);
if (!priv->blink_timeout) {
priv->blink_timeout = g_timeout_add (BLINK_TIMEOUT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]