aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog12
-rw-r--r--calendar/gui/calendar-commands.c2
-rw-r--r--calendar/gui/e-week-view-event-item.c8
-rw-r--r--calendar/gui/e-week-view.c11
4 files changed, 31 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 13918e0985..cb95e8f516 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,15 @@
+2008-01-10 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #457842
+
+ * gui/e-week-view-event-item.c: (e_week_view_event_item_double_click):
+ * gui/e-week-view.c: (e_week_view_start_editing_event):
+ Do not call edit/start editing of the event when double clicked
+ on the same component as is actually editing.
+
+ * gui/calendar-commands.c: (gcal_calendar_selection_changed_cb):
+ Removed forgotten printf call.
+
2008-01-06 Michael Monreal <michael.monreal@gmx.net>
** Fix for bug #492188
diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c
index b4d46d358e..e3fddaf99f 100644
--- a/calendar/gui/calendar-commands.c
+++ b/calendar/gui/calendar-commands.c
@@ -490,8 +490,6 @@ gcal_calendar_selection_changed_cb (GnomeCalendar *gcal, gpointer data)
control = BONOBO_CONTROL (data);
- printf("calendar selection changed\n");
-
calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
}
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index f31932b050..733ea7a3c8 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -1667,6 +1667,14 @@ e_week_view_event_item_double_click (EWeekViewEventItem *wveitem,
event = &g_array_index (week_view->events, EWeekViewEvent,
wveitem->event_num);
+ if (week_view->editing_event_num >= 0) {
+ EWeekViewEvent *editing = &g_array_index (week_view->events, EWeekViewEvent, week_view->editing_event_num);
+
+ /* do not call edit of the component, if double clicked on the same component - the event is spread into more days */
+ if (editing && event && editing->comp_data == event->comp_data)
+ return TRUE;
+ }
+
e_week_view_stop_editing_event (week_view);
e_calendar_view_edit_appointment (E_CALENDAR_VIEW (week_view), event->comp_data->client, event->comp_data->icalcomp, FALSE);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 0c3ca360ad..c7004cbbd1 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2943,6 +2943,14 @@ e_week_view_start_editing_event (EWeekView *week_view,
if (!span->text_item)
return FALSE;
+ if (week_view->editing_event_num >= 0) {
+ EWeekViewEvent *editing = &g_array_index (week_view->events, EWeekViewEvent, week_view->editing_event_num);
+
+ /* do not change to other part of same component - the event is spread into more days */
+ if (editing && event && editing->comp_data == event->comp_data)
+ return FALSE;
+ }
+
if (initial_text) {
gnome_canvas_item_set (span->text_item,
"text", initial_text,
@@ -2960,6 +2968,9 @@ e_week_view_start_editing_event (EWeekView *week_view,
event = &g_array_index (week_view->events, EWeekViewEvent, event_num);
if (event_num >= week_view->events->len || event->comp_data != comp_data) {
+ /* When got in because of other comp_data, then be sure we go through all events */
+ event_num = week_view->events->len;
+
/* Unfocussing can cause a removal but not a new
* addition so just run backwards through the
* events */