[patch] Change "Close all parents" to be "Close parent folders"
- From: "David Adam Bordoley" <bordoley msu edu>
- To: nautilus-list gnome org
- Subject: [patch] Change "Close all parents" to be "Close parent folders"
- Date: Mon, 24 Nov 2003 04:46:27 -0500
This patch changes the behavior of the "Close all parents" menu item in
spatial mode to be "Close Parent Folders."
The change in behavior is that this menu item now only closes a folder's
parents not the folder itself. I also changed the menu label to better
clarify this as the behavior (imo).
Why is this better?
Well from my personal use, I find that I tend to keep folders i'm working in
open for a while. In the case where a folder is deep in hierarchy I usually
just click till i get to it, then have to go close all the individual
folders that got me there. This change in behavior allows me to get to where
i'm going, then close all the folders that got me there in one quick step. I
think this is probably a much more useful menu item. With this patch, the
previous behavior only require two actions. one to close all parents and one
to close the current folder. For the use case i've targeted with this patch
many more clicks are required with the old behavior.
So what do you think?
dave
Index: src/nautilus-application.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.c,v
retrieving revision 1.210
diff -u -p -r1.210 nautilus-application.c
--- src/nautilus-application.c 6 Nov 2003 16:07:02 -0000 1.210
+++ src/nautilus-application.c 24 Nov 2003 09:32:57 -0000
@@ -879,20 +879,20 @@ find_parent_spatial_window (NautilusSpat
}
void
-nautilus_application_close_with_parent_windows (NautilusSpatialWindow *window)
+nautilus_application_close_parent_windows (NautilusSpatialWindow *window)
{
NautilusSpatialWindow *parent_window;
+ NautilusSpatialWindow *new_parent_window;
g_return_if_fail (NAUTILUS_IS_SPATIAL_WINDOW (window));
parent_window = find_parent_spatial_window (window);
- nautilus_window_close (NAUTILUS_WINDOW (window));
- window = parent_window;
while (parent_window) {
- parent_window = find_parent_spatial_window (window);
- nautilus_window_close (NAUTILUS_WINDOW (window));
- window = parent_window;
+
+ new_parent_window = find_parent_spatial_window (parent_window);
+ nautilus_window_close (NAUTILUS_WINDOW (parent_window));
+ parent_window = new_parent_window;
}
}
Index: src/nautilus-application.h
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-application.h,v
retrieving revision 1.34
diff -u -p -r1.34 nautilus-application.h
--- src/nautilus-application.h 6 Nov 2003 16:07:02 -0000 1.34
+++ src/nautilus-application.h 24 Nov 2003 09:32:58 -0000
@@ -78,7 +78,7 @@ NautilusWindow * nautilus_applicatio
NautilusWindow * nautilus_application_create_navigation_window (NautilusApplication *application,
GdkScreen *screen);
void nautilus_application_close_all_navigation_windows (void);
-void nautilus_application_close_with_parent_windows (NautilusSpatialWindow *window);
+void nautilus_application_close_parent_windows (NautilusSpatialWindow *window);
void nautilus_application_open_desktop (NautilusApplication *application);
void nautilus_application_close_desktop (void);
Index: src/nautilus-spatial-window-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-spatial-window-ui.xml,v
retrieving revision 1.3
diff -u -p -r1.3 nautilus-spatial-window-ui.xml
--- src/nautilus-spatial-window-ui.xml 6 Nov 2003 16:07:02 -0000 1.3
+++ src/nautilus-spatial-window-ui.xml 24 Nov 2003 09:32:58 -0000
@@ -23,10 +23,10 @@
</placeholder>
<placeholder name="Close Items Placeholder">
<menuitem name="Close With Parents"
- _label="Close _All Parents"
- _tip="Close all Navigation windows"
+ _label="Close P_arent Folders"
+ _tip="Close this folder's parents"
accel="*Control**Shift*w"
- verb="Close With Parents"/>
+ verb="Close Parent Folders"/>
</placeholder>
</submenu>
Index: src/nautilus-spatial-window.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-spatial-window.c,v
retrieving revision 1.417
diff -u -p -r1.417 nautilus-spatial-window.c
--- src/nautilus-spatial-window.c 11 Oct 2003 17:26:39 -0000 1.417
+++ src/nautilus-spatial-window.c 24 Nov 2003 09:32:58 -0000
@@ -239,11 +239,11 @@ nautilus_spatial_window_show (GtkWidget
}
static void
-file_menu_close_with_parent_windows_callback (BonoboUIComponent *component,
+file_menu_close_parent_windows_callback (BonoboUIComponent *component,
gpointer user_data,
const char *verb)
{
- nautilus_application_close_with_parent_windows (NAUTILUS_SPATIAL_WINDOW (user_data));
+ nautilus_application_close_parent_windows (NAUTILUS_SPATIAL_WINDOW (user_data));
}
static void
@@ -275,7 +275,7 @@ real_merge_menus (NautilusWindow *nautil
{
NautilusSpatialWindow *window;
BonoboUIVerb verbs [] = {
- BONOBO_UI_VERB ("Close With Parents", file_menu_close_with_parent_windows_callback),
+ BONOBO_UI_VERB ("Close Parent Folders", file_menu_close_parent_windows_callback),
BONOBO_UI_VERB_END
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]