evolution r34789 - in trunk/calendar: . gui



Author: mcrha
Date: Thu Jan 10 11:32:41 2008
New Revision: 34789
URL: http://svn.gnome.org/viewvc/evolution?rev=34789&view=rev

Log:
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.



Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/gui/calendar-commands.c
   trunk/calendar/gui/e-week-view-event-item.c
   trunk/calendar/gui/e-week-view.c

Modified: trunk/calendar/gui/calendar-commands.c
==============================================================================
--- trunk/calendar/gui/calendar-commands.c	(original)
+++ trunk/calendar/gui/calendar-commands.c	Thu Jan 10 11:32:41 2008
@@ -490,8 +490,6 @@
 
 	control = BONOBO_CONTROL (data);
 
-	printf("calendar selection changed\n");
-
 	calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
 }
 

Modified: trunk/calendar/gui/e-week-view-event-item.c
==============================================================================
--- trunk/calendar/gui/e-week-view-event-item.c	(original)
+++ trunk/calendar/gui/e-week-view-event-item.c	Thu Jan 10 11:32:41 2008
@@ -1667,6 +1667,14 @@
 	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);

Modified: trunk/calendar/gui/e-week-view.c
==============================================================================
--- trunk/calendar/gui/e-week-view.c	(original)
+++ trunk/calendar/gui/e-week-view.c	Thu Jan 10 11:32:41 2008
@@ -2943,6 +2943,14 @@
 	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 @@
 		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 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]