aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-queue.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-12-17 19:59:47 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-12-17 19:59:47 +0800
commit350bdccc968a80bc7819d1bc7c302584c165b771 (patch)
tree1c67ad334ef3909fc3d62030f0fa6d3825277f1b /calendar/gui/alarm-notify/alarm-queue.c
parentef5c4898659a7811fb442b5cf7b85ec346332381 (diff)
downloadgsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar.gz
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar.bz2
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar.lz
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar.xz
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.tar.zst
gsoc2013-evolution-350bdccc968a80bc7819d1bc7c302584c165b771.zip
make sure we free the data stored in the hash table.
2003-12-17 Rodrigo Moya <rodrigo@ximian.com> * gui/alarm-notify/alarm-notify.c (alarm_notify_remove_calendar): make sure we free the data stored in the hash table. (alarm_notify_add_calendar): call alarm_queue_add_client, or we wont have alarms at all. * gui/alarm-notify/alarm-queue.c: no need to hold a ref count. (alarm_queue_add_client, alarm_queue_remove_client): don't use the refcount private member. (alarm_queue_add_client): don't connect to non-existing ECal signals. (display_notification, free_client_alarms_cb): fixed warnings. svn path=/trunk/; revision=23960
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-queue.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-queue.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c
index 2cf95f47b7..e97761fc89 100644
--- a/calendar/gui/alarm-notify/alarm-queue.c
+++ b/calendar/gui/alarm-notify/alarm-queue.c
@@ -69,9 +69,6 @@ typedef struct {
/* Monitored client */
ECal *client;
- /* Number of times this client has been registered */
- int refcount;
-
/* Hash table of component UID -> CompQueuedAlarms. If an element is
* present here, then it means its cqa->queued_alarms contains at least
* one queued alarm. When all the alarms for a component have been
@@ -840,7 +837,6 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa,
{
QueuedAlarm *qa;
ECalComponent *comp;
- ECal *client;
ECalComponentVType vtype;
const char *message;
ECalComponentAlarm *alarm;
@@ -1126,7 +1122,6 @@ alarm_queue_init (void)
static void
free_client_alarms_cb (gpointer key, gpointer value, gpointer user_data)
{
- ECal *client = key;
ClientAlarms *ca = value;
if (ca) {
@@ -1186,7 +1181,6 @@ alarm_queue_add_client (ECal *client)
ca = lookup_client (client);
if (ca) {
- ca->refcount++;
return;
}
@@ -1195,7 +1189,6 @@ alarm_queue_add_client (ECal *client)
ca->client = client;
g_object_ref (ca->client);
- ca->refcount = 1;
g_hash_table_insert (client_alarms_hash, client, ca);
ca->uid_alarms_hash = g_hash_table_new (g_str_hash, g_str_equal);
@@ -1205,13 +1198,6 @@ alarm_queue_add_client (ECal *client)
G_CALLBACK (cal_opened_cb),
ca);
- g_signal_connect (client, "obj_updated",
- G_CALLBACK (obj_updated_cb),
- ca);
- g_signal_connect (client, "obj_removed",
- G_CALLBACK (obj_removed_cb),
- ca);
-
if (e_cal_get_load_state (client) == E_CAL_LOAD_LOADED) {
load_alarms_for_today (ca);
load_missed_alarms (ca);
@@ -1276,12 +1262,6 @@ alarm_queue_remove_client (ECal *client)
ca = lookup_client (client);
g_return_if_fail (ca != NULL);
- g_assert (ca->refcount > 0);
- ca->refcount--;
-
- if (ca->refcount > 0)
- return;
-
remove_client_alarms (ca);
/* Clean up */