Fixes #34498
2003-04-17 Rodrigo Moya <rodrigo@ximian.com> Fixes #34498 * gui/alarm-notify/alarm-queue.c: added a 'uid' field to the CompQueuedAlarms structure. (remove_queued_alarm): free the 'uid' field when freeing the structure. (add_component_alarms): g_strdup the component's UID and use that as the key for the hash table. svn path=/trunk/; revision=20879
This commit is contained in:

committed by
Rodrigo Moya

parent
9c3df9559c
commit
2c4e906e2f
@ -1,3 +1,14 @@
|
|||||||
|
2003-04-17 Rodrigo Moya <rodrigo@ximian.com>
|
||||||
|
|
||||||
|
Fixes #34498
|
||||||
|
|
||||||
|
* gui/alarm-notify/alarm-queue.c: added a 'uid' field to the
|
||||||
|
CompQueuedAlarms structure.
|
||||||
|
(remove_queued_alarm): free the 'uid' field when freeing the
|
||||||
|
structure.
|
||||||
|
(add_component_alarms): g_strdup the component's UID and use that as
|
||||||
|
the key for the hash table.
|
||||||
|
|
||||||
2003-04-16 Rodrigo Moya <rodrigo@ximian.com>
|
2003-04-16 Rodrigo Moya <rodrigo@ximian.com>
|
||||||
|
|
||||||
Fixes #41129, #41215, #41221, #41256
|
Fixes #41129, #41215, #41221, #41256
|
||||||
|
@ -82,6 +82,9 @@ typedef struct {
|
|||||||
/* The parent client alarms structure */
|
/* The parent client alarms structure */
|
||||||
ClientAlarms *parent_client;
|
ClientAlarms *parent_client;
|
||||||
|
|
||||||
|
/* The component's UID */
|
||||||
|
char *uid;
|
||||||
|
|
||||||
/* The actual component and its alarm instances */
|
/* The actual component and its alarm instances */
|
||||||
CalComponentAlarms *alarms;
|
CalComponentAlarms *alarms;
|
||||||
|
|
||||||
@ -200,7 +203,6 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id,
|
|||||||
gboolean free_object, gboolean remove_alarm)
|
gboolean free_object, gboolean remove_alarm)
|
||||||
{
|
{
|
||||||
QueuedAlarm *qa;
|
QueuedAlarm *qa;
|
||||||
const char *uid;
|
|
||||||
GSList *l;
|
GSList *l;
|
||||||
|
|
||||||
qa = NULL;
|
qa = NULL;
|
||||||
@ -236,8 +238,9 @@ remove_queued_alarm (CompQueuedAlarms *cqa, gpointer alarm_id,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (free_object) {
|
if (free_object) {
|
||||||
cal_component_get_uid (cqa->alarms->comp, &uid);
|
g_hash_table_remove (cqa->parent_client->uid_alarms_hash, cqa->uid);
|
||||||
g_hash_table_remove (cqa->parent_client->uid_alarms_hash, uid);
|
g_free (cqa->uid);
|
||||||
|
cqa->uid = NULL;
|
||||||
cqa->parent_client = NULL;
|
cqa->parent_client = NULL;
|
||||||
cal_component_alarms_free (cqa->alarms);
|
cal_component_alarms_free (cqa->alarms);
|
||||||
g_free (cqa);
|
g_free (cqa);
|
||||||
@ -362,7 +365,8 @@ add_component_alarms (ClientAlarms *ca, CalComponentAlarms *alarms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
|
cqa->queued_alarms = g_slist_reverse (cqa->queued_alarms);
|
||||||
g_hash_table_insert (ca->uid_alarms_hash, (char *) uid, cqa);
|
cqa->uid = g_strdup (uid);
|
||||||
|
g_hash_table_insert (ca->uid_alarms_hash, cqa->uid, cqa);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Loads the alarms of a client for a given range of time */
|
/* Loads the alarms of a client for a given range of time */
|
||||||
|
Reference in New Issue
Block a user