From 235b7ca66ce0e13c2464c53fc5acbf9a4b843c51 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Mon, 13 Apr 1998 22:21:17 +0000 Subject: Create new object and add it to the calendar. You can now select a range 1998-04-13 Federico Mena Quintero * gnome-cal.c (day_view_range_activated): Create new object and add it to the calendar. You can now select a range in the full-day view, hit Return, and a new event will be added at the selected range. I still have to figure out how to focus this new child. * gncal-full-day.c (paint_back): Rewrote function to avoid painting an area more than once -- eliminate flicker. (paint_back_rows): New function that calls paint_back() only for the area of the specified rows. (gncal_full_day_button_press): (gncal_full_day_button_release): (gncal_full_day_motion): Made these functions use paint_back_rows() instead of paint_back(), to eliminate flicker. Wheee! svn path=/trunk/; revision=129 --- calendar/gnome-cal.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'calendar/gnome-cal.c') diff --git a/calendar/gnome-cal.c b/calendar/gnome-cal.c index 9fa59a22d8..257dfe0532 100644 --- a/calendar/gnome-cal.c +++ b/calendar/gnome-cal.c @@ -42,18 +42,13 @@ static void day_view_range_activated (GncalFullDay *fullday, GnomeCalendar *gcal) { iCalObject *ical; - time_t start, end; ical = ical_new ("", user_name, ""); ical->new = 1; - gncal_full_day_selection_range (fullday, &start, &end); + gncal_full_day_selection_range (fullday, &ical->dtstart, &ical->dtend); - /* FIXME: this should insert the ical object into the calendar and somehow ask - * the fullday to update itself and focus the new child. - */ - -/* event_editor_new (gcal, ical); */ + gnome_calendar_add_object (gcal, ical); } static void -- cgit