Commit 612ed122 authored by Michael Meeks's avatar Michael Meeks Committed by Michael Meeks

fix container ref leak.

2001-12-12  Michael Meeks  <michael@ximian.com>

	* src/file-manager/fm-icon-view.c
	(fm_icon_view_merge_menus): fix container ref leak.

	* src/file-manager/fm-search-list-view.c
	(real_merge_menus): ditto.

	* src/file-manager/fm-desktop-icon-view.c
	(fm_desktop_icon_view_destroy): more guards.
	(real_merge_menus): fix container ref leak.
parent f9769d4c
2001-12-12 Michael Meeks <michael@ximian.com>
* src/file-manager/fm-icon-view.c
(fm_icon_view_merge_menus): fix container ref leak.
* src/file-manager/fm-search-list-view.c
(real_merge_menus): ditto.
* src/file-manager/fm-desktop-icon-view.c
(fm_desktop_icon_view_destroy): more guards.
(real_merge_menus): fix container ref leak.
2001-12-12 Michael Meeks <michael@ximian.com>
* src/nautilus-window.c (nautilus_window_destroy):
......
......@@ -258,6 +258,7 @@ fm_desktop_icon_view_destroy (GtkObject *object)
if (icon_view->details->ui != NULL) {
bonobo_ui_component_unset_container (icon_view->details->ui, NULL);
bonobo_object_unref (BONOBO_OBJECT (icon_view->details->ui));
icon_view->details->ui = NULL;
}
free_volume_black_list (icon_view);
......@@ -1236,6 +1237,7 @@ static void
real_merge_menus (FMDirectoryView *view)
{
FMDesktopIconView *desktop_view;
Bonobo_UIContainer ui_container;
BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("Change Background", change_background_callback),
BONOBO_UI_VERB ("Empty Trash Conditional", empty_trash_callback),
......@@ -1250,9 +1252,11 @@ real_merge_menus (FMDirectoryView *view)
desktop_view = FM_DESKTOP_ICON_VIEW (view);
desktop_view->details->ui = bonobo_ui_component_new ("Desktop Icon View");
ui_container = fm_directory_view_get_bonobo_ui_container (view);
bonobo_ui_component_set_container (desktop_view->details->ui,
fm_directory_view_get_bonobo_ui_container (view),
NULL);
ui_container, NULL);
bonobo_object_release_unref (ui_container, NULL);
bonobo_ui_util_set_ui (desktop_view->details->ui,
DATADIR,
"nautilus-desktop-icon-view-ui.xml",
......
......@@ -1311,6 +1311,7 @@ static void
fm_icon_view_merge_menus (FMDirectoryView *view)
{
FMIconView *icon_view;
Bonobo_UIContainer ui_container;
BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("Rename", rename_icon_callback),
BONOBO_UI_VERB ("Stretch", show_stretch_handles_callback),
......@@ -1328,9 +1329,10 @@ fm_icon_view_merge_menus (FMDirectoryView *view)
icon_view->details->ui = bonobo_ui_component_new ("Icon View");
g_signal_connect (icon_view->details->ui,
"ui_event", G_CALLBACK (handle_ui_event), icon_view);
ui_container = fm_directory_view_get_bonobo_ui_container (view);
bonobo_ui_component_set_container (icon_view->details->ui,
fm_directory_view_get_bonobo_ui_container (view),
NULL);
ui_container, NULL);
bonobo_object_release_unref (ui_container, NULL);
bonobo_ui_util_set_ui (icon_view->details->ui,
DATADIR,
"nautilus-icon-view-ui.xml",
......
......@@ -713,6 +713,7 @@ static void
real_merge_menus (FMDirectoryView *view)
{
FMSearchListView *search_view;
Bonobo_UIContainer ui_container;
BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("Indexing Info", indexing_info_callback),
BONOBO_UI_VERB ("Reveal", reveal_selected_items_callback),
......@@ -724,9 +725,10 @@ real_merge_menus (FMDirectoryView *view)
search_view = FM_SEARCH_LIST_VIEW (view);
search_view->details->ui = bonobo_ui_component_new ("Search List View");
ui_container = fm_directory_view_get_bonobo_ui_container (view);
bonobo_ui_component_set_container (search_view->details->ui,
fm_directory_view_get_bonobo_ui_container (view),
NULL);
ui_container, NULL);
bonobo_object_release_unref (ui_container, NULL);
bonobo_ui_util_set_ui (search_view->details->ui,
DATADIR,
"nautilus-search-list-view-ui.xml",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment