aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-model.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@helixcode.com>2000-08-12 01:49:53 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-08-12 01:49:53 +0800
commitbba515a79c91c90e413403d1f03251cf0ed33457 (patch)
tree8ec92963b99bf69a1874280cfbaf003908442350 /calendar/gui/calendar-model.c
parent1fa80ef1b7e6de2c0653b68f60986ae4150d2780 (diff)
downloadgsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar.gz
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar.bz2
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar.lz
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar.xz
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.tar.zst
gsoc2013-evolution-bba515a79c91c90e413403d1f03251cf0ed33457.zip
Handle the PERCENT-COMPLETE property. (free_icalcomponent): Likewise.
2000-08-11 Federico Mena Quintero <federico@helixcode.com> * cal-util/cal-component.c (scan_property): Handle the PERCENT-COMPLETE property. (free_icalcomponent): Likewise. (cal_component_get_percent): Likewise. (cal_component_set_percent): Likewise. (cal_component_free_percent): Likewise. (scan_property): Handle the PRIORITY property. (free_icalcomponent): Likewise. (cal_component_get_priority): Likewise. (cal_component_set_priority): Likewise. (cal_component_free_priority): Likewise. * cal-util/cal-component.h (CalComponentField): New enumeration with the list of fields we support for ETable. svn path=/trunk/; revision=4745
Diffstat (limited to 'calendar/gui/calendar-model.c')
-rw-r--r--calendar/gui/calendar-model.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c
index 5755e20d81..beb1c5f78e 100644
--- a/calendar/gui/calendar-model.c
+++ b/calendar/gui/calendar-model.c
@@ -149,7 +149,7 @@ calendar_model_init (CalendarModel *model)
priv = g_new0 (CalendarModelPrivate, 1);
model->priv = priv;
- priv->objects = g_array_new (FALSE, TRUE, sizeof (iCalObject *));
+ priv->objects = g_array_new (FALSE, TRUE, sizeof (CalComponent *));
priv->uid_index_hash = g_hash_table_new (g_str_hash, g_str_equal);
}
@@ -179,11 +179,11 @@ free_objects (CalendarModel *model)
g_hash_table_foreach_remove (priv->uid_index_hash, free_uid_index, NULL);
for (i = 0; i < priv->objects->len; i++) {
- iCalObject *ico;
+ CalComponent *comp;
- ico = g_array_index (priv->objects, iCalObject *, i);
- g_assert (ico != NULL);
- ical_object_unref (ico);
+ comp = g_array_index (priv->objects, CalComponent *, i);
+ g_assert (comp != NULL);
+ gtk_object_unref (GTK_OBJECT (comp));
}
g_array_set_size (priv->objects, 0);
@@ -295,7 +295,7 @@ calendar_model_value_at (ETableModel *etm, int col, int row)
{
CalendarModel *model;
CalendarModelPrivate *priv;
- iCalObject *ico;
+ CalComponent *comp;
static char buffer[16];
model = CALENDAR_MODEL (etm);
@@ -304,8 +304,8 @@ calendar_model_value_at (ETableModel *etm, int col, int row)
g_return_val_if_fail (col >= 0 && col < ICAL_OBJECT_FIELD_NUM_FIELDS, NULL);
g_return_val_if_fail (row >= 0 && row < priv->objects->len, NULL);
- ico = g_array_index (priv->objects, iCalObject *, row);
- g_assert (ico != NULL);
+ comp = g_array_index (priv->objects, CalComponent *, row);
+ g_assert (comp != NULL);
switch (col) {
case ICAL_OBJECT_FIELD_COMMENT:
@@ -1527,7 +1527,7 @@ calendar_model_mark_task_complete (CalendarModel *model,
/* Frees the objects stored in the calendar model */
-iCalObject*
+CalComponent *
calendar_model_get_cal_object (CalendarModel *model,
gint row)
{
@@ -1535,6 +1535,5 @@ calendar_model_get_cal_object (CalendarModel *model,
priv = model->priv;
- return g_array_index (priv->objects, iCalObject *, row);
+ return g_array_index (priv->objects, CalComponent *, row);
}
-