aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
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
parentc0754b634530142ce633207d42866175c506fade (diff)
downloadgsoc2013-evolution-90d533c1a3f7e6e24eb308b355aaabf95bb3c4c3.tar.gz
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')
-rw-r--r--calendar/gui/e-day-view.c10
-rw-r--r--calendar/gui/e-week-view.c9
2 files changed, 19 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);
}
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);
}