aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-04-22 22:29:50 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-04-22 22:29:50 +0800
commit90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3 (patch)
treecb848399c52100798279303c5696402410f4d98b /calendar/gui/e-day-view.c
parentc0754b634530142ce633207d42866175c506fade (diff)
downloadgsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.gz
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.bz2
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.lz
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.xz
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.zst
gsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.zip
Fixes #56092
2004-04-22 JP Rosevear <jpr@ximian.com> Fixes #56092 * gui/e-day-view.c (e_day_view_show_popup_menu): weak ref for the menu to be destroyed (popup_destroyed_cb): reset popup_event_num and popup_event_day * gui/e-week-view.c (e_week_view_show_popup_menu): weak ref for the menu to be destroyed (popup_destroyed_cb): reset the popup_event_num svn path=/trunk/; revision=25583
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 4aa223228c..b3f65de4b3 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -3269,6 +3269,15 @@ e_day_view_on_event_double_click (EDayView *day_view,
}
static void
+popup_destroyed_cb (gpointer data, GObject *where_object_was)
+{
+ EDayView *day_view = data;
+
+ day_view->popup_event_day = -1;
+ day_view->popup_event_num = -1;
+}
+
+static void
e_day_view_show_popup_menu (EDayView *day_view,
GdkEvent *gdk_event,
gint day,
@@ -3280,6 +3289,7 @@ e_day_view_show_popup_menu (EDayView *day_view,
day_view->popup_event_num = event_num;
popup = e_calendar_view_create_popup_menu (E_CALENDAR_VIEW (day_view));
+ g_object_weak_ref (G_OBJECT (popup), popup_destroyed_cb, day_view);
e_popup_menu (popup, gdk_event);
}