aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@novell.com>2004-08-06 17:48:52 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2004-08-06 17:48:52 +0800
commitb58607ea6a24dc9f69115520950215bb01a2a220 (patch)
tree458a93a3062c6e02afd04e2c8c97e4b00d001b2f /calendar/gui
parenta199be51c6cfa250529d1a25f11687a714ffbf4f (diff)
downloadgsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar.gz
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar.bz2
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar.lz
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar.xz
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.tar.zst
gsoc2013-evolution-b58607ea6a24dc9f69115520950215bb01a2a220.zip
Fixes #62030
2004-08-05 Rodrigo Moya <rodrigo@novell.com> Fixes #62030 * gui/alarm-notify/alarm-queue.c (tray_icon_destroyed_cb): only remove the tray icon blinking timeout if we installed it. (display_notification): only install the tray icon blinking timeout if using the system tray. (tray_icon_blink_cb): use g_object_unref instead of the deprecated gdk_pixbuf_unref. * gui/alarm-notify/alarm.c (alarm_add): added missing argument documentation. svn path=/trunk/; revision=26838
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c18
-rw-r--r--calendar/gui/alarm-notify/alarm.c1
2 files changed, 11 insertions, 8 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 350ace3cd0..74c16746c4 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -236,7 +236,7 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id,
if (remove_alarm) {
cqa->expecting_update = TRUE;
e_cal_discard_alarm (cqa->parent_client->client, cqa->alarms->comp,
- qa->instance->auid, NULL);
+ qa->instance->auid, NULL);
cqa->expecting_update = FALSE;
}
@@ -776,7 +776,8 @@ tray_icon_destroyed_cb (GtkWidget *tray, gpointer user_data)
tray_data->message = NULL;
}
- g_source_remove (tray_data->blink_id);
+ if (tray_data->blink_id)
+ g_source_remove (tray_data->blink_id);
g_object_unref (tray_data->comp);
g_object_unref (tray_data->client);
@@ -901,11 +902,12 @@ tray_icon_blink_cb (gpointer data)
tray_data->blink_state = tray_data->blink_state == TRUE ? FALSE : TRUE;
pixbuf = e_icon_factory_get_icon (tray_data->blink_state == TRUE ?
- "stock_appointment-reminder-excl" :
- "stock_appointment-reminder",
+ "stock_appointment-reminder-excl" :
+ "stock_appointment-reminder",
E_ICON_SIZE_LARGE_TOOLBAR);
+
gtk_image_set_from_pixbuf (GTK_IMAGE (tray_data->image), pixbuf);
- gdk_pixbuf_unref (pixbuf);
+ g_object_unref (pixbuf);
return TRUE;
}
@@ -1003,13 +1005,13 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
g_signal_connect (G_OBJECT (tray_data->query), "objects_removed",
G_CALLBACK (on_dialog_objs_removed_cb), tray_data);
- tray_data->blink_id = g_timeout_add (500, tray_icon_blink_cb, tray_data);
-
if (!config_data_get_notify_with_tray ()) {
+ tray_data->blink_id = -1;
open_alarm_dialog (tray_data);
} else {
+ tray_data->blink_id = g_timeout_add (500, tray_icon_blink_cb, tray_data);
gtk_widget_show (tray_icon);
- }
+ }
}
/* Performs notification of an audio alarm */
diff --git a/calendar/gui/alarm-notify/alarm.c b/calendar/gui/alarm-notify/alarm.c
index 3054cfa8f5..6c57311c12 100644
--- a/calendar/gui/alarm-notify/alarm.c
+++ b/calendar/gui/alarm-notify/alarm.c
@@ -182,6 +182,7 @@ queue_alarm (AlarmRecord *ar)
* @trigger: Time at which alarm will trigger.
* @alarm_fn: Callback for trigger.
* @data: Closure data for callback.
+ * @destroy_notify_fn: destroy notification callback.
*
* Adds an alarm to trigger at the specified time. The @alarm_fn will be called
* with the provided data and the alarm will be removed from the trigger list.