aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
committerSeth Alves <alves@src.gnome.org>2000-06-08 03:59:48 +0800
commit35c55267f22a30cccd78e1f45efdd2e4b353fd94 (patch)
tree880acbc384eec12469bb2e8a41eae9c7dd997164 /calendar/gui/calendar-commands.c
parentf0e9a692608d04c14f2060f32b18c91bf8b2982d (diff)
downloadgsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.gz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.bz2
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.lz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.xz
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.tar.zst
gsoc2013-evolution-35c55267f22a30cccd78e1f45efdd2e4b353fd94.zip
instead of returning a text representation, decode the text and return an
* cal-client/cal-client.c (cal_client_get_object): instead of returning a text representation, decode the text and return an iCalObject. Also added CalClientGetStatus which indicates success or type of failure. * cal-util/calobj.c (ical_object_find_in_string): #ifed out ical_object_find_in_string since it is unused now. * cal-client/client-test.c (list_uids): track get_object change * gui/calendar-commands.c (calendar_iterate): same * gui/e-day-view.c (e_day_view_update_event): same * gui/e-week-view.c (e_week_view_update_event): same * gui/print.c (print_day_details): same (print_day_summary): same (print_todo_details): same * gui/gnome-cal.c (trigger_alarm_cb): same * gui/gncal-todo.c (gncal_todo_update): same svn path=/trunk/; revision=3463
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 49bb023875..0a4d12f93a 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -383,15 +383,15 @@ show_month_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path
gtk_widget_grab_focus (gcal->month_view);
}
+#if 0
static void
show_year_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path)
{
-#if 0
GnomeCalendar *gcal = GNOME_CALENDAR (user_data);
gnome_calendar_set_view (gcal, "yearview");
gtk_widget_grab_focus (gcal->year_view);
-#endif
}
+#endif
static void
new_calendar_cmd (BonoboUIHandler *uih, void *user_data, const char *path)
@@ -893,9 +893,9 @@ calendar_iterate (GnomeCalendar *cal,
{
GList *l, *cois;
GHashTable *cache;
- CalObjFindStatus status;
+ CalClientGetStatus status;
CalObjInstance *coi;
- char *uid, *obj_string;
+ char *uid;
iCalObject *ico;
cois = cal_client_get_events_in_range (cal->client, start, end);
@@ -910,26 +910,17 @@ calendar_iterate (GnomeCalendar *cal,
ico = g_hash_table_lookup (cache, uid);
if (!ico) {
- obj_string = cal_client_get_object (cal->client, uid);
-
- status = ical_object_find_in_string (uid, obj_string,
- &ico);
- g_free (obj_string);
+ status = cal_client_get_object (cal->client, uid, &ico);
switch (status) {
- case CAL_OBJ_FIND_SUCCESS:
+ case CAL_CLIENT_GET_SUCCESS:
g_hash_table_insert (cache, ico->uid, ico);
-
break;
- case CAL_OBJ_FIND_SYNTAX_ERROR:
- printf ("calendar_iterate: syntax error uid=%s\n",
- uid);
- ico = NULL;
+ case CAL_CLIENT_GET_SYNTAX_ERROR:
+ printf ("calendar_iterate: syntax error uid=%s\n", uid);
break;
- case CAL_OBJ_FIND_NOT_FOUND:
- printf ("calendar_iterate: obj not found uid=%s\n",
- uid);
- ico = NULL;
+ case CAL_CLIENT_GET_NOT_FOUND:
+ printf ("calendar_iterate: obj not found uid=%s\n", uid);
break;
}
}