[PATCH] Remove gtk-delete icon from delete confirmation alerts



I prepared the attached patch for bug # 325945 [1]: following inputs
from Calum Benson and Matthias Clasen on theme list, by now the best way
to solve this issue should be:

     1. remove the GTK_STOCK_DELETE icon from confirmation alerts for
        delete actions (reason: currently we have no good icon for
        delete)
     2. switch to "gnome-fs-trash-[empty|full]" named icon in "Move to
        Trash" menu entries (reason: use trash icon in move to trash
        action)

Unfortunately it seems that gnome-fs-trash-* is non showed in menus at
runtime... Any idea?

I tried to run a strace on nautilus process, but it's deadly slow.
Starting the strace (`strace -o fine -p PID`) nautilus seems locked.
Same removing nautilus form session and starting from terminal (`strace
o file nautilus`).

PS. I like to propose it to release team, for inclusion in 2.14
PPS. better -empty or -full ?

[1] http://bugzilla.gnome.org/show_bug.cgi?id=325945
Index: src/file-manager/fm-directory-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-directory-view.c,v
retrieving revision 1.734
diff -p -u -r1.734 fm-directory-view.c
--- src/file-manager/fm-directory-view.c	26 Jan 2006 22:20:59 -0000	1.734
+++ src/file-manager/fm-directory-view.c	6 Feb 2006 10:21:49 -0000
@@ -1011,7 +1011,7 @@ confirm_delete_directly (FMDirectoryView
 		                                   _("If you delete an item, it is permanently lost.")));
 							
 	gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-	gtk_dialog_add_button (dialog, GTK_STOCK_DELETE, GTK_RESPONSE_YES);
+	gtk_dialog_add_button (dialog, _("_Delete"), GTK_RESPONSE_YES);
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 
 	g_free (prompt);
@@ -3734,7 +3734,7 @@ fm_directory_view_confirm_deletion (FMDi
 
 	dialog = eel_show_yes_no_dialog
 		(prompt,
-		 detail, GTK_STOCK_DELETE, GTK_STOCK_CANCEL,
+		 detail, "_Delete", GTK_STOCK_CANCEL,
 		 fm_directory_view_get_containing_window (view));
 	
 	g_free (detail);
@@ -3783,7 +3783,7 @@ confirm_delete_from_trash (FMDirectoryVi
 						  prompt,
 						  _("If you delete an item, it will be permanently lost.")));
 	gtk_dialog_add_button (dialog, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-	gtk_dialog_add_button (dialog, GTK_STOCK_DELETE, GTK_RESPONSE_YES);
+	gtk_dialog_add_button (dialog, "_Delete", GTK_RESPONSE_YES);
 
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 
@@ -6650,7 +6650,7 @@ static const GtkActionEntry directory_vi
     "RenameSelectAll", "<shift>F2",                /* label, accelerator */
     NULL,                   /* tooltip */ 
     G_CALLBACK (action_rename_select_all_callback) },
-  { "Trash", GTK_STOCK_DELETE,                  /* name, stock id */
+  { "Trash", "gnome-fs-trash-full",                  /* name, stock id */
     N_("Mo_ve to Trash"), "<control>T",                /* label, accelerator */
     N_("Move each selected item to the Trash"),                   /* tooltip */ 
     G_CALLBACK (action_trash_callback) },
@@ -6710,7 +6710,7 @@ static const GtkActionEntry directory_vi
     N_("Prepare this folder to be copied with a Paste command"),                   /* tooltip */ 
     G_CALLBACK (action_location_copy_callback) },
 
-  { FM_ACTION_LOCATION_TRASH, GTK_STOCK_DELETE,                  /* name, stock id */
+  { FM_ACTION_LOCATION_TRASH, "gnome-fs-trash-full",                  /* name, stock id */
     N_("Mo_ve to Trash"), "",                /* label, accelerator */
     N_("Move this folder to the Trash"),                   /* tooltip */ 
     G_CALLBACK (action_location_trash_callback) },
Index: src/file-manager/fm-tree-view.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-tree-view.c,v
retrieving revision 1.23
diff -p -u -r1.23 fm-tree-view.c
--- src/file-manager/fm-tree-view.c	16 Jan 2006 23:48:20 -0000	1.23
+++ src/file-manager/fm-tree-view.c	6 Feb 2006 10:21:50 -0000
@@ -1173,8 +1173,8 @@ create_popup_menu (FMTreeView *view)
 	gtk_menu_shell_append (GTK_MENU_SHELL (popup), separator_item);
 	
 	/* add the "move to trash" menu item */
-	menu_image = gtk_image_new_from_stock (GTK_STOCK_DELETE,
-					       GTK_ICON_SIZE_MENU);
+	menu_image = gtk_image_new_from_icon_name ("gnome-fs-trash-full",
+						   GTK_ICON_SIZE_MENU);
 	gtk_widget_show (menu_image);
 	menu_item = gtk_image_menu_item_new_with_label (_("Move to Trash"));
 	gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),


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