aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-week-view.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r--calendar/gui/e-week-view.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 5feb39bfbb..00dc957248 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -3703,6 +3703,14 @@ e_week_view_key_press (GtkWidget *widget, GdkEventKey *event)
return handled;
}
+static void
+popup_destroyed_cb (gpointer data, GObject *where_object_was)
+{
+ EWeekView *week_view = data;
+
+ week_view->popup_event_num = -1;
+}
+
void
e_week_view_show_popup_menu (EWeekView *week_view,
GdkEventButton *bevent,
@@ -3713,6 +3721,7 @@ e_week_view_show_popup_menu (EWeekView *week_view,
week_view->popup_event_num = event_num;
popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (week_view));
+ g_object_weak_ref (G_OBJECT (popup), popup_destroyed_cb, week_view);
e_popup_menu (popup, (GdkEvent *) bevent);
}