1 /* -*- Mode: C; indent-tabs-mode: f; c-basic-offset: 4; tab-width: 4 -*- */ 2 3 /* nemo-global-preferences.h - Nemo specific preference keys and 4 functions. 5 6 Copyright (C) 1999, 2000, 2001 Eazel, Inc. 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU Library General Public License as 10 published by the Free Software Foundation; either version 2 of the 11 License, or (at your option) any later version. 12 13 This program 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 Library General Public License for more details. 17 18 You should have received a copy of the GNU Library General Public 19 License along with this program; see the file COPYING.LIB. If not, 20 write to the Free Software Foundation, Inc., 51 Franklin Street - Suite 500, 21 Boston, MA 02110-1335, USA. 22 23 Authors: Ramiro Estrugo <ramiro@eazel.com> 24 */ 25 26 #ifndef NEMO_GLOBAL_PREFERENCES_H 27 #define NEMO_GLOBAL_PREFERENCES_H 28 29 #include <gio/gio.h> 30 31 G_BEGIN_DECLS 32 33 /* Trash options */ 34 #define NEMO_PREFERENCES_CONFIRM_MOVE_TO_TRASH "confirm-move-to-trash" 35 #define NEMO_PREFERENCES_CONFIRM_TRASH "confirm-trash" 36 #define NEMO_PREFERENCES_ENABLE_DELETE "enable-delete" 37 #define NEMO_PREFERENCES_SWAP_TRASH_DELETE "swap-trash-delete" 38 39 /* Desktop options */ 40 #define NEMO_PREFERENCES_DESKTOP_IS_HOME_DIR "desktop-is-home-dir" 41 42 /* Display */ 43 #define NEMO_PREFERENCES_SHOW_HIDDEN_FILES "show-hidden-files" 44 #define NEMO_PREFERENCES_SHOW_ADVANCED_PERMISSIONS "show-advanced-permissions" 45 #define NEMO_PREFERENCES_DATE_FORMAT "date-format" 46 47 /* Mouse */ 48 #define NEMO_PREFERENCES_MOUSE_USE_EXTRA_BUTTONS "mouse-use-extra-buttons" 49 #define NEMO_PREFERENCES_MOUSE_FORWARD_BUTTON "mouse-forward-button" 50 #define NEMO_PREFERENCES_MOUSE_BACK_BUTTON "mouse-back-button" 51 52 typedef enum 53 { 54 NEMO_DATE_FORMAT_LOCALE, 55 NEMO_DATE_FORMAT_ISO, 56 NEMO_DATE_FORMAT_INFORMAL 57 } NemoDateFormat; 58 59 typedef enum 60 { 61 NEMO_NEW_TAB_POSITION_AFTER_CURRENT_TAB, 62 NEMO_NEW_TAB_POSITION_END, 63 } NemoNewTabPosition; 64 65 /* Sidebar panels */ 66 #define NEMO_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES "show-only-directories" 67 68 /* Single/Double click preference */ 69 #define NEMO_PREFERENCES_CLICK_POLICY "click-policy" 70 71 /* Quick renames with two single clicks and pause in-between*/ 72 #define NEMO_PREFERENCES_CLICK_TO_RENAME "quick-renames-with-pause-in-between" 73 74 /* Activating executable text files */ 75 #define NEMO_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION "executable-text-activation" 76 77 /* Spatial or browser mode */ 78 #define NEMO_PREFERENCES_ALWAYS_USE_BROWSER "always-use-browser" 79 #define NEMO_PREFERENCES_NEW_TAB_POSITION "tabs-open-position" 80 81 #define NEMO_PREFERENCES_SHOW_LOCATION_ENTRY "show-location-entry" 82 #define NEMO_PREFERENCES_SHOW_PREVIOUS_ICON_TOOLBAR "show-previous-icon-toolbar" 83 #define NEMO_PREFERENCES_SHOW_NEXT_ICON_TOOLBAR "show-next-icon-toolbar" 84 #define NEMO_PREFERENCES_SHOW_UP_ICON_TOOLBAR "show-up-icon-toolbar" 85 #define NEMO_PREFERENCES_SHOW_EDIT_ICON_TOOLBAR "show-edit-icon-toolbar" 86 #define NEMO_PREFERENCES_SHOW_RELOAD_ICON_TOOLBAR "show-reload-icon-toolbar" 87 #define NEMO_PREFERENCES_SHOW_HOME_ICON_TOOLBAR "show-home-icon-toolbar" 88 #define NEMO_PREFERENCES_SHOW_COMPUTER_ICON_TOOLBAR "show-computer-icon-toolbar" 89 #define NEMO_PREFERENCES_SHOW_SEARCH_ICON_TOOLBAR "show-search-icon-toolbar" 90 #define NEMO_PREFERENCES_SHOW_NEW_FOLDER_ICON_TOOLBAR "show-new-folder-icon-toolbar" 91 #define NEMO_PREFERENCES_SHOW_OPEN_IN_TERMINAL_TOOLBAR "show-open-in-terminal-toolbar" 92 #define NEMO_PREFERENCES_SHOW_ICON_VIEW_ICON_TOOLBAR "show-icon-view-icon-toolbar" 93 #define NEMO_PREFERENCES_SHOW_LIST_VIEW_ICON_TOOLBAR "show-list-view-icon-toolbar" 94 #define NEMO_PREFERENCES_SHOW_COMPACT_VIEW_ICON_TOOLBAR "show-compact-view-icon-toolbar" 95 #define NEMO_PREFERENCES_SHOW_ROOT_WARNING "show-root-warning" 96 #define NEMO_PREFERENCES_SHOW_SHOW_THUMBNAILS_TOOLBAR "show-show-thumbnails-toolbar" 97 98 /* Which views should be displayed for new windows */ 99 #define NEMO_WINDOW_STATE_START_WITH_STATUS_BAR "start-with-status-bar" 100 #define NEMO_WINDOW_STATE_START_WITH_SIDEBAR "start-with-sidebar" 101 #define NEMO_WINDOW_STATE_START_WITH_TOOLBAR "start-with-toolbar" 102 #define NEMO_WINDOW_STATE_START_WITH_MENU_BAR "start-with-menu-bar" 103 #define NEMO_WINDOW_STATE_SIDE_PANE_VIEW "side-pane-view" 104 #define NEMO_WINDOW_STATE_GEOMETRY "geometry" 105 #define NEMO_WINDOW_STATE_MAXIMIZED "maximized" 106 #define NEMO_WINDOW_STATE_SIDEBAR_WIDTH "sidebar-width" 107 #define NEMO_WINDOW_STATE_MY_COMPUTER_EXPANDED "my-computer-expanded" 108 #define NEMO_WINDOW_STATE_BOOKMARKS_EXPANDED "bookmarks-expanded" 109 #define NEMO_WINDOW_STATE_DEVICES_EXPANDED "devices-expanded" 110 #define NEMO_WINDOW_STATE_NETWORK_EXPANDED "network-expanded" 111 112 /* Sorting order */ 113 #define NEMO_PREFERENCES_SORT_DIRECTORIES_FIRST "sort-directories-first" 114 #define NEMO_PREFERENCES_DEFAULT_SORT_ORDER "default-sort-order" 115 #define NEMO_PREFERENCES_DEFAULT_SORT_IN_REVERSE_ORDER "default-sort-in-reverse-order" 116 117 /* The default folder viewer - one of the two enums below */ 118 #define NEMO_PREFERENCES_DEFAULT_FOLDER_VIEWER "default-folder-viewer" 119 #define NEMO_PREFERENCES_INHERIT_FOLDER_VIEWER "inherit-folder-viewer" 120 121 #define NEMO_PREFERENCES_SHOW_FULL_PATH_TITLES "show-full-path-titles" 122 123 #define NEMO_PREFERENCES_CLOSE_DEVICE_VIEW_ON_EJECT "close-device-view-on-device-eject" 124 125 #define NEMO_PREFERENCES_START_WITH_DUAL_PANE "start-with-dual-pane" 126 #define NEMO_PREFERENCES_IGNORE_VIEW_METADATA "ignore-view-metadata" 127 #define NEMO_PREFERENCES_SHOW_BOOKMARKS_IN_TO_MENUS "show-bookmarks-in-to-menus" 128 #define NEMO_PREFERENCES_SHOW_PLACES_IN_TO_MENUS "show-places-in-to-menus" 129 130 #define NEMO_PREFERENCES_RECENT_ENABLED "remember-recent-files" 131 132 #define NEMO_PREFERENCES_SIDEBAR_BOOKMARK_BREAKPOINT "sidebar-bookmark-breakpoint" 133 134 enum 135 { 136 NEMO_DEFAULT_FOLDER_VIEWER_ICON_VIEW, 137 NEMO_DEFAULT_FOLDER_VIEWER_COMPACT_VIEW, 138 NEMO_DEFAULT_FOLDER_VIEWER_LIST_VIEW, 139 NEMO_DEFAULT_FOLDER_VIEWER_OTHER 140 }; 141 142 /* These IIDs are used by the preferences code and in nemo-application.c */ 143 #define NEMO_ICON_VIEW_IID "OAFIID:Nemo_File_Manager_Icon_View" 144 #define NEMO_COMPACT_VIEW_IID "OAFIID:Nemo_File_Manager_Compact_View" 145 #define NEMO_LIST_VIEW_IID "OAFIID:Nemo_File_Manager_List_View" 146 #define NEMO_DESKTOP_ICON_VIEW_IID "OAFIID:Nemo_File_Manager_Desktop_Icon_View" 147 #define NEMO_DESKTOP_ICON_GRID_VIEW_IID "OAFIID:Nemo_File_Manager_Desktop_Icon_Grid_View" 148 149 /* Icon View */ 150 #define NEMO_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 151 #define NEMO_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS "labels-beside-icons" 152 153 /* Which text attributes appear beneath icon names */ 154 #define NEMO_PREFERENCES_ICON_VIEW_CAPTIONS "captions" 155 156 /* The default size for thumbnail icons */ 157 #define NEMO_PREFERENCES_ICON_VIEW_THUMBNAIL_SIZE "thumbnail-size" 158 159 /* ellipsization preferences */ 160 #define NEMO_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit" 161 #define NEMO_PREFERENCES_DESKTOP_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit" 162 163 /* Compact View */ 164 #define NEMO_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 165 #define NEMO_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH "all-columns-have-same-width" 166 167 /* List View */ 168 #define NEMO_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 169 #define NEMO_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "default-visible-columns" 170 #define NEMO_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER "default-column-order" 171 #define NEMO_PREFERENCES_LIST_VIEW_SEARCH_VISIBLE_COLUMNS "search-visible-columns" 172 173 enum 174 { 175 NEMO_CLICK_POLICY_SINGLE, 176 NEMO_CLICK_POLICY_DOUBLE 177 }; 178 179 enum 180 { 181 NEMO_EXECUTABLE_TEXT_LAUNCH, 182 NEMO_EXECUTABLE_TEXT_DISPLAY, 183 NEMO_EXECUTABLE_TEXT_ASK 184 }; 185 186 typedef enum 187 { 188 NEMO_SPEED_TRADEOFF_ALWAYS, 189 NEMO_SPEED_TRADEOFF_LOCAL_ONLY, 190 NEMO_SPEED_TRADEOFF_NEVER 191 } NemoSpeedTradeoffValue; 192 193 #define NEMO_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS "show-directory-item-counts" 194 #define NEMO_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS "show-image-thumbnails" 195 #define NEMO_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT "thumbnail-limit" 196 #define NEMO_PREFERENCES_INHERIT_SHOW_THUMBNAILS "inherit-show-thumbnails" 197 198 typedef enum 199 { 200 NEMO_COMPLEX_SEARCH_BAR, 201 NEMO_SIMPLE_SEARCH_BAR 202 } NemoSearchBarMode; 203 204 #define NEMO_PREFERENCES_DESKTOP_FONT "font" 205 #define NEMO_PREFERENCES_DESKTOP_HOME_VISIBLE "home-icon-visible" 206 #define NEMO_PREFERENCES_DESKTOP_COMPUTER_VISIBLE "computer-icon-visible" 207 #define NEMO_PREFERENCES_DESKTOP_TRASH_VISIBLE "trash-icon-visible" 208 #define NEMO_PREFERENCES_DESKTOP_VOLUMES_VISIBLE "volumes-visible" 209 #define NEMO_PREFERENCES_DESKTOP_NETWORK_VISIBLE "network-icon-visible" 210 #define NEMO_PREFERENCES_DESKTOP_BACKGROUND_FADE "background-fade" 211 #define NEMO_PREFERENCES_DESKTOP_IGNORED_DESKTOP_HANDLERS "ignored-desktop-handlers" 212 213 /* bulk rename utility */ 214 #define NEMO_PREFERENCES_BULK_RENAME_TOOL "bulk-rename-tool" 215 216 /* Lockdown */ 217 #define NEMO_PREFERENCES_LOCKDOWN_COMMAND_LINE "disable-command-line" 218 219 /* Desktop background */ 220 #define NEMO_PREFERENCES_DESKTOP_LAYOUT "desktop-layout" 221 #define NEMO_PREFERENCES_SHOW_ORPHANED_DESKTOP_ICONS "show-orphaned-desktop-icons" 222 #define NEMO_PREFERENCES_SHOW_DESKTOP "show-desktop-icons" /* DEPRECATED */ 223 #define NEMO_PREFERENCES_USE_DESKTOP_GRID "use-desktop-grid" 224 #define NEMO_PREFERENCES_DESKTOP_HORIZONTAL_GRID_ADJUST "horizontal-grid-adjust" 225 #define NEMO_PREFERENCES_DESKTOP_VERTICAL_GRID_ADJUST "vertical-grid-adjust" 226 227 /* File size unit prefix */ 228 #define NEMO_PREFERENCES_SIZE_PREFIXES "size-prefixes" 229 230 /* media handling */ 231 232 #define GNOME_DESKTOP_MEDIA_HANDLING_AUTOMOUNT "automount" 233 #define GNOME_DESKTOP_MEDIA_HANDLING_AUTOMOUNT_OPEN "automount-open" 234 #define GNOME_DESKTOP_MEDIA_HANDLING_AUTORUN "autorun-never" 235 236 /* Terminal */ 237 #define GNOME_DESKTOP_TERMINAL_EXEC "exec" 238 239 /* Tooltips */ 240 #define NEMO_PREFERENCES_TOOLTIPS_DESKTOP "tooltips-on-desktop" 241 #define NEMO_PREFERENCES_TOOLTIPS_ICON_VIEW "tooltips-in-icon-view" 242 #define NEMO_PREFERENCES_TOOLTIPS_LIST_VIEW "tooltips-in-list-view" 243 #define NEMO_PREFERENCES_TOOLTIP_FILE_TYPE "tooltips-show-file-type" 244 #define NEMO_PREFERENCES_TOOLTIP_MOD_DATE "tooltips-show-mod-date" 245 #define NEMO_PREFERENCES_TOOLTIP_ACCESS_DATE "tooltips-show-access-date" 246 #define NEMO_PREFERENCES_TOOLTIP_CREATED_DATE "tooltips-show-birth-date" 247 #define NEMO_PREFERENCES_TOOLTIP_FULL_PATH "tooltips-show-path" 248 249 #define NEMO_PREFERENCES_DISABLE_MENU_WARNING "disable-menu-warning" 250 251 /* Plugins */ 252 #define NEMO_PLUGIN_PREFERENCES_DISABLED_EXTENSIONS "disabled-extensions" 253 #define NEMO_PLUGIN_PREFERENCES_DISABLED_ACTIONS "disabled-actions" 254 #define NEMO_PLUGIN_PREFERENCES_DISABLED_SCRIPTS "disabled-scripts" 255 256 /* Connect-to server dialog last-used method */ 257 #define NEMO_PREFERENCES_LAST_SERVER_CONNECT_METHOD "last-server-connect-method" 258 259 /* File operations queue */ 260 #define NEMO_PREFERENCES_NEVER_QUEUE_FILE_OPS "never-queue-file-ops" 261 262 #define NEMO_PREFERENCES_CLICK_DOUBLE_PARENT_FOLDER "click-double-parent-folder" 263 264 #define NEMO_PREFERENCES_SAVED_SEARCHES "saved-searches" 265 #define NEMO_PREFERENCES_SHOW_MIME_MAKE_EXECUTABLE "enable-mime-actions-make-executable" 266 #define NEMO_PREFERENCES_DEFERRED_ATTR_PRELOAD_LIMIT "deferred-attribute-preload-limit" 267 268 void nemo_global_preferences_init (void); 269 void nemo_global_preferences_finalize (void); 270 char *nemo_global_preferences_get_default_folder_viewer_preference_as_iid (void); 271 gboolean nemo_global_preferences_get_inherit_folder_viewer_preference (void); 272 gboolean nemo_global_preferences_get_inherit_show_thumbnails_preference (void); 273 gboolean nemo_global_preferences_get_ignore_view_metadata (void); 274 int nemo_global_preferences_get_size_prefix_preference (void); 275 char *nemo_global_preferences_get_desktop_iid (void); 276 gint nemo_global_preferences_get_tooltip_flags (void); 277 gboolean nemo_global_preferences_should_load_plugin (const gchar *name, const gchar *key); 278 gchar **nemo_global_preferences_get_fileroller_mimetypes (void); 279 280 extern GSettings *nemo_preferences; 281 extern GSettings *nemo_icon_view_preferences; 282 extern GSettings *nemo_list_view_preferences; 283 extern GSettings *nemo_compact_view_preferences; 284 extern GSettings *nemo_desktop_preferences; 285 extern GSettings *nemo_tree_sidebar_preferences; 286 extern GSettings *nemo_window_state; 287 extern GSettings *nemo_plugin_preferences; 288 extern GSettings *nemo_menu_config_preferences; 289 extern GSettings *gnome_lockdown_preferences; 290 extern GSettings *gnome_background_preferences; 291 extern GSettings *gnome_media_handling_preferences; 292 extern GSettings *gnome_terminal_preferences; 293 extern GSettings *cinnamon_privacy_preferences; 294 extern GSettings *cinnamon_interface_preferences; 295 296 /* Cached for fast access and used in nemo-file.c for constructing date/time strings */ 297 extern GTimeZone *prefs_current_timezone; 298 extern gboolean prefs_current_24h_time_format; 299 extern NemoDateFormat prefs_current_date_format; 300 301 extern GTimer *nemo_startup_timer; 302 303 G_END_DECLS 304 305 #endif /* NEMO_GLOBAL_PREFERENCES_H */ 306