diff options
author | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-02-16 02:17:29 +0000 |
---|---|---|
committer | Maciej Stachowiak <mstachow@src.gnome.org> | 2000-02-16 02:17:29 +0000 |
commit | 8b49231afadff23cb0f4cd070caeab7e7e1362c9 (patch) | |
tree | 5c960fb21e05f32d50b154ad67313295e0a15d94 /src/ntl-index-panel.c | |
parent | 0189d027a659503b9248cda8c81739572b1ac57d (diff) | |
download | nautilus-8b49231afadff23cb0f4cd070caeab7e7e1362c9.tar.gz |
sink and ref the notebook and unref in the destructor, so it gets
* src/ntl-index-panel.c: sink and ref the notebook and unref in
the destructor, so it gets destroyed even if it never ends up
getting added to the index panel.
* src/ntl-view-nautilus.c: Don't ref the Control interface we just
QI'd; query_interface implicitly refs.
Diffstat (limited to 'src/ntl-index-panel.c')
-rw-r--r-- | src/ntl-index-panel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ntl-index-panel.c b/src/ntl-index-panel.c index 846d2cb33..bc262607e 100644 --- a/src/ntl-index-panel.c +++ b/src/ntl-index-panel.c @@ -144,6 +144,9 @@ nautilus_index_panel_initialize (GtkObject *object) /* allocate and install the meta-tabs */ index_panel->details->notebook = gtk_notebook_new (); + gtk_widget_ref (index_panel->details->notebook); + gtk_object_sink (GTK_OBJECT (index_panel->details->notebook)); + gtk_widget_set_usize (index_panel->details->notebook, INDEX_PANEL_WIDTH, 200); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(index_panel->details->notebook), FALSE); @@ -160,6 +163,8 @@ nautilus_index_panel_destroy (GtkObject *object) index_panel = NAUTILUS_INDEX_PANEL (object); + gtk_widget_unref (index_panel->details->notebook); + NAUTILUS_CALL_PARENT_CLASS (GTK_OBJECT_CLASS, destroy, (object)); } @@ -243,7 +248,7 @@ nautilus_index_panel_add_meta_view (NautilusIndexPanel *index_panel, NautilusVie gtk_notebook_append_page (GTK_NOTEBOOK (index_panel->details->notebook), GTK_WIDGET (meta_view), label); page_num = gtk_notebook_page_num (GTK_NOTEBOOK (index_panel->details->notebook), GTK_WIDGET (meta_view)); - + /* tell the index tabs about it */ nautilus_index_tabs_add_view(NAUTILUS_INDEX_TABS(index_panel->details->index_tabs), description, GTK_WIDGET(meta_view), page_num); |