[anjuta] anjuta: Fix destruction of the AnjutaUI instance.
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] anjuta: Fix destruction of the AnjutaUI instance.
- Date: Tue, 27 Nov 2012 20:46:28 +0000 (UTC)
commit 8d9618607578834367dfdc61fd7db44e5c9ef9dc
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date: Sun Nov 25 22:14:03 2012 +0100
anjuta: Fix destruction of the AnjutaUI instance.
AnjutaUI is a not a GtkWidget so call g_object_unref() instead of gtk_widget_destroy() on
it. Also disconnect the signal handlers from the GdlLayoutManager when the AnjutaWindow
is disposed so we don't get any stray signals.
https://bugzilla.gnome.org/show_bug.cgi?id=689054
src/anjuta-window.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/anjuta-window.c b/src/anjuta-window.c
index 1fb58c8..7162bac 100644
--- a/src/anjuta-window.c
+++ b/src/anjuta-window.c
@@ -546,8 +546,17 @@ anjuta_window_dispose (GObject *widget)
g_hash_table_destroy (win->values);
win->values = NULL;
}
-
+ if (win->ui) {
+ g_object_unref (win->ui);
+ win->ui = NULL;
+ }
if (win->layout_manager) {
+ /* Disconnect signal handlers so we don't get any signals after we're
+ * disposed. */
+ g_signal_handlers_disconnect_by_func (win->layout_manager, on_layout_dirty_notify,
+ win);
+ g_signal_handlers_disconnect_by_func (gdl_dock_layout_get_master (win->layout_manager),
+ on_layout_locked_notify, win);
g_object_unref (win->layout_manager);
win->layout_manager = NULL;
}
@@ -581,7 +590,6 @@ anjuta_window_finalize (GObject *widget)
win = ANJUTA_WINDOW (widget);
- gtk_widget_destroy (GTK_WIDGET (win->ui));
gtk_widget_destroy (GTK_WIDGET (win->preferences));
G_OBJECT_CLASS (parent_class)->finalize (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]