Commit 314a77cf authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Use "edit-delete" icon for delete actions, and "user-trash-full" icon for

2008-08-31  Christian Neumair  <cneumair@gnome.org>

	* libnautilus-private/nautilus-icon-names.h:
	* src/file-manager/fm-directory-view.c (real_update_location_menu),
	(real_update_menus):
	* src/file-manager/fm-tree-view.c (create_popup_menu):
	Use "edit-delete" icon for delete actions, and "user-trash-full" icon
	for trash actions. Partially fixes #325945.
	Also make some mnemonics consistent.

svn path=/trunk/; revision=14547
parent faffb0b6
2008-08-31 Christian Neumair <cneumair@gnome.org>
* libnautilus-private/nautilus-icon-names.h:
* src/file-manager/fm-directory-view.c (real_update_location_menu),
(real_update_menus):
* src/file-manager/fm-tree-view.c (create_popup_menu):
Use "edit-delete" icon for delete actions, and "user-trash-full" icon
for trash actions. Partially fixes #325945.
Also make some mnemonics consistent.
2008-08-31 Christian Neumair <cneumair@gnome.org>
* src/nautilus-main.c (main):
......
......@@ -13,6 +13,7 @@
#define NAUTILUS_ICON_SEARCH "system-search"
#define NAUTILUS_ICON_TRASH "user-trash"
#define NAUTILUS_ICON_TRASH_FULL "user-trash-full"
#define NAUTILUS_ICON_DELETE "edit-delete"
/* Icons for emblems */
#define NAUTILUS_ICON_EMBLEM_READONLY "emblem-readonly"
......
......@@ -6678,7 +6678,7 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ "RenameSelectAll", "<shift>F2",
/* tooltip */ NULL,
G_CALLBACK (action_rename_select_all_callback) },
/* name, stock id */ { "Trash", NAUTILUS_ICON_TRASH,
/* name, stock id */ { "Trash", NULL,
/* label, accelerator */ N_("Mo_ve to Trash"), NULL,
/* tooltip */ N_("Move each selected item to the Trash"),
G_CALLBACK (action_trash_callback) },
......@@ -6777,11 +6777,11 @@ static const GtkActionEntry directory_view_entries[] = {
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command into this folder"),
G_CALLBACK (action_location_paste_files_into_callback) },
/* name, stock id */ { FM_ACTION_LOCATION_TRASH, NAUTILUS_ICON_TRASH,
/* name, stock id */ { FM_ACTION_LOCATION_TRASH, NULL,
/* label, accelerator */ N_("Mo_ve to Trash"), "",
/* tooltip */ N_("Move this folder to the Trash"),
G_CALLBACK (action_location_trash_callback) },
/* name, stock id */ { FM_ACTION_LOCATION_DELETE, NULL,
/* name, stock id */ { FM_ACTION_LOCATION_DELETE, NAUTILUS_ICON_DELETE,
/* label, accelerator */ N_("_Delete"), "",
/* tooltip */ N_("Delete this folder, without moving to the Trash"),
G_CALLBACK (action_location_delete_callback) },
......@@ -7639,9 +7639,9 @@ real_update_location_menu (FMDirectoryView *view)
g_object_set (action,
"label", label,
"tooltip", tip,
"stock-id", (file != NULL &&
"icon-name", (file != NULL &&
nautilus_file_is_in_trash (file)) ?
NULL : NAUTILUS_ICON_TRASH,
NAUTILUS_ICON_DELETE : NAUTILUS_ICON_TRASH_FULL,
NULL);
gtk_action_set_sensitive (action, can_delete_file);
gtk_action_set_visible (action, show_delete);
......@@ -7651,6 +7651,10 @@ real_update_location_menu (FMDirectoryView *view)
gtk_action_set_visible (action, show_separate_delete_command);
if (show_separate_delete_command) {
gtk_action_set_sensitive (action, can_delete_file);
g_object_set (action,
"icon-name", NAUTILUS_ICON_DELETE,
"sensitive", can_delete_file,
NULL);
}
action = gtk_action_group_get_action (view->details->dir_action_group,
......@@ -7900,8 +7904,8 @@ real_update_menus (FMDirectoryView *view)
g_object_set (action,
"label", label,
"tooltip", tip,
"stock-id", all_selected_items_in_trash (view) ?
NULL : NAUTILUS_ICON_TRASH,
"icon-name", all_selected_items_in_trash (view) ?
NAUTILUS_ICON_DELETE : NAUTILUS_ICON_TRASH_FULL,
NULL);
gtk_action_set_sensitive (action, can_delete_files);
......@@ -7912,6 +7916,7 @@ real_update_menus (FMDirectoryView *view)
if (show_separate_delete_command) {
g_object_set (action,
"label", _("_Delete"),
"icon-name", NAUTILUS_ICON_DELETE,
NULL);
}
gtk_action_set_sensitive (action, can_delete_files);
......
......@@ -1202,7 +1202,7 @@ create_popup_menu (FMTreeView *view)
eel_gtk_menu_append_separator (GTK_MENU (popup));
/* add the "create folder" menu item */
menu_item = gtk_image_menu_item_new_with_label (_("Create Folder"));
menu_item = gtk_image_menu_item_new_with_label (_("Create _Folder"));
g_signal_connect (menu_item, "activate",
G_CALLBACK (fm_tree_view_create_folder_cb),
view);
......@@ -1247,10 +1247,10 @@ create_popup_menu (FMTreeView *view)
eel_gtk_menu_append_separator (GTK_MENU (popup));
/* add the "move to trash" menu item */
menu_image = gtk_image_new_from_icon_name (NAUTILUS_ICON_TRASH,
menu_image = gtk_image_new_from_icon_name (NAUTILUS_ICON_TRASH_FULL,
GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_label (_("Move to Trash"));
menu_item = gtk_image_menu_item_new_with_mnemonic (_("Mo_ve to Trash"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
menu_image);
g_signal_connect (menu_item, "activate",
......@@ -1261,7 +1261,12 @@ create_popup_menu (FMTreeView *view)
view->details->popup_trash = menu_item;
/* add the "delete" menu item */
menu_item = gtk_menu_item_new_with_mnemonic (_("_Delete"));
menu_image = gtk_image_new_from_icon_name (NAUTILUS_ICON_DELETE,
GTK_ICON_SIZE_MENU);
gtk_widget_show (menu_image);
menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Delete"));
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item),
menu_image);
g_signal_connect (menu_item, "activate",
G_CALLBACK (fm_tree_view_delete_cb),
view);
......
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