aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-commands.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@src.gnome.org>2000-05-24 04:52:12 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2000-05-24 04:52:12 +0800
commit910e86eba685c2eddbd9ebd48b25391490d5f24b (patch)
tree4f9f9106343ce0f4615b333e18e329ce4b07a07d /calendar/gui/calendar-commands.c
parent46700211974920a7a79c82d2ad4420934d3e7266 (diff)
downloadgsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar.gz
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar.bz2
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar.lz
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar.xz
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.tar.zst
gsoc2013-evolution-910e86eba685c2eddbd9ebd48b25391490d5f24b.zip
Commit for if my laptop dies - Federico
svn path=/trunk/; revision=3185
Diffstat (limited to 'calendar/gui/calendar-commands.c')
-rw-r--r--calendar/gui/calendar-commands.c70
1 files changed, 2 insertions, 68 deletions
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index 3524c3d53b..5726f45362 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -325,9 +325,11 @@ show_month_view_clicked (BonoboUIHandler *uih, void *user_data, const char *path
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
}
static void
@@ -878,71 +880,3 @@ calendar_iterate_free_cache_entry (gpointer key,
{
ical_object_unref ((iCalObject*) value);
}
-
-
-static gint
-calendar_object_compare_by_start (gconstpointer a, gconstpointer b)
-{
- const CalendarObject *ca = a;
- const CalendarObject *cb = b;
- time_t diff;
-
- diff = ca->ev_start - cb->ev_start;
- return (diff < 0) ? -1 : (diff > 0) ? 1 : 0;
-}
-
-/* FIXME -- where should this (and calendar_object_compare_by_start) go? */
-/* FIXME -- for recurring events we should only load the iCalObject once. */
-/* returns a list of events in the form of CalendarObject* */
-GList*
-calendar_get_events_in_range (CalClient *calc,
- time_t start, time_t end)
-{
- GList *l, *cois, *res = NULL;
- CalObjFindStatus status;
- CalObjInstance *coi;
- char *uid, *obj_string;
- iCalObject *ico;
- CalendarObject *co;
-
- cois = cal_client_get_events_in_range (calc, start, end);
-
- for (l = cois; l; l = l->next) {
- coi = l->data;
- uid = coi->uid;
- obj_string = cal_client_get_object (calc, uid);
-
- status = ical_object_find_in_string (uid, obj_string, &ico);
- g_free (obj_string);
-
- switch (status){
- case CAL_OBJ_FIND_SUCCESS:
- co = g_new (CalendarObject, 1);
- co->ev_start = coi->start;
- co->ev_end = coi->end;
- co->ico = ico;
-
- res = g_list_prepend (res, co);
- break;
- case CAL_OBJ_FIND_SYNTAX_ERROR:
- printf ("calendar_get_events_in_range: "
- "syntax error uid=%s\n", uid);
- break;
- case CAL_OBJ_FIND_NOT_FOUND:
- printf ("calendar_get_events_in_range: "
- "obj not found uid=%s\n", uid);
- break;
- }
-
- g_free (uid);
- g_free (coi);
- }
-
- g_list_free (cois);
-
- /* Sort the list here, since it is more efficient to sort it once
- rather doing lots of sorted insertions. */
- res = g_list_sort (res, calendar_object_compare_by_start);
-
- return res;
-}