From d68f2316c6cb24dfdabe29c1d640f1929832a52b Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 21 Apr 2004 13:50:42 +0000 Subject: Fixes #55797 2004-04-21 JP Rosevear Fixes #55797 * gui/calendar-component.c (create_new_event): force an all day event if we are viewing the week, month or list view, which mimics double click in the view svn path=/trunk/; revision=25561 --- calendar/ChangeLog | 8 ++++++++ calendar/gui/calendar-component.c | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8382849a7a..6c465d80b7 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,11 @@ +2004-04-21 JP Rosevear + + Fixes #55797 + + * gui/calendar-component.c (create_new_event): force an all day + event if we are viewing the week, month or list view, which mimics + double click in the view + 2004-04-21 Frederic Crozat * gui/migration.c: (migrate_calendars): diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index e68a2f043d..930a80049e 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1058,9 +1058,18 @@ create_new_event (CalendarComponent *calendar_component, gboolean is_allday, gbo return; } - if (priv->calendar && (view = E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (priv->calendar)))) + if (priv->calendar && (view = E_CALENDAR_VIEW (gnome_calendar_get_current_view_widget (priv->calendar)))) { + GnomeCalendarViewType view_type; + + /* Force all for these view types because thats what's selected and it mimics a double click */ + view_type = gnome_calendar_get_view (priv->calendar); + if (view_type == GNOME_CAL_WEEK_VIEW + || view_type == GNOME_CAL_MONTH_VIEW + || view_type == GNOME_CAL_LIST_VIEW) + is_allday = TRUE; + e_calendar_view_new_appointment_full (view, is_allday, is_meeting); - else { + } else { ECalComponent *comp; EventEditor *editor; -- cgit