aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-11-15 04:45:46 +0800
committerDamon Chaplin <damon@src.gnome.org>2001-11-15 04:45:46 +0800
commit2829e1602b1d53832d6e6ff441bdeb36c778a70d (patch)
tree41f39480dc8c937acd2e97a25c96f977ffca907e /calendar/gui/e-week-view.c
parent21a7225dbcde4ec617ffd51f1f633f4c6750d024 (diff)
downloadgsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar.gz
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar.bz2
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar.lz
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar.xz
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.tar.zst
gsoc2013-evolution-2829e1602b1d53832d6e6ff441bdeb36c778a70d.zip
(committed to CVS by Damon) Fixes bug #15137.
2001-11-13 Federico Mena Quintero <federico@ximian.com> (committed to CVS by Damon) Fixes bug #15137. * gui/e-day-view.c (e_day_view_on_delete_appointment): Do not try to operate on the event if it gets deleted while stopping the edition. (e_day_view_on_event_double_click): Likewise. (e_day_view_on_long_event_button_press): Likewise. (e_day_view_on_event_button_press): Likewise. (e_day_view_on_long_event_click): Likewise. (e_day_view_on_event_click): Likewise. * gui/e-week-view.c (e_week_view_on_text_item_event): Likewise. svn path=/trunk/; revision=14701
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 53376ba352..ba54529e4b 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -2914,6 +2914,19 @@ cancel_editing (EWeekView *week_view)
e_week_view_stop_editing_event (week_view);
}
+/* Callback used when a component is destroyed. Expects the closure data to be
+ * a pointer to a boolean; will set it to TRUE.
+ */
+static void
+comp_destroy_cb (GtkObject *object, gpointer data)
+{
+ gboolean *destroyed;
+
+ destroyed = data;
+ *destroyed = TRUE;
+}
+
+
static gboolean
e_week_view_on_text_item_event (GnomeCanvasItem *item,
GdkEvent *gdkevent,
@@ -2966,11 +2979,27 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item,
return FALSE;
if (gdkevent->button.button == 3) {
+ EWeekViewEvent *e;
+ gboolean destroyed;
+ int id;
+
+ e = &g_array_index (week_view->events, EWeekViewEvent, event_num);
+
+ destroyed = FALSE;
+ id = gtk_signal_connect (GTK_OBJECT (e->comp), "destroy",
+ GTK_SIGNAL_FUNC (comp_destroy_cb), &destroyed);
+
if (!GTK_WIDGET_HAS_FOCUS (week_view))
gtk_widget_grab_focus (GTK_WIDGET (week_view));
- e_week_view_show_popup_menu (week_view,
- (GdkEventButton*) gdkevent,
- event_num);
+
+ if (!destroyed) {
+ gtk_signal_disconnect (GTK_OBJECT (e->comp), id);
+
+ e_week_view_show_popup_menu (week_view,
+ (GdkEventButton*) gdkevent,
+ event_num);
+ }
+
gtk_signal_emit_stop_by_name (GTK_OBJECT (item->canvas),
"button_press_event");
return TRUE;