1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 3 /* caja-global-preferences.h - Caja 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 St, Fifth Floor, 21 Boston, MA 02110-1301, USA. 22 23 Authors: Ramiro Estrugo <ramiro@eazel.com> 24 */ 25 26 #ifndef CAJA_GLOBAL_PREFERENCES_H 27 #define CAJA_GLOBAL_PREFERENCES_H 28 29 #include <gio/gio.h> 30 31 G_BEGIN_DECLS 32 33 /* Whether exit when last window destroyed */ 34 #define CAJA_PREFERENCES_EXIT_WITH_LAST_WINDOW "exit-with-last-window" 35 36 /* Desktop Background options */ 37 #define CAJA_PREFERENCES_BACKGROUND_SET "background-set" 38 #define CAJA_PREFERENCES_BACKGROUND_COLOR "background-color" 39 #define CAJA_PREFERENCES_BACKGROUND_URI "background-uri" 40 41 /* Side Pane Background options */ 42 #define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_SET "side-pane-background-set" 43 #define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_COLOR "side-pane-background-color" 44 #define CAJA_PREFERENCES_SIDE_PANE_BACKGROUND_URI "side-pane-background-uri" 45 46 /* Automount options */ 47 #define CAJA_PREFERENCES_MEDIA_AUTOMOUNT "automount" 48 #define CAJA_PREFERENCES_MEDIA_AUTOMOUNT_OPEN "automount-open" 49 50 /* Autorun options */ 51 #define CAJA_PREFERENCES_MEDIA_AUTORUN_NEVER "autorun-never" 52 #define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_START_APP "autorun-x-content-start-app" 53 #define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_IGNORE "autorun-x-content-ignore" 54 #define CAJA_PREFERENCES_MEDIA_AUTORUN_X_CONTENT_OPEN_FOLDER "autorun-x-content-open-folder" 55 56 /* Trash options */ 57 #define CAJA_PREFERENCES_CONFIRM_TRASH "confirm-trash" 58 #define CAJA_PREFERENCES_CONFIRM_MOVE_TO_TRASH "confirm-move-to-trash" 59 #define CAJA_PREFERENCES_ENABLE_DELETE "enable-delete" 60 61 /* Desktop options */ 62 #define CAJA_PREFERENCES_DESKTOP_IS_HOME_DIR "desktop-is-home-dir" 63 #define CAJA_PREFERENCES_SHOW_NOTIFICATIONS "show-notifications" 64 65 /* Display */ 66 #define CAJA_PREFERENCES_SHOW_HIDDEN_FILES "show-hidden-files" 67 #define CAJA_PREFERENCES_SHOW_BACKUP_FILES "show-backup-files" 68 #define CAJA_PREFERENCES_SHOW_ADVANCED_PERMISSIONS "show-advanced-permissions" 69 #define CAJA_PREFERENCES_DATE_FORMAT "date-format" 70 #define CAJA_PREFERENCES_USE_IEC_UNITS "use-iec-units" 71 #define CAJA_PREFERENCES_SHOW_ICONS_IN_LIST_VIEW "show-icons-in-list-view" 72 73 /* Mouse */ 74 #define CAJA_PREFERENCES_MOUSE_USE_EXTRA_BUTTONS "mouse-use-extra-buttons" 75 #define CAJA_PREFERENCES_MOUSE_FORWARD_BUTTON "mouse-forward-button" 76 #define CAJA_PREFERENCES_MOUSE_BACK_BUTTON "mouse-back-button" 77 78 typedef enum 79 { 80 CAJA_DATE_FORMAT_LOCALE, 81 CAJA_DATE_FORMAT_ISO, 82 CAJA_DATE_FORMAT_INFORMAL 83 } CajaDateFormat; 84 85 typedef enum 86 { 87 CAJA_NEW_TAB_POSITION_AFTER_CURRENT_TAB, 88 CAJA_NEW_TAB_POSITION_END, 89 } CajaNewTabPosition; 90 91 /* Sidebar panels */ 92 #define CAJA_PREFERENCES_TREE_SHOW_ONLY_DIRECTORIES "show-only-directories" 93 94 /* Single/Double click preference */ 95 #define CAJA_PREFERENCES_CLICK_POLICY "click-policy" 96 97 /* Activating executable text files */ 98 #define CAJA_PREFERENCES_EXECUTABLE_TEXT_ACTIVATION "executable-text-activation" 99 100 /* Installing new packages when unknown mime type activated */ 101 #define CAJA_PREFERENCES_INSTALL_MIME_ACTIVATION "install-mime-activation" 102 103 /* Spatial or browser mode */ 104 #define CAJA_PREFERENCES_ALWAYS_USE_BROWSER "always-use-browser" 105 #define CAJA_PREFERENCES_NEW_TAB_POSITION "tabs-open-position" 106 #define CAJA_PREFERENCES_ALWAYS_USE_LOCATION_ENTRY "always-use-location-entry" 107 108 /* Which views should be displayed for new windows */ 109 #define CAJA_WINDOW_STATE_START_WITH_LOCATION_BAR "start-with-location-bar" 110 #define CAJA_WINDOW_STATE_START_WITH_STATUS_BAR "start-with-status-bar" 111 #define CAJA_WINDOW_STATE_START_WITH_SIDEBAR "start-with-sidebar" 112 #define CAJA_WINDOW_STATE_START_WITH_TOOLBAR "start-with-toolbar" 113 #define CAJA_WINDOW_STATE_SIDE_PANE_VIEW "side-pane-view" 114 #define CAJA_WINDOW_STATE_GEOMETRY "geometry" 115 #define CAJA_WINDOW_STATE_MAXIMIZED "maximized" 116 #define CAJA_WINDOW_STATE_SIDEBAR_WIDTH "sidebar-width" 117 118 /* Sorting order */ 119 #define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "sort-directories-first" 120 #define CAJA_PREFERENCES_DEFAULT_SORT_ORDER "default-sort-order" 121 #define CAJA_PREFERENCES_DEFAULT_SORT_IN_REVERSE_ORDER "default-sort-in-reverse-order" 122 123 /* The default folder viewer - one of the two enums below */ 124 #define CAJA_PREFERENCES_DEFAULT_FOLDER_VIEWER "default-folder-viewer" 125 126 enum 127 { 128 CAJA_DEFAULT_FOLDER_VIEWER_ICON_VIEW, 129 CAJA_DEFAULT_FOLDER_VIEWER_COMPACT_VIEW, 130 CAJA_DEFAULT_FOLDER_VIEWER_LIST_VIEW, 131 CAJA_DEFAULT_FOLDER_VIEWER_OTHER 132 }; 133 134 /* These IIDs are used by the preferences code and in caja-application.c */ 135 #define CAJA_ICON_VIEW_IID "OAFIID:Caja_File_Manager_Icon_View" 136 #define CAJA_COMPACT_VIEW_IID "OAFIID:Caja_File_Manager_Compact_View" 137 #define CAJA_LIST_VIEW_IID "OAFIID:Caja_File_Manager_List_View" 138 139 140 /* Icon View */ 141 #define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_USE_TIGHTER_LAYOUT "default-use-tighter-layout" 142 #define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 143 144 #define CAJA_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS "labels-beside-icons" 145 146 147 148 /* Which text attributes appear beneath icon names */ 149 #define CAJA_PREFERENCES_ICON_VIEW_CAPTIONS "captions" 150 151 /* The default size for thumbnail icons */ 152 #define CAJA_PREFERENCES_ICON_VIEW_THUMBNAIL_SIZE "thumbnail-size" 153 154 /* ellipsization preferences */ 155 #define CAJA_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit" 156 #define CAJA_PREFERENCES_DESKTOP_TEXT_ELLIPSIS_LIMIT "text-ellipsis-limit" 157 158 /* Compact View */ 159 #define CAJA_PREFERENCES_COMPACT_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 160 #define CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH "all-columns-have-same-width" 161 162 /* List View */ 163 #define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level" 164 #define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "default-visible-columns" 165 #define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER "default-column-order" 166 167 enum 168 { 169 CAJA_CLICK_POLICY_SINGLE, 170 CAJA_CLICK_POLICY_DOUBLE 171 }; 172 173 enum 174 { 175 CAJA_EXECUTABLE_TEXT_LAUNCH, 176 CAJA_EXECUTABLE_TEXT_DISPLAY, 177 CAJA_EXECUTABLE_TEXT_ASK 178 }; 179 180 typedef enum 181 { 182 CAJA_SPEED_TRADEOFF_ALWAYS, 183 CAJA_SPEED_TRADEOFF_LOCAL_ONLY, 184 CAJA_SPEED_TRADEOFF_NEVER 185 } CajaSpeedTradeoffValue; 186 187 #define CAJA_PREFERENCES_SHOW_TEXT_IN_ICONS "show-icon-text" 188 #define CAJA_PREFERENCES_SHOW_DIRECTORY_ITEM_COUNTS "show-directory-item-counts" 189 #define CAJA_PREFERENCES_SHOW_IMAGE_FILE_THUMBNAILS "show-image-thumbnails" 190 #define CAJA_PREFERENCES_IMAGE_FILE_THUMBNAIL_LIMIT "thumbnail-limit" 191 #define CAJA_PREFERENCES_PREVIEW_SOUND "preview-sound" 192 193 typedef enum 194 { 195 CAJA_COMPLEX_SEARCH_BAR, 196 CAJA_SIMPLE_SEARCH_BAR 197 } CajaSearchBarMode; 198 199 #define CAJA_PREFERENCES_DESKTOP_FONT "font" 200 #define CAJA_PREFERENCES_DESKTOP_HOME_VISIBLE "home-icon-visible" 201 #define CAJA_PREFERENCES_DESKTOP_HOME_NAME "home-icon-name" 202 #define CAJA_PREFERENCES_DESKTOP_COMPUTER_VISIBLE "computer-icon-visible" 203 #define CAJA_PREFERENCES_DESKTOP_COMPUTER_NAME "computer-icon-name" 204 #define CAJA_PREFERENCES_DESKTOP_TRASH_VISIBLE "trash-icon-visible" 205 #define CAJA_PREFERENCES_DESKTOP_TRASH_NAME "trash-icon-name" 206 #define CAJA_PREFERENCES_DESKTOP_VOLUMES_VISIBLE "volumes-visible" 207 #define CAJA_PREFERENCES_DESKTOP_NETWORK_VISIBLE "network-icon-visible" 208 #define CAJA_PREFERENCES_DESKTOP_NETWORK_NAME "network-icon-name" 209 #define CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE "disable-command-line" 210 #define CAJA_PREFERENCES_DISABLED_EXTENSIONS "disabled-extensions" 211 212 void caja_global_preferences_init (void); 213 char *caja_global_preferences_get_default_folder_viewer_preference_as_iid (void); 214 215 extern GSettings *caja_preferences; 216 extern GSettings *caja_media_preferences; 217 extern GSettings *caja_window_state; 218 extern GSettings *caja_icon_view_preferences; 219 extern GSettings *caja_desktop_preferences; 220 extern GSettings *caja_tree_sidebar_preferences; 221 extern GSettings *caja_compact_view_preferences; 222 extern GSettings *caja_list_view_preferences; 223 extern GSettings *caja_extension_preferences; 224 225 extern GSettings *mate_background_preferences; 226 extern GSettings *mate_lockdown_preferences; 227 228 G_END_DECLS 229 230 #endif /* CAJA_GLOBAL_PREFERENCES_H */ 231