aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-10 16:53:56 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-10 16:53:56 +0800
commit92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c (patch)
tree96582aa11cb7857c50542d812e2e01f904835aa8 /calendar/gui/alarm-notify/alarm-queue.c
parent630376903f102d7948756fb350d09a041663feae (diff)
downloadgsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar.gz
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar.bz2
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar.lz
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar.xz
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.tar.zst
gsoc2013-evolution-92315fc8f7520d2fe14f164cbe5e21aec5bd5b0c.zip
2007-08-10 mcrha Fix for bug #351552
svn path=/trunk/; revision=33975
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 06d1d3b4cd..08dda9ad66 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -77,7 +77,7 @@
static AlarmNotificationsDialog *alarm_notifications_dialog = NULL;
/* Whether the queueing system has been initialized */
-static gboolean alarm_queue_inited;
+static gboolean alarm_queue_inited = FALSE;
/* When the alarm queue system is inited, this gets set to the last time an
* alarm notification was issued. This lets us present any notifications that
@@ -2146,8 +2146,15 @@ alarm_queue_remove_async (EThread *e, AlarmMsg *msg, void *data)
g_hash_table_remove (client_alarms_hash, client);
}
+/** alarm_queue_remove_client
+ *
+ * asynchronously remove client from alarm queue.
+ * @param client Client to remove.
+ * @param immediately Indicates whether use thread or do it right now.
+ */
+
void
-alarm_queue_remove_client (ECal *client)
+alarm_queue_remove_client (ECal *client, gboolean immediately)
{
AlarmMsg *msg;
struct _alarm_client_msg *list;
@@ -2161,7 +2168,10 @@ alarm_queue_remove_client (ECal *client)
msg->data = list;
d(printf("%s:%d (alarm_queue_remove_client) - Posting a task\n",__FILE__, __LINE__));
- e_thread_put(alarm_operation_thread, (EMsg *)msg);
+ if (immediately)
+ alarm_queue_remove_async (NULL, msg, NULL);
+ else
+ e_thread_put(alarm_operation_thread, (EMsg *)msg);
}
/* Update non-time related variables for various structures on modification of an existing component