[PATCH] Improve directory view accel handling (was: renaming on desktop)



On Sun, 2004-05-09 at 13:00 +0000, David Christian Berg wrote:
> Are you guys aware, that renaming on the desktop via F2 doesn't work, or
> should I file a bug? I'm using Nautilus 2.6.1, Debian experimental
> package.

Thanks for pointing this out! The problem was that the accels were bound
to the menu items instead of being bound to the commands themselves. The
attached patch fixes this. Note that after applying this patch the
context menu items have accels as well. If that isn't desirable, I can
rework this patch to have the accels inside the menu and inside the
keybindings section.

regs,
 Chris
Index: src/file-manager/nautilus-directory-view-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/nautilus-directory-view-ui.xml,v
retrieving revision 1.63
diff -u -r1.63 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml	28 Jan 2004 07:36:16 -0000	1.63
+++ src/file-manager/nautilus-directory-view-ui.xml	9 May 2004 11:39:27 -0000
@@ -2,10 +2,12 @@
 <commands>
 	<cmd name="Rename"
          _label="_Rename..."
-	 _tip="Rename selected item"/>
+	 _tip="Rename selected item"
+	 accel="F2"/>
 	<cmd name="Create Link"
          _label="Ma_ke Link"
-	 _tip="Create a symbolic link for each selected item"/>
+	 _tip="Create a symbolic link for each selected item"
+	 accel="*Control*m"/>
 	<cmd name="Delete"
          _label="_Delete"
 	 _tip="Delete each selected item, without moving to the Trash"/>
@@ -17,7 +19,8 @@
 	 _tip="Delete all items in the Trash"/>
 	<cmd name="New Folder"
          _label="Create _Folder"
-	 _tip="Create a new empty folder inside this folder"/>
+	 _tip="Create a new empty folder inside this folder"
+	 accel="*Shift**Control*n"/>
 	<cmd name="New Empty File"
          _label="_Empty File"
 	 _tip="Create a new empty file inside this folder"/>
@@ -29,10 +32,12 @@
          _tip="Edit the launcher information"/>
 	<cmd name="Open"
          _label="_Open"
-	 _tip="Open the selected item in this window"/>
+	 _tip="Open the selected item in this window"
+	 accel="*Control*o"/>
 	<cmd name="OpenAlternate"
          _label="Open in Navigation Window"
-	 _tip="Open each selected item in a navigation window"/>
+	 _tip="Open each selected item in a navigation window"
+	 accel="*Control**Shift*o"/>
 	<cmd name="Open Scripts Folder"
          _label="_Open Scripts Folder"
 	 _tip="Show the folder containing the scripts that appear in this menu"/>
@@ -47,28 +52,35 @@
 	 _tip="Use the default background for this location"/>
 	<cmd name="Cut Files"
          _label="Cu_t Files"
-	 _tip="Prepare the selected files to be moved with a Paste Files command"/>
+	 _tip="Prepare the selected files to be moved with a Paste Files command"
+	 accel="*Control*x"/>
 	<cmd name="Copy Files"
          _label="_Copy Files"
-	 _tip="Prepare the selected files to be copied with a Paste Files command"/>
+	 _tip="Prepare the selected files to be copied with a Paste Files command"
+	 accel="*Control*c"/>
 	<cmd name="Paste Files"
          _label="_Paste Files"
-	 _tip="Move or copy files previously selected by a Cut Files or Copy Files command"/>
+	 _tip="Move or copy files previously selected by a Cut Files or Copy Files command"
+	 accel="*Control*v"/>
 	<cmd name="Paste Files Into"
          _label="_Paste Files Into Folder"
 	 _tip="Move or copy files previously selected by a Cut Files or Copy Files command into the selected folder"/>
 	<cmd name="Select All"
          _label="Select _All Files"
-	 _tip="Select all items in this window"/>
+	 _tip="Select all items in this window"
+	 accel="*Control*a"/>
 	<cmd name="Select Pattern"
          _label="Select _Pattern"
-	 _tip="Select items in this window matching a given pattern"/>
+	 _tip="Select items in this window matching a given pattern"
+	 accel="*Control*s"/>
 	<cmd name="Properties"
          _label="_Properties"
-	 _tip="View or modify the properties of each selected item"/>
+	 _tip="View or modify the properties of each selected item"
+	 accel="*Alt*Return"/>
 	<cmd name="Trash"
          _label="Mo_ve to Trash"
-	 _tip="Move each selected item to the Trash"/>
+	 _tip="Move each selected item to the Trash"
+	 accel="Delete"/>
 	<cmd name="Unmount Volume Conditional"
          _label="_Unmount Volume"
          _tip="Unmount the selected volume"/>
@@ -89,10 +101,10 @@
 	<accel name="*Control*BackSpace" verb="Trash"/>
 	<accel name="*Control*T" verb="Trash"/>
 	<accel name="KP_Delete" verb="Trash"/>
-	<accel name="Delete" verb="Trash"/>
 	<accel name="*Shift*KP_Delete" verb="Delete"/>
-        <accel name="*Alt*Down" verb="Open"/>
-        <accel name="*Alt**Shift*Down" verb="OpenCloseParent"/>
+	<accel name="*Shift*Delete" verb="Delete"/>
+	<accel name="*Alt*Down" verb="Open"/>
+	<accel name="*Alt**Shift*Down" verb="OpenCloseParent"/>
 	<accel name="*Control*i" verb="Properties"/>
 </keybindings>
 <menu>
@@ -100,7 +112,6 @@
 
 		<placeholder name="New Items Placeholder">
 			<menuitem name="New Folder"
-			  	  accel="*Shift**Control*n"
 				  verb="New Folder"/>
 			<submenu name="New Documents"
 				 _label="Create _Document">
@@ -118,11 +129,9 @@
 		</placeholder>
 		<placeholder name="Open Placeholder">
 			<menuitem name="Open"
-                                  accel="*Control*o"
 				  pixtype="stock" pixname="gtk-open"
 				  verb="Open"/>
 			<menuitem name="OpenAlternate"
-				  accel="*Control**Shift*o"
 				  verb="OpenAlternate"/>
 			<submenu name="Open With" 
 				 _label="Open Wit_h" 
@@ -146,7 +155,6 @@
 		<placeholder name="File Items Placeholder">
 			<menuitem name="Properties"
                                   pixtype="stock" pixname="gtk-properties"
-				  accel="*Alt*Return"
 				  verb="Properties"/>
 		</placeholder>
 		<placeholder name="Global File Items Placeholder">
@@ -157,24 +165,19 @@
 
 	<submenu name="Edit">
 		<menuitem name="Cut"
-			  accel="*Control*x"
 			  pixtype="stock" pixname="gtk-cut"
 			  verb="Cut Files"/>
 		<menuitem name="Copy"
-			  accel="*Control*c"
 			  pixtype="stock" pixname="gtk-copy"
 			  verb="Copy Files"/>
 		<menuitem name="Paste"
-			  accel="*Control*v"
 			  pixtype="stock" pixname="gtk-paste"
 			  verb="Paste Files"/>
 
 		<placeholder name="Select Items">
 		<menuitem name="Select All"
-			  accel="*Control*a"
 			  verb="Select All"/>
 		<menuitem name="Select Pattern"
-			  accel="*Control*s"
 			  verb="Select Pattern"/>
 		</placeholder>
 
@@ -182,10 +185,8 @@
 			<menuitem name="Duplicate"
 				  verb="Duplicate"/>
 			<menuitem name="Create Link"
-				  accel="*Control*m"
 				  verb="Create Link"/>
 			<menuitem name="Rename"
-				  accel="F2"
 				  verb="Rename"/>
 		</placeholder>
 
@@ -194,7 +195,6 @@
 				  pixtype="stock" pixname="gtk-delete"
 				  verb="Trash"/>
 			<menuitem name="Delete"
-				  accel="*Shift*Delete"
 				  verb="Delete"/>
 		</placeholder>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]