diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-03-29 05:57:07 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-03-29 05:57:07 +0800 |
commit | 02546395deebd56211a55a7f8e9ad2bf00adddf0 (patch) | |
tree | 8f9e4b95a5d423d71964aec0d14801f0be76c804 /calendar/gui/e-week-view.c | |
parent | 583bbec280424953b29502d0e8ba6e0e0947853b (diff) | |
download | gsoc2013-evolution-02546395deebd56211a55a7f8e9ad2bf00adddf0.tar.gz gsoc2013-evolution-02546395deebd56211a55a7f8e9ad2bf00adddf0.tar.zst gsoc2013-evolution-02546395deebd56211a55a7f8e9ad2bf00adddf0.zip |
Hold weak references to the CalComponent instead of connecting to the
2003-03-28 Hans Petter Jansson <hpj@ximian.com>
* gui/e-day-view.c (comp_destroy_cb)
(e_day_view_on_long_event_button_press)
(e_day_view_on_event_button_press)
(e_day_view_on_long_event_click)
(e_day_view_on_event_click)
(e_day_view_on_event_double_click)
(e_day_view_on_delete_appointment): Hold weak references to the
CalComponent instead of connecting to the "destroy" signal.
* gui/e-week-view.c (comp_destroy_cb)
(e_week_view_on_text_item_event): Ditto.
svn path=/trunk/; revision=20566
Diffstat (limited to 'calendar/gui/e-week-view.c')
-rw-r--r-- | calendar/gui/e-week-view.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 07429cf771..06d3dfb906 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -3014,7 +3014,7 @@ cancel_editing (EWeekView *week_view) * a pointer to a boolean; will set it to TRUE. */ static void -comp_destroy_cb (GtkObject *object, gpointer data) +comp_destroy_cb (gpointer data, GObject *deadbeef) { gboolean *destroyed; @@ -3077,19 +3077,17 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, if (gdkevent->button.button == 3) { EWeekViewEvent *e; gboolean destroyed; - int id; e = &g_array_index (week_view->events, EWeekViewEvent, event_num); destroyed = FALSE; - id = g_signal_connect (e->comp, "destroy", - G_CALLBACK (comp_destroy_cb), &destroyed); + g_object_weak_ref ((GObject *) e->comp, comp_destroy_cb, &destroyed); if (!GTK_WIDGET_HAS_FOCUS (week_view)) gtk_widget_grab_focus (GTK_WIDGET (week_view)); if (!destroyed) { - g_signal_handler_disconnect (e->comp, id); + g_object_weak_unref ((GObject *) e->comp, comp_destroy_cb, &destroyed); e_week_view_set_selected_time_range_visible (week_view, e->start, e->end); |