Commit c4c3a08c authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Patch from Jamie <jamiemcc@blueyonder.co.uk>

2004-05-27  Alexander Larsson  <alexl@redhat.com>

	Patch from Jamie <jamiemcc@blueyonder.co.uk>

	* src/nautilus-application.c:
	(nautilus_application_close_all_spatial_windows):
	* src/nautilus-application.h:
	* src/nautilus-spatial-window-ui.xml:
	* src/nautilus-spatial-window.c:
	(file_menu_close_all_windows_callback), (real_merge_menus):
	Add close all spatial window menu entry.
parent 9f8ff706
2004-05-27 Alexander Larsson <alexl@redhat.com>
Patch from Jamie <jamiemcc@blueyonder.co.uk>
* src/nautilus-application.c:
(nautilus_application_close_all_spatial_windows):
* src/nautilus-application.h:
* src/nautilus-spatial-window-ui.xml:
* src/nautilus-spatial-window.c:
(file_menu_close_all_windows_callback), (real_merge_menus):
Add close all spatial window menu entry.
2004-05-24 Martin Wehner <martin.wehner@epost.de>
* libnautilus-private/nautilus-icon-canvas-item.c
......
......@@ -922,6 +922,25 @@ nautilus_application_close_parent_windows (NautilusSpatialWindow *window)
}
}
void
nautilus_application_close_all_spatial_windows (void)
{
GList *list_copy;
GList *l;
list_copy = g_list_copy (nautilus_application_spatial_window_list);
for (l = list_copy; l != NULL; l = l->next) {
NautilusWindow *window;
window = NAUTILUS_WINDOW (l->data);
if (NAUTILUS_IS_SPATIAL_WINDOW (window)) {
nautilus_window_close (window);
}
}
g_list_free (list_copy);
}
static void
nautilus_application_destroyed_window (GtkObject *object, NautilusApplication *application)
{
......
......@@ -81,6 +81,7 @@ NautilusWindow * nautilus_application_create_navigation_window (Nautilus
void nautilus_application_close_all_navigation_windows (void);
void nautilus_application_close_parent_windows (NautilusSpatialWindow *window);
void nautilus_application_close_all_spatial_windows (void);
void nautilus_application_open_desktop (NautilusApplication *application);
void nautilus_application_close_desktop (void);
......
......@@ -31,6 +31,10 @@
_tip="Close this folder's parents"
accel="*Control**Shift*w"
verb="Close Parent Folders"/>
<menuitem name="Close All Folders"
_label="Clos_e All Folders"
_tip="Close all folder windows"
verb="Close All Folders"/>
</placeholder>
</submenu>
......
......@@ -281,6 +281,14 @@ file_menu_close_parent_windows_callback (BonoboUIComponent *component,
nautilus_application_close_parent_windows (NAUTILUS_SPATIAL_WINDOW (user_data));
}
static void
file_menu_close_all_windows_callback (BonoboUIComponent *component,
gpointer user_data,
const char *verb)
{
nautilus_application_close_all_spatial_windows ();
}
static void
go_up_close_current_window_callback (BonoboUIComponent *component,
gpointer user_data,
......@@ -321,6 +329,7 @@ real_merge_menus (NautilusWindow *nautilus_window)
BonoboControl *control;
BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("Close Parent Folders", file_menu_close_parent_windows_callback),
BONOBO_UI_VERB ("Close All Folders", file_menu_close_all_windows_callback),
BONOBO_UI_VERB ("UpCloseCurrent", go_up_close_current_window_callback),
BONOBO_UI_VERB_END
};
......
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