aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-08-01 15:17:26 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-08-01 15:17:26 +0800
commita7fa2367752b6d3b0c74d3391b5cf861027f122c (patch)
tree405e3c7ed99ef274e6cc6a894bf6584a4362fdd9 /calendar
parentce5a6a7bd93a7a2087b87a6d885f827389bb0ad4 (diff)
downloadgsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar.gz
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar.bz2
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar.lz
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar.xz
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.tar.zst
gsoc2013-evolution-a7fa2367752b6d3b0c74d3391b5cf861027f122c.zip
** Fix for bug #353927
2008-08-01 Milan Crha <mcrha@redhat.com> ** Fix for bug #353927 * calendar/gui/alarm-notify/alarm-queue.c: (tray_icon_blink_cb), (display_notification): Do not blink the icon more than 15 seconds. * plugins/mail-notification/mail-notification.c: (icon_activated), (stop_blinking_cb), (new_notify_status): Do not blink the icon more than 15 seconds. svn path=/trunk/; revision=35875
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c17
2 files changed, 19 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 60b5e5f62e..d80c2ff297 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-01 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #353927
+
+ * gui/alarm-notify/alarm-queue.c: (tray_icon_blink_cb),
+ (display_notification): Do not blink the icon more than 15 seconds.
+
2008-07-30 Milan Crha <mcrha@redhat.com>
** Fix for bug #211267
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 9bc19d4aad..219dfdc82d 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -79,7 +79,7 @@ static GList *tray_icons_list = NULL;
/* Top Tray Image */
static GtkStatusIcon *tray_icon = NULL;
static int tray_blink_id = -1;
-static int tray_blink_state = FALSE;
+static int tray_blink_countdown = 0;
static AlarmNotify *an;
/* Structure that stores a client we are monitoring */
@@ -1383,11 +1383,13 @@ popup_menu (GtkStatusIcon *icon, guint button, guint activate_time)
static gboolean
tray_icon_blink_cb (gpointer data)
{
+ static gboolean tray_blink_state = FALSE;
GdkPixbuf *pixbuf;
- tray_blink_state = tray_blink_state == TRUE ? FALSE: TRUE;
+ tray_blink_countdown--;
+ tray_blink_state = !tray_blink_state;
- pixbuf = e_icon_factory_get_icon (tray_blink_state == TRUE?
+ pixbuf = e_icon_factory_get_icon ((tray_blink_state || tray_blink_countdown <= 0)?
"stock_appointment-reminder-excl" :
"stock_appointment-reminder",
E_ICON_SIZE_LARGE_TOOLBAR);
@@ -1396,7 +1398,10 @@ tray_icon_blink_cb (gpointer data)
gtk_status_icon_set_from_pixbuf (tray_icon, pixbuf);
g_object_unref (pixbuf);
- return TRUE;
+ if (tray_blink_countdown <= 0)
+ tray_blink_id = -1;
+
+ return tray_blink_countdown > 0;
}
@@ -1536,8 +1541,10 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
open_alarm_dialog (tray_data);
gtk_window_stick (GTK_WINDOW (alarm_notifications_dialog->dialog));
} else {
- if (tray_blink_id == -1)
+ if (tray_blink_id == -1) {
+ tray_blink_countdown = 30;
tray_blink_id = g_timeout_add (500, tray_icon_blink_cb, tray_data);
+ }
}
}