1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 
3 /*
4  *  Nemo
5  *
6  *  Copyright (C) 2004 Red Hat, Inc.
7  *
8  *  Nemo is free software; you can redistribute it and/or
9  *  modify it under the terms of the GNU General Public
10  *  License as published by the Free Software Foundation; either
11  *  version 2 of the License, or (at your option) any later version.
12  *
13  *  Nemo is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  *  General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public
19  *  License along with this program; if not, write to the Free
20  *  Software Foundation, Inc., 51 Franklin Street, Suite 500, MA 02110-1335, USA.
21  *
22  *  Authors: Alexander Larsson <alexl@redhat.com>
23  *
24  */
25 
26 #ifndef NEMO_ACTIONS_H
27 #define NEMO_ACTIONS_H
28 
29 #include <glib.h>
30 
31 #define NEMO_ACTION_STOP "Stop"
32 #define NEMO_ACTION_RELOAD "Reload"
33 #define NEMO_ACTION_BACK "Back"
34 #define NEMO_ACTION_COMPUTER "Computer"
35 #define NEMO_ACTION_UP "Up"
36 #define NEMO_ACTION_UP_ACCEL "UpAccel"
37 #define NEMO_ACTION_UP_ACCEL "UpAccel"
38 #define NEMO_ACTION_FORWARD "Forward"
39 #define NEMO_ACTION_SHOW_HIDE_TOOLBAR "Show Hide Toolbar"
40 #define NEMO_ACTION_SHOW_HIDE_SIDEBAR "Show Hide Sidebar"
41 #define NEMO_ACTION_SHOW_HIDE_STATUSBAR "Show Hide Statusbar"
42 #define NEMO_ACTION_SHOW_HIDE_MENUBAR "Show Hide Menubar"
43 #define NEMO_ACTION_SHOW_HIDE_LOCATION_BAR "Show Hide Location Bar"
44 #define NEMO_ACTION_SHOW_HIDE_EXTRA_PANE "Show Hide Extra Pane"
45 #define NEMO_ACTION_SHOW_HIDE_LOCATION_ENTRY "Show Hide Location Entry"
46 #define NEMO_ACTION_GO_TO_BURN_CD "Go to Burn CD"
47 #define NEMO_ACTION_EDIT_LOCATION "Edit Location"
48 #define NEMO_ACTION_COMPACT_VIEW "CompactView"
49 #define NEMO_ACTION_ICON_VIEW "IconView"
50 #define NEMO_ACTION_LIST_VIEW "ListView"
51 #define NEMO_ACTION_GO_HOME "Home"
52 #define NEMO_ACTION_ADD_BOOKMARK "Add Bookmark"
53 #define NEMO_ACTION_EDIT_BOOKMARKS "Edit Bookmarks"
54 #define NEMO_ACTION_HOME "Home"
55 #define NEMO_ACTION_ZOOM_IN "Zoom In"
56 #define NEMO_ACTION_ZOOM_OUT "Zoom Out"
57 #define NEMO_ACTION_ZOOM_NORMAL "Zoom Normal"
58 #define NEMO_ACTION_SHOW_HIDDEN_FILES "Show Hidden Files"
59 #define NEMO_ACTION_CLOSE "Close"
60 #define NEMO_ACTION_SEARCH "Search"
61 #define NEMO_ACTION_FOLDER_WINDOW "Folder Window"
62 #define NEMO_ACTION_NEW_TAB "New Tab"
63 
64 #define NEMO_ACTION_OPEN "Open"
65 #define NEMO_ACTION_OPEN_ALTERNATE "OpenAlternate"
66 #define NEMO_ACTION_OPEN_IN_NEW_TAB "OpenInNewTab"
67 #define NEMO_ACTION_LOCATION_OPEN_ALTERNATE "LocationOpenAlternate"
68 #define NEMO_ACTION_LOCATION_OPEN_IN_NEW_TAB "LocationOpenInNewTab"
69 #define NEMO_ACTION_OTHER_APPLICATION1 "OtherApplication1"
70 #define NEMO_ACTION_OTHER_APPLICATION2 "OtherApplication2"
71 #define NEMO_ACTION_NEW_FOLDER "New Folder"
72 #define NEMO_ACTION_PROPERTIES "Properties"
73 #define NEMO_ACTION_PROPERTIES_ACCEL "PropertiesAccel"
74 #define NEMO_ACTION_LOCATION_PROPERTIES "LocationProperties"
75 #define NEMO_ACTION_NO_TEMPLATES "No Templates"
76 #define NEMO_ACTION_EMPTY_TRASH "Empty Trash"
77 #define NEMO_ACTION_SAVE_SEARCH "Save Search"
78 #define NEMO_ACTION_SAVE_SEARCH_AS "Save Search As"
79 #define NEMO_ACTION_CUT "Cut"
80 #define NEMO_ACTION_LOCATION_CUT "LocationCut"
81 #define NEMO_ACTION_COPY "Copy"
82 #define NEMO_ACTION_LOCATION_COPY "LocationCopy"
83 #define NEMO_ACTION_PASTE "Paste"
84 #define NEMO_ACTION_PASTE_FILES_INTO "Paste Files Into"
85 #define NEMO_ACTION_COPY_TO_NEXT_PANE "Copy to next pane"
86 #define NEMO_ACTION_MOVE_TO_NEXT_PANE "Move to next pane"
87 #define NEMO_ACTION_COPY_TO_HOME "Copy to Home"
88 #define NEMO_ACTION_MOVE_TO_HOME "Move to Home"
89 #define NEMO_ACTION_COPY_TO_DESKTOP "Copy to Desktop"
90 #define NEMO_ACTION_MOVE_TO_DESKTOP "Move to Desktop"
91 #define NEMO_ACTION_BROWSE_MOVE_TO "BrowseMoveTo"
92 #define NEMO_ACTION_BROWSE_COPY_TO "BrowseCopyTo"
93 #define NEMO_ACTION_COPY_TO_MENU "CopyToMenu"
94 #define NEMO_ACTION_MOVE_TO_MENU "MoveToMenu"
95 #define NEMO_ACTION_LOCATION_PASTE_FILES_INTO "LocationPasteFilesInto"
96 #define NEMO_ACTION_RENAME "Rename"
97 #define NEMO_ACTION_DUPLICATE "Duplicate"
98 #define NEMO_ACTION_CREATE_LINK "Create Link"
99 #define NEMO_ACTION_SELECT_ALL "Select All"
100 #define NEMO_ACTION_INVERT_SELECTION "Invert Selection"
101 #define NEMO_ACTION_SELECT_PATTERN "Select Pattern"
102 #define NEMO_ACTION_TRASH "Trash"
103 #define NEMO_ACTION_LOCATION_TRASH "LocationTrash"
104 #define NEMO_ACTION_DELETE "Delete"
105 #define NEMO_ACTION_LOCATION_DELETE "LocationDelete"
106 #define NEMO_ACTION_RESTORE_FROM_TRASH "Restore From Trash"
107 #define NEMO_ACTION_LOCATION_RESTORE_FROM_TRASH "LocationRestoreFromTrash"
108 #define NEMO_ACTION_CONNECT_TO_SERVER_LINK "Connect To Server Link"
109 #define NEMO_ACTION_MOUNT_VOLUME "Mount Volume"
110 #define NEMO_ACTION_UNMOUNT_VOLUME "Unmount Volume"
111 #define NEMO_ACTION_EJECT_VOLUME "Eject Volume"
112 #define NEMO_ACTION_START_VOLUME "Start Volume"
113 #define NEMO_ACTION_STOP_VOLUME "Stop Volume"
114 #define NEMO_ACTION_POLL "Poll"
115 #define NEMO_ACTION_SELF_MOUNT_VOLUME "Self Mount Volume"
116 #define NEMO_ACTION_SELF_UNMOUNT_VOLUME "Self Unmount Volume"
117 #define NEMO_ACTION_SELF_EJECT_VOLUME "Self Eject Volume"
118 #define NEMO_ACTION_SELF_START_VOLUME "Self Start Volume"
119 #define NEMO_ACTION_SELF_STOP_VOLUME "Self Stop Volume"
120 #define NEMO_ACTION_SELF_POLL "Self Poll"
121 #define NEMO_ACTION_LOCATION_MOUNT_VOLUME "Location Mount Volume"
122 #define NEMO_ACTION_LOCATION_UNMOUNT_VOLUME "Location Unmount Volume"
123 #define NEMO_ACTION_LOCATION_EJECT_VOLUME "Location Eject Volume"
124 #define NEMO_ACTION_LOCATION_START_VOLUME "Location Start Volume"
125 #define NEMO_ACTION_LOCATION_STOP_VOLUME "Location Stop Volume"
126 #define NEMO_ACTION_LOCATION_POLL "Location Poll"
127 #define NEMO_ACTION_SCRIPTS "Scripts"
128 #define NEMO_ACTION_ACTIONS "Actions"
129 #define NEMO_ACTION_NEW_DOCUMENTS "New Documents"
130 #define NEMO_ACTION_NEW_EMPTY_DOCUMENT "New Empty Document"
131 #define NEMO_ACTION_EMPTY_TRASH_CONDITIONAL "Empty Trash Conditional"
132 #define NEMO_ACTION_MANUAL_LAYOUT "Manual Layout"
133 #define NEMO_ACTION_REVERSED_ORDER "Reversed Order"
134 #define NEMO_ACTION_CLEAN_UP "Clean Up"
135 #define NEMO_ACTION_KEEP_ALIGNED "Keep Aligned"
136 #define NEMO_ACTION_ARRANGE_ITEMS "Arrange Items"
137 #define NEMO_ACTION_STRETCH "Stretch"
138 #define NEMO_ACTION_UNSTRETCH "Unstretch"
139 #define NEMO_ACTION_ZOOM_ITEMS "Zoom Items"
140 #define NEMO_ACTION_SORT_TRASH_TIME "Sort by Trash Time"
141 #define NEMO_ACTION_OPEN_AS_ROOT "OpenAsRoot"
142 #define NEMO_ACTION_TOGGLE_LOCATION "Toggle Location Button"
143 
144 #define NEMO_ACTION_STATUSBAR_PLACES "Statusbar Places"
145 #define NEMO_ACTION_STATUSBAR_TREEVIEW "Statusbar Treeview"
146 #define NEMO_ACTION_STATUSBAR_SIDEBAR_TOGGLE "Statusbar Sidebar Toggle"
147 
148 #define NEMO_ACTION_OPEN_IN_TERMINAL "OpenInTerminal"
149 #define NEMO_ACTION_FOLLOW_SYMLINK "FollowSymbolicLink"
150 #define NEMO_ACTION_OPEN_CONTAINING_FOLDER "OpenContainingFolder"
151 
152 #define NEMO_ACTION_PLUGIN_MANAGER "NemoPluginManager"
153 
154 #define NEMO_ACTION_SHOW_THUMBNAILS "Show Thumbnails"
155 #define NEMO_ACTION_SHOW_FULL_CONTEXT_MENU "ShowFullContextMenu"
156 
157 #define NEMO_ACTION_PIN_FILE        "Pin File"
158 #define NEMO_ACTION_UNPIN_FILE      "Unpin File"
159 #define NEMO_ACTION_FAVORITE_FILE        "Favorite File"
160 #define NEMO_ACTION_UNFAVORITE_FILE      "Unfavorite File"
161 #define NEMO_ACTION_DESKTOP_OVERLAY "Desktop Overlay"
162 
163 typedef struct
164 {
165     const gchar  *action_name; // The action's name
166     const gchar  *config_widget_name; // The builder id of the corresponding toggle in preferences
167                                       // Can be null if the action's should be tied to another
168                                       // action's visibility.
169     const gchar  *ui_path; // The xml path of the item from the ui file
170     const gchar  *settings_key;; // The gsettings key corresponding to the menu item's visibility.
171 } ConfigurableMenuItemInfo;
172 
173 static const ConfigurableMenuItemInfo CONFIGURABLE_MENU_ITEM_INFO [] = {
174     // Selection
175     { NEMO_ACTION_OPEN, "selection_menu__open_check",
176      "/selection/Open Placeholder/Open", "selection-menu-open" },
177 
178     { NEMO_ACTION_OPEN_IN_NEW_TAB, "selection_menu__open_in_new_tab_check",
179      "/selection/Open Placeholder/OpenInNewTab", "selection-menu-open-in-new-tab" },
180 
181     { NEMO_ACTION_OPEN_ALTERNATE, "selection_menu__open_in_new_window_check",
182      "/selection/Open Placeholder/OpenAlternate", "selection-menu-open-in-new-window" },
183 
184     { NEMO_ACTION_SCRIPTS, "selection_menu__scripts_check",
185      "/selection/Open Placeholder/Scripts", "selection-menu-scripts" },
186 
187     { NEMO_ACTION_CUT, "selection_menu__cut_check",
188      "/selection/File Clipboard Actions/Cut", "selection-menu-cut" },
189 
190     { NEMO_ACTION_COPY, "selection_menu__copy_check",
191      "/selection/File Clipboard Actions/Copy", "selection-menu-copy" },
192 
193     { NEMO_ACTION_PASTE_FILES_INTO, "selection_menu__paste_check",
194      "/selection/File Clipboard Actions/Paste Files Into", "selection-menu-paste" },
195 
196     { NEMO_ACTION_DUPLICATE, "selection_menu__duplicate_check",
197      "/selection/File Clipboard Actions/Duplicate", "selection-menu-duplicate" },
198 
199     { NEMO_ACTION_PIN_FILE, "selection_menu__pin_check",
200      "/selection/File Actions/Pin File", "selection-menu-pin" },
201     { NEMO_ACTION_UNPIN_FILE, NULL,
202      "/selection/File Actions/Unpin File", "selection-menu-pin" },
203 
204     { NEMO_ACTION_FAVORITE_FILE, "selection_menu__favorite_check",
205      "/selection/File Actions/Favorite File", "selection-menu-favorite" },
206     { NEMO_ACTION_UNFAVORITE_FILE, NULL,
207      "/selection/File Actions/Unfavorite File", "selection-menu-favorite" },
208 
209     { NEMO_ACTION_CREATE_LINK, "selection_menu__make_link_check",
210      "/selection/File Actions/Create Link", "selection-menu-make-link" },
211 
212     { NEMO_ACTION_RENAME, "selection_menu__rename_check",
213      "/selection/File Actions/Rename", "selection-menu-rename" },
214 
215     { NEMO_ACTION_COPY_TO_MENU, "selection_menu__copy_to_check",
216      "/selection/File Actions/CopyToMenu", "selection-menu-copy-to" },
217 
218     { NEMO_ACTION_MOVE_TO_MENU, "selection_menu__move_to_check",
219      "/selection/File Actions/MoveToMenu", "selection-menu-move-to" },
220 
221     { NEMO_ACTION_OPEN_IN_TERMINAL, "selection_menu__open_in_terminal_check",
222      "/selection/OpenInTerminal", "selection-menu-open-in-terminal" },
223 
224     { NEMO_ACTION_OPEN_AS_ROOT, "selection_menu__open_as_root_check",
225      "/selection/OpenAsRoot", "selection-menu-open-as-root" },
226 
227     { NEMO_ACTION_TRASH, "selection_menu__move_to_trash_check",
228      "/selection/Dangerous File Actions/Trash", "selection-menu-move-to-trash" },
229 
230     { NEMO_ACTION_PROPERTIES, "selection_menu__properties_check",
231      "/selection/Properties", "selection-menu-properties" },
232 
233      // Background
234 
235     { NEMO_ACTION_NEW_FOLDER, "background_menu__create_new_folder_check",
236      "/background/Before Zoom Items/New Object Items/New Folder", "background-menu-create-new-folder" },
237 
238     { NEMO_ACTION_SCRIPTS, "background_menu__scripts_check",
239      "/background/Before Zoom Items/New Object Items/Scripts", "background-menu-scripts" },
240 
241     { NEMO_ACTION_OPEN_IN_TERMINAL, "background_menu__open_in_terminal_check",
242      "/background/Before Zoom Items/OpenInTerminal", "background-menu-open-in-terminal" },
243 
244     { NEMO_ACTION_OPEN_AS_ROOT, "background_menu__open_as_root_check",
245      "/background/Before Zoom Items/OpenAsRoot", "background-menu-open-as-root" },
246 
247     { NEMO_ACTION_SHOW_HIDDEN_FILES, "background_menu__show_hidden_files_check",
248      "/background/Before Zoom Items/Show Hidden Files", "background-menu-show-hidden-files" },
249 
250     { NEMO_ACTION_PASTE, "background_menu__paste_check",
251      "/background/Before Zoom Items/File Clipboard Actions/Paste", "background-menu-paste" },
252 
253     { NEMO_ACTION_PROPERTIES, "background_menu__properties_check",
254      "/background/Folder Items Placeholder/Properties", "background-menu-properties" },
255 
256      // Icon View (merged with background)
257     { NEMO_ACTION_ARRANGE_ITEMS, "iconview_menu__arrange_items_check",
258      "/background/Before Zoom Items/View Items/Arrange Items", "iconview-menu-arrange-items" },
259 
260     { NEMO_ACTION_CLEAN_UP, "iconview_menu__organize_by_name_check",
261      "/background/Before Zoom Items/View Items/Clean Up", "iconview-menu-organize-by-name" },
262 
263      // Desktop (new)
264     { NEMO_ACTION_DESKTOP_OVERLAY, "desktop_menu__customize_check",
265      "/background/Before Zoom Items/View Items/Desktop Overlay", "desktop-menu-customize" },
266 };
267 
268 #define CONFIGURABLE_MENU_ITEM_COUNT (G_N_ELEMENTS (CONFIGURABLE_MENU_ITEM_INFO))
269 
270 #endif /* NEMO_ACTIONS_H */
271