From 2b89fd32201b191254e589cf405fe986dc7cd59f Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Fri, 6 Jul 2007 18:31:09 +0000 Subject: ** Fix for bug #321741 svn path=/trunk/; revision=33763 --- calendar/ChangeLog | 13 +++++++++++++ calendar/gui/calendar-component.c | 2 +- calendar/gui/e-calendar-view.c | 17 +++++++++-------- calendar/gui/e-calendar-view.h | 3 ++- calendar/gui/e-week-view.c | 2 +- 5 files changed, 26 insertions(+), 11 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 794865509b..abfe07f9bd 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,16 @@ +2007-07-03 Milan Crha + + ** Fix for bug #321741 + + * gui/e-calendar-view.h: + * gui/e-calendar-view.c: (e_calendar_view_new_appointment_full): + Added new parameter 'actual_day', with true always use actual day. + * gui/e-calendar-view.c: (on_new_event), (on_new_meeting), + (e_calendar_view_new_appointment): + * gui/calendar-component.c: (create_new_event): + * gui/e-week-view.c: (e_week_view_on_button_press): + Changing call of 'e_calendar_view_new_appointment_full'. + 2007-06-22 Milan Crha ** Fix for bug #328484 diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 90dd8426f6..f077199fa6 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -1268,7 +1268,7 @@ create_new_event (CalendarComponent *calendar_component, CalendarComponentView * || view_type == GNOME_CAL_LIST_VIEW) is_allday = TRUE; - e_calendar_view_new_appointment_full (view, is_allday, is_meeting); + e_calendar_view_new_appointment_full (view, is_allday, is_meeting, TRUE); } else { ECalComponent *comp; EventEditor *editor; diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index b398c00a27..243f6f9974 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1145,7 +1145,7 @@ on_new_event (EPopup *ep, EPopupItem *pitem, void *data) { ECalendarView *cal_view = data; - e_calendar_view_new_appointment_full (cal_view, TRUE, FALSE); + e_calendar_view_new_appointment_full (cal_view, TRUE, FALSE, FALSE); } static void @@ -1153,7 +1153,7 @@ on_new_meeting (EPopup *ep, EPopupItem *pitem, void *data) { ECalendarView *cal_view = data; - e_calendar_view_new_appointment_full (cal_view, FALSE, TRUE); + e_calendar_view_new_appointment_full (cal_view, FALSE, TRUE, FALSE); } static void @@ -1891,18 +1891,19 @@ e_calendar_view_new_appointment_for (ECalendarView *cal_view, * * Opens an event editor dialog for a new appointment. The appointment's * start and end times are set to the currently selected time range in - * the calendar view, with exception when this time is in past, then - * current date is used too. + * the calendar view. + * + * With @actual_day set to TRUE, there will be always used actual day. */ void -e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day, gboolean meeting) +e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day, gboolean meeting, gboolean actual_day) { time_t dtstart, dtend; g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); - if (!e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend) || - dtstart / (60 * 60 * 24) < time (NULL) / (60 * 60 * 24)) { + if (actual_day || + !e_calendar_view_get_selected_time_range (cal_view, &dtstart, &dtend)) { dtstart = time (NULL); dtend = dtstart + 3600; } @@ -1918,7 +1919,7 @@ e_calendar_view_new_appointment (ECalendarView *cal_view) { g_return_if_fail (E_IS_CALENDAR_VIEW (cal_view)); - e_calendar_view_new_appointment_full (cal_view, FALSE, FALSE); + e_calendar_view_new_appointment_full (cal_view, FALSE, FALSE, FALSE); } /* Ensures the calendar is selected */ diff --git a/calendar/gui/e-calendar-view.h b/calendar/gui/e-calendar-view.h index c82da57488..8f074869c8 100644 --- a/calendar/gui/e-calendar-view.h +++ b/calendar/gui/e-calendar-view.h @@ -152,7 +152,8 @@ void e_calendar_view_new_appointment_for (ECalendarView *cal_view, gboolean meeting); void e_calendar_view_new_appointment_full (ECalendarView *cal_view, gboolean all_day, - gboolean meeting); + gboolean meeting, + gboolean actual_day); void e_calendar_view_new_appointment (ECalendarView *cal_view); void e_calendar_view_edit_appointment (ECalendarView *cal_view, ECal *client, diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 4690ee2241..c52882a5e7 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2061,7 +2061,7 @@ e_week_view_on_button_press (GtkWidget *widget, return FALSE; if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { - e_calendar_view_new_appointment_full (E_CALENDAR_VIEW (week_view), TRUE, FALSE); + e_calendar_view_new_appointment_full (E_CALENDAR_VIEW (week_view), TRUE, FALSE, FALSE); return TRUE; } -- cgit