PATCH: Bugs 82117, 83691, 83218, and some other UI stuff



This patch fixes a bunch of little ui issues.

1. Adds escape keybinding to the stop button (bug 83691)

2. Removed the "Remove Custom Icon" entry from the view menu and context
menu (bug 82117 also sort of takes care of bug 86179).  (Calum agreed
with this, see the bug for discussion)

3. Changed keybinding for "Move to Trash" to delete and for "Delete" to
shift+delete (bug 83218 this fixes bug 78120 as well). I think these are
more intuitive, however i kept control+t as an alternative. (Calum also
basically agreed with this)

4. Use GTK_STOCK_DELETE in a bunch of dialogs instead of our own string.

5. Changed broken link dialog string to "Do you want to move this link
to the Trash?" and changed confirming button to "Mo_ve to Trash" to be
consistent with the rest of the UI.

If this patch is all good, could one of the maintainers please commit?

dave
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.5500
diff -p -u -r1.5500 ChangeLog
--- ChangeLog	30 Aug 2002 19:03:43 -0000	1.5500
+++ ChangeLog	31 Aug 2002 16:52:21 -0000
@@ -1,3 +1,20 @@
+2022-08-31  David Bordoley <bordoley msu edu>
+
+	* src/nautilus-shell-ui.xml
+	Added escape keybinding to the stop button (bug 83691)
+
+	* src/file-manager/fm-directory-view.c
+	* src/file-manager/nautilus-directory-view-ui.xml
+	Removed the "Remove Custom Icon" entry from the view menu 
+       and context menu (bug 82117 also sort of takes care of bug 86179). 
+	Changed keybinding for "Move to Trash" to delete 
+	and for "Delete" to shift+delete (bug 83218 this fixes bug 78120 as well).
+	Use GTK_STOCK_DELETE in a bunch of dialogs instead of our own string.
+	Changed broken link dialog string to "Do you want to move this 
+	link to the Trash?" and changed confirming button to "Mo_ve to Trash" to
+       be consistent with the rest of the UI.
+
+
 2002-08-30  Alexander Larsson  <alexl redhat com>
 
 	Branched off Gnome 2.0.x development on the gnome-2-0 branch.
Index: src/nautilus-shell-ui.xml
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-shell-ui.xml,v
retrieving revision 1.98
diff -p -u -r1.98 nautilus-shell-ui.xml
--- src/nautilus-shell-ui.xml	22 Jul 2002 18:03:43 -0000	1.98
+++ src/nautilus-shell-ui.xml	31 Aug 2002 16:52:27 -0000
@@ -144,6 +144,7 @@
 	<submenu name="View" _label="_View">
 		<menuitem name="Stop" 
 			  _label="_Stop"
+			  accel="Escape"
 			  pixtype="stock" pixname="gtk-stop"
 			  verb="Stop"/>
 		<menuitem name="Reload"
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.547
diff -p -u -r1.547 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	7 Aug 2002 16:08:07 -0000	1.547
+++ src/file-manager/fm-directory-view.c	31 Aug 2002 16:52:38 -0000
@@ -116,7 +116,6 @@
 #define FM_DIRECTORY_VIEW_COMMAND_DUPLICATE                		"/commands/Duplicate"
 #define FM_DIRECTORY_VIEW_COMMAND_CREATE_LINK                		"/commands/Create Link"
 #define FM_DIRECTORY_VIEW_COMMAND_PROPERTIES         			"/commands/Properties"
-#define FM_DIRECTORY_VIEW_COMMAND_REMOVE_CUSTOM_ICONS			"/commands/Remove Custom Icons"
 #define FM_DIRECTORY_VIEW_COMMAND_OTHER_APPLICATION    			"/commands/OtherApplication"
 #define FM_DIRECTORY_VIEW_COMMAND_OTHER_VIEWER	   			"/commands/OtherViewer"
 #define FM_DIRECTORY_VIEW_COMMAND_CUT_FILES	    			"/commands/Cut Files"
@@ -130,7 +129,6 @@
 #define FM_DIRECTORY_VIEW_MENU_PATH_DELETE                    		"/menu/Edit/Dangerous File Items Placeholder/Delete"
 #define FM_DIRECTORY_VIEW_MENU_PATH_EMPTY_TRASH                    	"/menu/File/Global File Items Placeholder/Empty Trash"
 #define FM_DIRECTORY_VIEW_MENU_PATH_CREATE_LINK                	 	"/menu/Edit/File Items Placeholder/Create Link"
