aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-07 02:31:09 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-07-07 02:31:09 +0800
commit2b89fd32201b191254e589cf405fe986dc7cd59f (patch)
tree57f70cd7f5bbb11c1da3fdde85153820df1128c9 /calendar
parent4e4d7e38f19498e1840f22e3aa42335ccea5ec45 (diff)
downloadgsoc2013-evolution-2b89fd32201b191254e589cf405fe986dc7cd59f.tar.gz
gsoc2013-evolution-2b89fd32201b191254e589cf405fe986dc7cd59f.tar.zst
gsoc2013-evolution-2b89fd32201b191254e589cf405fe986dc7cd59f.zip
** Fix for bug #321741
svn path=/trunk/; revision=33763
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog13
-rw-r--r--calendar/gui/calendar-component.c2
-rw-r--r--calendar/gui/e-calendar-view.c17
-rw-r--r--calendar/gui/e-calendar-view.h3
-rw-r--r--calendar/gui/e-week-view.c2
5 files changed, 26 insertions, 11 deletions
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 <mcrha@redhat.com>
+
+ ** 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 <mcrha@redhat.com>
** 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;
}