Commit 88e35364 authored by William Jon McCann's avatar William Jon McCann

Use action defines instead of text

This makes them easier to grep for and change.
parent 5c545b23
......@@ -56,6 +56,7 @@
#define NAUTILUS_ACTION_HELP "NautilusHelp"
#define NAUTILUS_ACTION_OPEN "Open"
#define NAUTILUS_ACTION_OPEN_WITH "Open With"
#define NAUTILUS_ACTION_OPEN_ALTERNATE "OpenAlternate"
#define NAUTILUS_ACTION_OPEN_IN_NEW_TAB "OpenInNewTab"
#define NAUTILUS_ACTION_LOCATION_OPEN_ALTERNATE "LocationOpenAlternate"
......@@ -92,6 +93,9 @@
#define NAUTILUS_ACTION_LOCATION_DELETE "LocationDelete"
#define NAUTILUS_ACTION_RESTORE_FROM_TRASH "Restore From Trash"
#define NAUTILUS_ACTION_LOCATION_RESTORE_FROM_TRASH "LocationRestoreFromTrash"
#define NAUTILUS_ACTION_UNDO "Undo"
#define NAUTILUS_ACTION_REDO "Redo"
#define NAUTILUS_ACTION_RESET_TO_DEFAULTS "Reset to Defaults"
#define NAUTILUS_ACTION_CONNECT_TO_SERVER "Connect to Server"
#define NAUTILUS_ACTION_CONNECT_TO_SERVER_LINK "Connect To Server Link"
#define NAUTILUS_ACTION_MOUNT_VOLUME "Mount Volume"
......@@ -113,6 +117,7 @@
#define NAUTILUS_ACTION_LOCATION_STOP_VOLUME "Location Stop Volume"
#define NAUTILUS_ACTION_LOCATION_POLL "Location Poll"
#define NAUTILUS_ACTION_SCRIPTS "Scripts"
#define NAUTILUS_ACTION_OPEN_SCRIPTS_FOLDER "Open Scripts Folder"
#define NAUTILUS_ACTION_NEW_DOCUMENTS "New Documents"
#define NAUTILUS_ACTION_NEW_EMPTY_DOCUMENT "New Empty Document"
#define NAUTILUS_ACTION_EMPTY_TRASH_CONDITIONAL "Empty Trash Conditional"
......
......@@ -7448,8 +7448,8 @@ nautilus_view_init_show_hidden_files (NautilusView *view)
}
static const GtkActionEntry directory_view_entries[] = {
/* name, stock id, label */ { "New Documents", "document-new", N_("New _Document") },
/* name, stock id, label */ { "Open With", NULL, N_("Open Wit_h"),
/* name, stock id, label */ { NAUTILUS_ACTION_NEW_DOCUMENTS, "document-new", N_("New _Document") },
/* name, stock id, label */ { NAUTILUS_ACTION_OPEN_WITH, NULL, N_("Open Wit_h"),
NULL, N_("Choose a program with which to open the selected item") },
/* name, stock id */ { NAUTILUS_ACTION_PROPERTIES, GTK_STOCK_PROPERTIES,
/* label, accelerator */ N_("P_roperties"), "<alt>Return",
......@@ -7459,7 +7459,7 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ "PropertiesAccel", "<control>I",
/* tooltip */ NULL,
G_CALLBACK (action_properties_callback) },
/* name, stock id */ { "New Folder", "folder-new",
/* name, stock id */ { NAUTILUS_ACTION_NEW_FOLDER, "folder-new",
/* label, accelerator */ N_("New _Folder"), "<control><shift>N",
/* tooltip */ N_("Create a new empty folder inside this folder"),
G_CALLBACK (action_new_folder_callback) },
......@@ -7467,13 +7467,12 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("New Folder with Selection"), NULL,
/* tooltip */ N_("Create a new folder containing the selected items"),
G_CALLBACK (action_new_folder_with_selection_callback) },
/* name, stock id, label */ { "No Templates", NULL, N_("No templates installed") },
/* name, stock id */ { "New Empty Document", NULL,
/* name, stock id */ { NAUTILUS_ACTION_NEW_EMPTY_DOCUMENT, NULL,
/* translators: this is used to indicate that a document doesn't contain anything */
/* label, accelerator */ N_("_Empty Document"), NULL,
/* tooltip */ N_("Create a new empty document inside this folder"),
G_CALLBACK (action_new_empty_file_callback) },
/* name, stock id */ { "Open", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OPEN, NULL,
/* label, accelerator */ N_("_Open"), "<control>o",
/* tooltip */ N_("Open the selected item in this window"),
G_CALLBACK (action_open_callback) },
......@@ -7481,81 +7480,81 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ "OpenAccel", "<alt>Down",
/* tooltip */ NULL,
G_CALLBACK (action_open_callback) },
/* name, stock id */ { "OpenAlternate", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OPEN_ALTERNATE, NULL,
/* label, accelerator */ N_("Open in Navigation Window"), "<control><shift>o",
/* tooltip */ N_("Open each selected item in a navigation window"),
G_CALLBACK (action_open_alternate_callback) },
/* name, stock id */ { "OpenInNewTab", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OPEN_IN_NEW_TAB, NULL,
/* label, accelerator */ N_("Open in New _Tab"), "<control><shift>t",
/* tooltip */ N_("Open each selected item in a new tab"),
G_CALLBACK (action_open_new_tab_callback) },
/* name, stock id */ { "OtherApplication1", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OTHER_APPLICATION1, NULL,
/* label, accelerator */ N_("Other _Application..."), NULL,
/* tooltip */ N_("Choose another application with which to open the selected item"),
G_CALLBACK (action_other_application_callback) },
/* name, stock id */ { "OtherApplication2", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OTHER_APPLICATION2, NULL,
/* label, accelerator */ N_("Open With Other _Application..."), NULL,
/* tooltip */ N_("Choose another application with which to open the selected item"),
G_CALLBACK (action_other_application_callback) },
/* name, stock id */ { "Open Scripts Folder", NULL,
/* name, stock id */ { NAUTILUS_ACTION_OPEN_SCRIPTS_FOLDER, NULL,
/* label, accelerator */ N_("_Open Scripts Folder"), NULL,
/* tooltip */ N_("Show the folder containing the scripts that appear in this menu"),
G_CALLBACK (action_open_scripts_folder_callback) },
/* name, stock id */ { "Empty Trash", NULL,
/* name, stock id */ { NAUTILUS_ACTION_EMPTY_TRASH, NULL,
/* label, accelerator */ N_("E_mpty Trash"), NULL,
/* tooltip */ N_("Delete all items in the Trash"),
G_CALLBACK (action_empty_trash_callback) },
/* name, stock id */ { "Cut", GTK_STOCK_CUT,
/* name, stock id */ { NAUTILUS_ACTION_CUT, GTK_STOCK_CUT,
/* label, accelerator */ NULL, NULL,
/* tooltip */ N_("Prepare the selected files to be moved with a Paste command"),
G_CALLBACK (action_cut_files_callback) },
/* name, stock id */ { "Copy", GTK_STOCK_COPY,
/* name, stock id */ { NAUTILUS_ACTION_COPY, GTK_STOCK_COPY,
/* label, accelerator */ NULL, NULL,
/* tooltip */ N_("Prepare the selected files to be copied with a Paste command"),
G_CALLBACK (action_copy_files_callback) },
/* name, stock id */ { "Paste", GTK_STOCK_PASTE,
/* name, stock id */ { NAUTILUS_ACTION_PASTE, GTK_STOCK_PASTE,
/* label, accelerator */ NULL, NULL,
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command"),
G_CALLBACK (action_paste_files_callback) },
/* We make accelerator "" instead of null here to not inherit the stock
accelerator for paste */
/* name, stock id */ { "Paste Files Into", GTK_STOCK_PASTE,
/* name, stock id */ { NAUTILUS_ACTION_PASTE_FILES_INTO, GTK_STOCK_PASTE,
/* label, accelerator */ N_("_Paste Into Folder"), "",
/* tooltip */ N_("Move or copy files previously selected by a Cut or Copy command into the selected folder"),
G_CALLBACK (action_paste_files_into_callback) },
/* name, stock id */ { "Copy To", NULL,
/* name, stock id */ { NAUTILUS_ACTION_COPY_TO, NULL,
/* label, accelerator */ N_("Copy To..."), NULL,
/* tooltip */ N_("Copy selected files to another location"),
G_CALLBACK (action_copy_to_callback) },
/* name, stock id */ { "Move To", NULL,
/* name, stock id */ { NAUTILUS_ACTION_MOVE_TO, NULL,
/* label, accelerator */ N_("Move To..."), NULL,
/* tooltip */ N_("Move selected files to another location"),
G_CALLBACK (action_move_to_callback) },
/* name, stock id */ { "Select All", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELECT_ALL, NULL,
/* label, accelerator */ N_("Select _All"), "<control>A",
/* tooltip */ N_("Select all items in this window"),
G_CALLBACK (action_select_all_callback) },
/* name, stock id */ { "Select Pattern", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELECT_PATTERN, NULL,
/* label, accelerator */ N_("Select I_tems Matching..."), "<control>S",
/* tooltip */ N_("Select items in this window matching a given pattern"),
G_CALLBACK (action_select_pattern_callback) },
/* name, stock id */ { "Invert Selection", NULL,
/* name, stock id */ { NAUTILUS_ACTION_INVERT_SELECTION, NULL,
/* label, accelerator */ N_("_Invert Selection"), "<control><shift>I",
/* tooltip */ N_("Select all and only the items that are not currently selected"),
G_CALLBACK (action_invert_selection_callback) },
/* name, stock id */ { "Duplicate", NULL,
/* name, stock id */ { NAUTILUS_ACTION_DUPLICATE, NULL,
/* label, accelerator */ N_("D_uplicate"), NULL,
/* tooltip */ N_("Duplicate each selected item"),
G_CALLBACK (action_duplicate_callback) },
/* name, stock id */ { "Create Link", NULL,
/* name, stock id */ { NAUTILUS_ACTION_CREATE_LINK, NULL,
/* label, accelerator */ N_("Ma_ke Link"), "<control>M",
/* tooltip */ N_("Create a symbolic link for each selected item"),
G_CALLBACK (action_create_link_callback) },
/* name, stock id */ { "Rename", NULL,
/* name, stock id */ { NAUTILUS_ACTION_RENAME, NULL,
/* label, accelerator */ N_("Rena_me..."), "F2",
/* tooltip */ N_("Rename selected item"),
G_CALLBACK (action_rename_callback) },
/* name, stock id */ { "Set As Wallpaper", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SET_AS_WALLPAPER, NULL,
/* label, accelerator */ N_("Set as Wallpaper"), NULL,
/* tooltip */ N_("Make item the wallpaper"),
G_CALLBACK (action_set_as_wallpaper_callback) },
......@@ -7563,23 +7562,23 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ "RenameSelectAll", "<shift>F2",
/* tooltip */ NULL,
G_CALLBACK (action_rename_select_all_callback) },
/* name, stock id */ { "Trash", NULL,
/* name, stock id */ { NAUTILUS_ACTION_TRASH, NULL,
/* label, accelerator */ N_("Mo_ve to Trash"), "<control>Delete",
/* tooltip */ N_("Move each selected item to the Trash"),
G_CALLBACK (action_trash_callback) },
/* name, stock id */ { "Delete", NULL,
/* name, stock id */ { NAUTILUS_ACTION_DELETE, NULL,
/* label, accelerator */ N_("_Delete"), "<shift>Delete",
/* tooltip */ N_("Delete each selected item, without moving to the Trash"),
G_CALLBACK (action_delete_callback) },
/* name, stock id */ { "Restore From Trash", NULL,
/* name, stock id */ { NAUTILUS_ACTION_RESTORE_FROM_TRASH, NULL,
/* label, accelerator */ N_("_Restore"), NULL,
NULL,
G_CALLBACK (action_restore_from_trash_callback) },
/* name, stock id */ { "Undo", GTK_STOCK_UNDO,
/* name, stock id */ { NAUTILUS_ACTION_UNDO, GTK_STOCK_UNDO,
/* label, accelerator */ N_("_Undo"), "<control>Z",
/* tooltip */ N_("Undo the last action"),
G_CALLBACK (action_undo_callback) },
/* name, stock id */ { "Redo", GTK_STOCK_REDO,
/* name, stock id */ { NAUTILUS_ACTION_REDO, GTK_STOCK_REDO,
/* label, accelerator */ N_("_Redo"), "<control>Y",
/* tooltip */ N_("Redo the last undone action"),
G_CALLBACK (action_redo_callback) },
......@@ -7589,59 +7588,59 @@ static const GtkActionEntry directory_view_entries[] = {
* Since this also resets the "Show hidden files" mode,
* it is a mixture of both ATM.
*/
/* name, stock id */ { "Reset to Defaults", NULL,
/* name, stock id */ { NAUTILUS_ACTION_RESET_TO_DEFAULTS, NULL,
/* label, accelerator */ N_("Reset View to _Defaults"), NULL,
/* tooltip */ N_("Reset sorting order and zoom level to match preferences for this view"),
G_CALLBACK (action_reset_to_defaults_callback) },
/* name, stock id */ { "Connect To Server Link", NULL,
/* name, stock id */ { NAUTILUS_ACTION_CONNECT_TO_SERVER_LINK, NULL,
/* label, accelerator */ N_("Connect To This Server"), NULL,
/* tooltip */ N_("Make a permanent connection to this server"),
G_CALLBACK (action_connect_to_server_link_callback) },
/* name, stock id */ { "Mount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_MOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Mount"), NULL,
/* tooltip */ N_("Mount the selected volume"),
G_CALLBACK (action_mount_volume_callback) },
/* name, stock id */ { "Unmount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_UNMOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Unmount"), NULL,
/* tooltip */ N_("Unmount the selected volume"),
G_CALLBACK (action_unmount_volume_callback) },
/* name, stock id */ { "Eject Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_EJECT_VOLUME, NULL,
/* label, accelerator */ N_("_Eject"), NULL,
/* tooltip */ N_("Eject the selected volume"),
G_CALLBACK (action_eject_volume_callback) },
/* name, stock id */ { "Start Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_START_VOLUME, NULL,
/* label, accelerator */ N_("_Start"), NULL,
/* tooltip */ N_("Start the selected volume"),
G_CALLBACK (action_start_volume_callback) },
/* name, stock id */ { "Stop Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_STOP_VOLUME, NULL,
/* label, accelerator */ N_("_Stop"), NULL,
/* tooltip */ N_("Stop the selected volume"),
G_CALLBACK (action_stop_volume_callback) },
/* name, stock id */ { "Poll", NULL,
/* name, stock id */ { NAUTILUS_ACTION_POLL, NULL,
/* label, accelerator */ N_("_Detect Media"), NULL,
/* tooltip */ N_("Detect media in the selected drive"),
G_CALLBACK (action_detect_media_callback) },
/* name, stock id */ { "Self Mount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_MOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Mount"), NULL,
/* tooltip */ N_("Mount the volume associated with the open folder"),
G_CALLBACK (action_self_mount_volume_callback) },
/* name, stock id */ { "Self Unmount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_UNMOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Unmount"), NULL,
/* tooltip */ N_("Unmount the volume associated with the open folder"),
G_CALLBACK (action_self_unmount_volume_callback) },
/* name, stock id */ { "Self Eject Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_EJECT_VOLUME, NULL,
/* label, accelerator */ N_("_Eject"), NULL,
/* tooltip */ N_("Eject the volume associated with the open folder"),
G_CALLBACK (action_self_eject_volume_callback) },
/* name, stock id */ { "Self Start Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_START_VOLUME, NULL,
/* label, accelerator */ N_("_Start"), NULL,
/* tooltip */ N_("Start the volume associated with the open folder"),
G_CALLBACK (action_self_start_volume_callback) },
/* name, stock id */ { "Self Stop Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_STOP_VOLUME, NULL,
/* label, accelerator */ N_("_Stop"), NULL,
/* tooltip */ N_("Stop the volume associated with the open folder"),
G_CALLBACK (action_self_stop_volume_callback) },
/* name, stock id */ { "Self Poll", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SELF_POLL, NULL,
/* label, accelerator */ N_("_Detect Media"), NULL,
/* tooltip */ N_("Detect media in the selected drive"),
G_CALLBACK (action_self_detect_media_callback) },
......@@ -7649,11 +7648,11 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("Open File and Close window"), "<alt><shift>Down",
/* tooltip */ NULL,
G_CALLBACK (action_open_close_parent_callback) },
/* name, stock id */ { "Save Search", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SAVE_SEARCH, NULL,
/* label, accelerator */ N_("Sa_ve Search"), NULL,
/* tooltip */ N_("Save the edited search"),
G_CALLBACK (action_save_search_callback) },
/* name, stock id */ { "Save Search As", NULL,
/* name, stock id */ { NAUTILUS_ACTION_SAVE_SEARCH_AS, NULL,
/* label, accelerator */ N_("Sa_ve Search As..."), NULL,
/* tooltip */ N_("Save the current search as a file"),
G_CALLBACK (action_save_search_as_callback) },
......@@ -7693,27 +7692,27 @@ static const GtkActionEntry directory_view_entries[] = {
/* label, accelerator */ N_("_Restore"), NULL, NULL,
G_CALLBACK (action_location_restore_from_trash_callback) },
/* name, stock id */ { "Location Mount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_MOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Mount"), NULL,
/* tooltip */ N_("Mount the volume associated with this folder"),
G_CALLBACK (action_location_mount_volume_callback) },
/* name, stock id */ { "Location Unmount Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_UNMOUNT_VOLUME, NULL,
/* label, accelerator */ N_("_Unmount"), NULL,
/* tooltip */ N_("Unmount the volume associated with this folder"),
G_CALLBACK (action_location_unmount_volume_callback) },
/* name, stock id */ { "Location Eject Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_EJECT_VOLUME, NULL,
/* label, accelerator */ N_("_Eject"), NULL,
/* tooltip */ N_("Eject the volume associated with this folder"),
G_CALLBACK (action_location_eject_volume_callback) },
/* name, stock id */ { "Location Start Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_START_VOLUME, NULL,
/* label, accelerator */ N_("_Start"), NULL,
/* tooltip */ N_("Start the volume associated with this folder"),
G_CALLBACK (action_location_start_volume_callback) },
/* name, stock id */ { "Location Stop Volume", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_STOP_VOLUME, NULL,
/* label, accelerator */ N_("_Stop"), NULL,
/* tooltip */ N_("Stop the volume associated with this folder"),
G_CALLBACK (action_location_stop_volume_callback) },
/* name, stock id */ { "Location Poll", NULL,
/* name, stock id */ { NAUTILUS_ACTION_LOCATION_POLL, NULL,
/* label, accelerator */ N_("_Detect Media"), NULL,
/* tooltip */ N_("Detect media in the selected drive"),
G_CALLBACK (action_location_detect_media_callback) },
......
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