-#define FM_DIRECTORY_VIEW_MENU_PATH_REMOVE_CUSTOM_ICONS			"/menu/Edit/Edit Items Placeholder/Remove Custom Icons"
 #define FM_DIRECTORY_VIEW_MENU_PATH_APPLICATIONS_PLACEHOLDER    	"/menu/File/Open Placeholder/Open With/Applications Placeholder"
 #define FM_DIRECTORY_VIEW_MENU_PATH_OTHER_APPLICATION		    	"/menu/File/Open Placeholder/Open With/OtherApplication"
 #define FM_DIRECTORY_VIEW_MENU_PATH_VIEWERS_PLACEHOLDER    		"/menu/File/Open Placeholder/Open With/Viewers Placeholder"
@@ -828,7 +826,7 @@ confirm_delete_directly (FMDirectoryView
 
 	dialog = eel_show_yes_no_dialog
 		(prompt,
-		 _("Delete?"), _("Delete"), GTK_STOCK_CANCEL,
+		 _("Delete?"), GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
 		 fm_directory_view_get_containing_window (view));
 
 	g_free (prompt);
@@ -3011,7 +3009,7 @@ fm_directory_view_confirm_deletion (FMDi
 
 	dialog = eel_show_yes_no_dialog
 		(prompt,
-		 _("Delete Immediately?"), _("Delete"), GTK_STOCK_CANCEL,
+		 _("Delete Immediately?"), GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
 		 fm_directory_view_get_containing_window (view));
 	
 	g_free (prompt);
@@ -3053,7 +3051,7 @@ confirm_delete_from_trash (FMDirectoryVi
 
 	dialog = eel_show_yes_no_dialog (
 		prompt,
-		_("Delete From Trash?"),_("Delete"), GTK_STOCK_CANCEL,
+		_("Delete From Trash?"), GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
 		fm_directory_view_get_containing_window (view));
 
 	g_free (prompt);
@@ -3230,20 +3228,6 @@ open_one_properties_window (gpointer dat
 	fm_properties_window_present (data, callback_data);
 }
 
-static void
-remove_custom_icon (gpointer file, gpointer callback_data)
-{
-	g_assert (NAUTILUS_IS_FILE (file));
-	g_assert (callback_data == NULL);
-
-	nautilus_file_set_metadata (NAUTILUS_FILE (file),
-				    NAUTILUS_METADATA_KEY_ICON_SCALE,
-				    NULL, NULL);
-	nautilus_file_set_metadata (NAUTILUS_FILE (file),
-				    NAUTILUS_METADATA_KEY_CUSTOM_ICON,
-				    NULL, NULL);
-}
-
 NautilusFile *
 fm_directory_view_get_directory_as_file (FMDirectoryView *view)
 {
@@ -3252,38 +3236,6 @@ fm_directory_view_get_directory_as_file 
 	return view->details->directory_as_file; 
 }
 
-static gboolean
-files_have_any_custom_images (GList *files)
-{
-	GList *p;
-	char *uri;
-
-	for (p = files; p != NULL; p = p->next) {
-		uri = nautilus_file_get_metadata (NAUTILUS_FILE (p->data),
-						  NAUTILUS_METADATA_KEY_CUSTOM_ICON,
-						  NULL);
-		if (uri != NULL) {
-			g_free (uri);
-			return TRUE;
-		}
-	}
-
-	return FALSE;
-}
-
-static void
-remove_custom_icons_callback (BonoboUIComponent *component, gpointer callback_data, const char *verb)
-{
-	GList *selection;
-
-	selection = fm_directory_view_get_selection (FM_DIRECTORY_VIEW (callback_data));
-	g_list_foreach (selection, remove_custom_icon, NULL);
-	nautilus_file_list_free (selection);
-
-        /* Update menus because Remove Custom Icons item has changed state */
-	schedule_update_menus (FM_DIRECTORY_VIEW (callback_data));
-}
-
 static void
 bonobo_launch_application_callback (BonoboUIComponent *component, gpointer callback_data, const char *path)
 {
@@ -4202,7 +4154,6 @@ real_merge_menus (FMDirectoryView *view)
 		BONOBO_UI_VERB ("OtherViewer", other_viewer_callback),
 		BONOBO_UI_VERB ("Edit Launcher", edit_launcher_callback),
 		BONOBO_UI_VERB ("Paste Files", paste_files_callback),
-		BONOBO_UI_VERB ("Remove Custom Icons", remove_custom_icons_callback),
 		BONOBO_UI_VERB ("Reset Background", reset_background_callback),
 		BONOBO_UI_VERB ("Reset to Defaults", reset_to_defaults_callback),
 		BONOBO_UI_VERB ("Select All", bonobo_menu_select_all_callback),
@@ -4348,12 +4299,12 @@ real_update_menus (FMDirectoryView *view
 
 	if (all_selected_items_in_trash (view)) {
 		label = _("_Delete from Trash");
-		accelerator = "";
+		accelerator = "Delete";
 		tip = _("Delete all selected items permanently");
 		show_separate_delete_command = FALSE;
 	} else {
 		label = _("Mo_ve to Trash");
-		accelerator = "*Control*t";
+		accelerator = "Delete";
 		tip = _("Move each selected item to the Trash");
 		show_separate_delete_command = show_delete_command_auto_value;
 	}
@@ -4417,17 +4368,6 @@ real_update_menus (FMDirectoryView *view
 				       FM_DIRECTORY_VIEW_COMMAND_EMPTY_TRASH,
 				       !nautilus_trash_monitor_is_empty ());
 
-
-	nautilus_bonobo_set_label
-		(view->details->ui,
-		 FM_DIRECTORY_VIEW_COMMAND_REMOVE_CUSTOM_ICONS,
-		 selection_count > 1
-			? _("Re_move Custom Icons")
-			: _("Re_move Custom Icon"));
-	nautilus_bonobo_set_sensitive (view->details->ui, 
-				       FM_DIRECTORY_VIEW_COMMAND_REMOVE_CUSTOM_ICONS,
-				       files_have_any_custom_images (selection));
-
 	nautilus_bonobo_set_sensitive (view->details->ui, 
 				       NAUTILUS_COMMAND_SELECT_ALL,
 				       !fm_directory_view_is_empty (view));
@@ -4630,15 +4570,15 @@ report_broken_symbolic_link (FMDirectory
 	target_path = nautilus_file_get_symbolic_link_target_path (file);
 	if (target_path == NULL) {
 		prompt = g_strdup_printf (_("This link can't be used, because it has no target. "
-					    "Do you want to put this link in the Trash?"));
+					    "Do you want to move this link to the Trash?"));
 	} else {
 		prompt = g_strdup_printf (_("This link can't be used, because its target \"%s\" doesn't exist. "
-				 	    "Do you want to put this link in the Trash?"),
+				 	    "Do you want to move this link to the Trash?"),
 					  target_path);
 	}
 
 	dialog = eel_show_yes_no_dialog (prompt,
-					 _("Broken Link"), _("Throw Away"), GTK_STOCK_CANCEL,
+					 _("Broken Link"), _("Mo_ve to Trash"), GTK_STOCK_CANCEL,
 					 fm_directory_view_get_containing_window (view));
 
 	gtk_dialog_set_default_response (dialog, GTK_RESPONSE_YES);
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.47
diff -p -u -r1.47 nautilus-directory-view-ui.xml
--- src/file-manager/nautilus-directory-view-ui.xml	22 Jul 2002 18:03:51 -0000	1.47
+++ src/file-manager/nautilus-directory-view-ui.xml	31 Aug 2002 16:52:39 -0000
@@ -39,9 +39,6 @@
 	<cmd name="OtherViewer"
          _label="Other _Viewer..."
 	 _tip="Choose another viewer with which to view the selected item"/>
-	<cmd name="Remove Custom Icons"
-         _label="Re_move Custom Icons"
-	 _tip="Remove any custom images from selected icons"/>
 	<cmd name="Reset to Defaults"
          _label="Reset View to _Defaults"
 	 _tip="Reset sorting order and zoom level to match preferences for this view"/>
@@ -69,9 +66,8 @@
 </commands>
 <keybindings>
 	<accel name="*Control*BackSpace" verb="Trash"/>
-	<accel name="Delete" verb="Trash"/>
+	<accel name="*Control*T" verb="Trash"/>
 	<accel name="KP_Delete" verb="Trash"/>
-	<accel name="*Shift*Delete" verb="Delete"/>
 	<accel name="*Shift*KP_Delete" verb="Delete"/>
         <accel name="*Alt*Down" verb="Open"/>
 </keybindings>
@@ -158,17 +154,13 @@
 
 		<placeholder name="Dangerous File Items Placeholder">
 			<menuitem name="Trash"
-				  accel="*Control*t"
+				  accel="Delete"
 				  pixtype="stock" pixname="gtk-delete"
 				  verb="Trash"/>
 			<menuitem name="Delete"
+				  accel="*Shift*Delete"
 				  verb="Delete"/>
 		</placeholder>
-
-		<placeholder name="Edit Items Placeholder">
-			<menuitem name="Remove Custom Icons" verb="Remove Custom Icons"/>
-		</placeholder>
-
 	</submenu>
 
 	<submenu name="View">
@@ -268,9 +260,10 @@
 			<menuitem name="Delete" verb="Delete"/>
 		</placeholder>
 		<placeholder name="Icon Appearance Items" delimit="top">
-			<menuitem name="Remove Custom Icons" verb="Remove Custom Icons"/>
 		</placeholder>
+
                 <separator/>
+
                 <menuitem name="Properties" verb="Properties"/>
 	</popup>
 </popups>


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