summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-global-preferences.c55
-rw-r--r--libcaja-private/caja-global-preferences.h24
-rw-r--r--libcaja-private/org.mate.caja.gschema.xml.in44
3 files changed, 21 insertions, 102 deletions
diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c
index 4331b858..64e47ee2 100644
--- a/libcaja-private/caja-global-preferences.c
+++ b/libcaja-private/caja-global-preferences.c
@@ -164,27 +164,6 @@ typedef struct
*/
static const PreferenceDefault preference_defaults[] =
{
- /* List View Default Preferences */
- {
- CAJA_PREFERENCES_LIST_VIEW_DEFAULT_SORT_ORDER,
- PREFERENCE_STRING,
- "name",
- NULL, NULL,
- NULL,
- },
- {
- CAJA_PREFERENCES_LIST_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER,
- PREFERENCE_BOOLEAN,
- GINT_TO_POINTER (FALSE)
- },
- {
- CAJA_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL,
- PREFERENCE_STRING,
- "smaller",
- NULL, NULL,
- "default_zoom_level"
- },
-
{
CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE,
PREFERENCE_BOOLEAN,
@@ -350,39 +329,6 @@ caja_global_preferences_get_default_folder_viewer_preference_as_iid (void)
return g_strdup (viewer_iid);
}
-/* The icon view uses 2 variables to store the sort order and
- * whether to use manual layout. However, the UI for these
- * preferences presensts them as single option menu. So we
- * use the following preference as a proxy for the other two.
- * In caja-global-preferences.c we install callbacks for
- * the proxy preference and update the other 2 when it changes
- */
-static void
-default_icon_view_sort_order_or_manual_layout_changed_callback (gpointer callback_data)
-{
- int default_sort_order_or_manual_layout;
- int default_sort_order;
-
- default_sort_order_or_manual_layout =
- g_settings_get_enum (caja_icon_view_preferences,
- CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER_OR_MANUAL_LAYOUT);
-
- eel_preferences_set_boolean (CAJA_PREFERENCES_ICON_VIEW_DEFAULT_USE_MANUAL_LAYOUT,
- default_sort_order_or_manual_layout == PREFERENCES_SORT_ORDER_MANUALLY);
-
- if (default_sort_order_or_manual_layout != PREFERENCES_SORT_ORDER_MANUALLY)
- {
- default_sort_order = default_sort_order_or_manual_layout;
-
- g_return_if_fail (default_sort_order >= CAJA_FILE_SORT_BY_DISPLAY_NAME);
- g_return_if_fail (default_sort_order <= CAJA_FILE_SORT_BY_EMBLEMS);
-
- g_settings_set_enum (caja_icon_view_preferences,
- CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER,
- default_sort_order);
- }
-}
-
void
caja_global_preferences_init (void)
{
@@ -416,6 +362,7 @@ caja_global_preferences_init (void)
caja_compact_view_preferences = g_settings_new("org.mate.caja.compact-view");
caja_desktop_preferences = g_settings_new("org.mate.caja.desktop");
caja_tree_sidebar_preferences = g_settings_new("org.mate.caja.sidebar-panels.tree");
+ caja_list_view_preferences = g_settings_new("org.mate.caja.list-view");
/* Set up storage for values accessed in this file */
g_signal_connect_swapped (caja_icon_view_preferences,
diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h
index 7c001457..a05bc049 100644
--- a/libcaja-private/caja-global-preferences.h
+++ b/libcaja-private/caja-global-preferences.h
@@ -115,7 +115,9 @@ G_BEGIN_DECLS
#define CAJA_WINDOW_STATE_SIDEBAR_WIDTH "sidebar-width"
/* Sorting order */
-#define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "sort-directories-first"
+#define CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST "sort-directories-first"
+#define CAJA_PREFERENCES_DEFAULT_SORT_ORDER "default-sort-order"
+#define CAJA_PREFERENCES_DEFAULT_SORT_IN_REVERSE_ORDER "default-sort-in-reverse-order"
/* The default folder viewer - one of the two enums below */
#define CAJA_PREFERENCES_DEFAULT_FOLDER_VIEWER "default-folder-viewer"
@@ -135,23 +137,12 @@ G_BEGIN_DECLS
/* Icon View */
-#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER "default-sort-in-reverse-order"
-#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER "default-sort-order"
#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_USE_TIGHTER_LAYOUT "default-use-tighter-layout"
#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
-#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_USE_MANUAL_LAYOUT "default-use-manual-layout"
#define CAJA_PREFERENCES_ICON_VIEW_LABELS_BESIDE_ICONS "labels-beside-icons"
- /* The icon view uses 2 variables to store the sort order and
- * whether to use manual layout. However, the UI for these
- * preferences presensts them as single option menu. So we
- * use the following preference as a proxy for the other two.
- * In caja-global-preferences.c we install callbacks for
- * the proxy preference and update the other 2 when it changes
- */
-#define CAJA_PREFERENCES_ICON_VIEW_DEFAULT_SORT_ORDER_OR_MANUAL_LAYOUT "default-sort-order-or-manual-layout"
/* Which text attributes appear beneath icon names */
#define CAJA_PREFERENCES_ICON_VIEW_CAPTIONS "captions"
@@ -168,11 +159,9 @@ G_BEGIN_DECLS
#define CAJA_PREFERENCES_COMPACT_VIEW_ALL_COLUMNS_SAME_WIDTH "all-columns-have-same-width"
/* List View */
-#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_SORT_IN_REVERSE_ORDER "list_view/default_sort_in_reverse_order"
-#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_SORT_ORDER "list_view/default_sort_order"
-#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "list_view/default_zoom_level"
-#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "list_view/default_visible_columns"
-#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER "list_view/default_column_order"
+#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
+#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "default-visible-columns"
+#define CAJA_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER "default-column-order"
enum
{
@@ -229,6 +218,7 @@ GSettings *caja_icon_view_preferences;
GSettings *caja_desktop_preferences;
GSettings *caja_tree_sidebar_preferences;
GSettings *caja_compact_view_preferences;
+GSettings *caja_list_view_preferences;
G_END_DECLS
diff --git a/libcaja-private/org.mate.caja.gschema.xml.in b/libcaja-private/org.mate.caja.gschema.xml.in
index a7f608e5..f0357242 100644
--- a/libcaja-private/org.mate.caja.gschema.xml.in
+++ b/libcaja-private/org.mate.caja.gschema.xml.in
@@ -168,6 +168,19 @@
<_summary>Show folders first in windows</_summary>
<_description>If set to true, then Caja shows folders prior to showing files in the icon and list views.</_description>
</key>
+ <key name="default-sort-order" enum="org.gnome.nautilus.SortOrder">
+ <aliases>
+ <alias value='modification_date' target='mtime'/>
+ </aliases>
+ <default>'name'</default>
+ <_summary>Default sort order</_summary>
+ <_description>The default sort-order for items in the icon view. Possible values are "name", "size", "type", "mtime", and "emblems".</_description>
+ </key>
+ <key name="default-sort-in-reverse-order" type="b">
+ <default>false</default>
+ <_summary>Reverse sort order in new windows</_summary>
+ <_description>If true, files in new windows will be sorted in reverse order. ie, if sorted by name, then instead of sorting the files from "a" to "z", they will be sorted from "z" to "a"; if sorted by size, instead of being incrementally they will be sorted decrementally.</_description>
+ </key>
<key name="show-desktop" type="b">
<default>true</default>
<_summary>Caja handles drawing the desktop</_summary>
@@ -245,19 +258,6 @@
"size", "type", "date_modified", "date_changed", "date_accessed", "owner",
"group", "permissions", "octal_permissions" and "mime_type".</_description>
</key>
- <key name="default-sort-order" enum="org.mate.caja.SortOrder">
- <aliases>
- <alias value='modification_date' target='mtime'/>
- </aliases>
- <default>'name'</default>
- <_summary>Default sort order</_summary>
- <_description>The default sort-order for items in the icon view. Possible values are "name", "size", "type", "mtime", and "emblems".</_description>
- </key>
- <key name="default-sort-in-reverse-order" type="b">
- <default>false</default>
- <_summary>Reverse sort order in new windows</_summary>
- <_description>If true, files in new windows will be sorted in reverse order. ie, if sorted by name, then instead of sorting the files from "a" to "z", they will be sorted from "z" to "a"; if sorted by size, instead of being incrementally they will be sorted decrementally.</_description>
- </key>
<key name="default-use-tighter-layout" type="b">
<default>false</default>
<_summary>Use tighter layout in new windows</_summary>
@@ -268,11 +268,6 @@
<_summary>Put labels beside icons</_summary>
<_description>If true, labels will be placed beside icons rather than underneath them.</_description>
</key>
- <key name="default-use-manual-layout" type="b">
- <default>false</default>
- <_summary>Use manual layout in new windows</_summary>
- <_description>If true, new windows will use manual layout by default.</_description>
- </key>
<key name="default-zoom-level" enum="org.mate.caja.ZoomLevel">
<default>'standard'</default>
<_summary>Default icon zoom level</_summary>
@@ -322,19 +317,6 @@
</schema>
<schema id="org.mate.caja.list-view" path="/apps/caja/list-view/" gettext-domain="caja">
- <key name="default-sort-order" enum="org.mate.caja.SortOrder">
- <aliases>
- <alias value='modification_date' target='mtime'/>
- </aliases>
- <default>'name'</default>
- <_summary>Default sort order</_summary>
- <_description>The default sort-order for the items in the list view. Possible values are "name", "size", "type", and "mtime".</_description>
- </key>
- <key name="default-sort-in-reverse-order" type="b">
- <default>false</default>
- <_summary>Reverse sort order in new windows</_summary>
- <_description>If true, files in new windows will be sorted in reverse order. ie, if sorted by name, then instead of sorting the files from "a" to "z", they will be sorted from "z" to "a".</_description>
- </key>
<key name="default-zoom-level" enum="org.mate.caja.ZoomLevel">
<default>'smaller'</default>
<_summary>Default list zoom level</_summary>