aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog11
-rw-r--r--calendar/gui/e-week-view-event-item.c8
-rw-r--r--calendar/gui/e-week-view.c6
-rw-r--r--calendar/gui/e-week-view.h3
4 files changed, 23 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index a088cbd14c..2cd6f8cb62 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,4 +1,15 @@
2007-08-24 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #468440
+
+ * gui/e-week-view-event-item.c: Dont popup if the event is destroyed
+ (e_week_view_event_item_button_press):
+ * gui/e-week-view.c: (e_week_view_init), Init a variable to tell the
+ event handler that the event is destroyed
+ (e_week_view_on_editing_stopped): Set event_destroyed.
+ * gui/e-week-view.h:
+
+2007-08-24 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #468411
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 0632862282..80625dbd3c 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -1575,8 +1575,14 @@ e_week_view_event_item_button_press (EWeekViewEventItem *wveitem,
return TRUE;
} else if (bevent->button.button == 3) {
- if (!GTK_WIDGET_HAS_FOCUS (week_view))
+ if (!GTK_WIDGET_HAS_FOCUS (week_view)) {
gtk_widget_grab_focus (GTK_WIDGET (week_view));
+ if (week_view->event_destroyed) {
+ week_view->event_destroyed = FALSE;
+ return FALSE;
+ }
+
+ }
e_week_view_set_selected_time_range_visible (week_view, event->start, event->end);
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 9f45787fe0..78d60c5280 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -454,7 +454,7 @@ e_week_view_init (EWeekView *week_view)
GTK_WIDGET_SET_FLAGS (week_view, GTK_CAN_FOCUS);
week_view->query = NULL;
-
+ week_view->event_destroyed = FALSE;
week_view->events = g_array_new (FALSE, FALSE,
sizeof (EWeekViewEvent));
week_view->events_sorted = TRUE;
@@ -3469,7 +3469,6 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
g_object_set (span->text_item, "handle_popup", FALSE, NULL);
g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
- g_assert (text != NULL);
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -3479,9 +3478,10 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
if (string_is_empty (text) && !on_server) {
e_cal_component_get_uid (comp, &uid);
-
+ g_signal_handlers_disconnect_by_func(item, e_week_view_on_text_item_event, week_view);
e_week_view_foreach_event_with_uid (week_view, uid,
e_week_view_remove_event_cb, NULL);
+ week_view->event_destroyed = TRUE;
gtk_widget_queue_draw (week_view->main_canvas);
e_week_view_check_layout (week_view);
goto out;
diff --git a/calendar/gui/e-week-view.h b/calendar/gui/e-week-view.h
index ea2e6afd31..e16729516d 100644
--- a/calendar/gui/e-week-view.h
+++ b/calendar/gui/e-week-view.h
@@ -331,7 +331,8 @@ struct _EWeekView
gchar *pm_string;
gint am_string_width;
gint pm_string_width;
-
+ gboolean event_destroyed;
+
/* remember last selected interval when click and restore on double click,
if we double clicked inside that interval. */
guint32 bc_event_time;