[nautilus] preferences: add a "Navigate folders in a tree" preference
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] preferences: add a "Navigate folders in a tree" preference
- Date: Tue, 12 Feb 2013 00:59:26 +0000 (UTC)
commit 58bde02ecd3be7e751053f3c6fe78b9a6ba9108f
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Feb 11 18:58:09 2013 -0500
preferences: add a "Navigate folders in a tree" preference
Users can now enable the tree view with the checkbox.
libnautilus-private/nautilus-global-preferences.h | 1 +
.../org.gnome.nautilus.gschema.xml.in | 5 ++
src/nautilus-file-management-properties.c | 4 ++
src/nautilus-file-management-properties.ui | 52 +++++++++++++++++++-
4 files changed, 61 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-global-preferences.h b/libnautilus-private/nautilus-global-preferences.h
index bd26470..af7d4e8 100644
--- a/libnautilus-private/nautilus-global-preferences.h
+++ b/libnautilus-private/nautilus-global-preferences.h
@@ -106,6 +106,7 @@ enum
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_ZOOM_LEVEL "default-zoom-level"
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_VISIBLE_COLUMNS "default-visible-columns"
#define NAUTILUS_PREFERENCES_LIST_VIEW_DEFAULT_COLUMN_ORDER "default-column-order"
+#define NAUTILUS_PREFERENCES_LIST_VIEW_USE_TREE "use-tree-view"
enum
{
diff --git a/libnautilus-private/org.gnome.nautilus.gschema.xml.in b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
index ba0f731..fb0d480 100644
--- a/libnautilus-private/org.gnome.nautilus.gschema.xml.in
+++ b/libnautilus-private/org.gnome.nautilus.gschema.xml.in
@@ -227,6 +227,11 @@
<_summary>Default column order in the list view</_summary>
<_description>Default column order in the list view.</_description>
</key>
+ <key name="use-tree-view" type="b">
+ <default>false</default>
+ <_summary>Use tree view</_summary>
+ <_description>Whether a tree should be used for list view navigation instead of a flat list</_description>
+ </key>
</schema>
<schema id="org.gnome.nautilus.desktop" path="/org/gnome/nautilus/desktop/" gettext-domain="nautilus">
diff --git a/src/nautilus-file-management-properties.c b/src/nautilus-file-management-properties.c
index 2e20cfa..911291b 100644
--- a/src/nautilus-file-management-properties.c
+++ b/src/nautilus-file-management-properties.c
@@ -50,6 +50,7 @@
/* bool preferences */
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_FOLDERS_FIRST_WIDGET "sort_folders_first_checkbutton"
+#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_USE_TREE_WIDGET "use_tree_view_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_CONFIRM_WIDGET "trash_confirm_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_TRASH_DELETE_WIDGET "trash_delete_checkbutton"
#define NAUTILUS_FILE_MANAGEMENT_PROPERTIES_OPEN_NEW_WINDOW_WIDGET "new_window_checkbutton"
@@ -686,6 +687,9 @@ nautilus_file_management_properties_dialog_setup (GtkBuilder *builder, GtkWindow
bind_builder_bool (builder, gtk_filechooser_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_SHOW_HIDDEN_WIDGET,
NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES);
+ bind_builder_bool (builder, nautilus_list_view_preferences,
+ NAUTILUS_FILE_MANAGEMENT_PROPERTIES_LIST_VIEW_USE_TREE_WIDGET,
+ NAUTILUS_PREFERENCES_LIST_VIEW_USE_TREE);
bind_builder_enum (builder, nautilus_preferences,
NAUTILUS_FILE_MANAGEMENT_PROPERTIES_DEFAULT_VIEW_WIDGET,
diff --git a/src/nautilus-file-management-properties.ui b/src/nautilus-file-management-properties.ui
index 7661d8b..7349ee8 100644
--- a/src/nautilus-file-management-properties.ui
+++ b/src/nautilus-file-management-properties.ui
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
- <!-- interface-requires gtk+ 2.12 -->
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="file_management_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -899,6 +899,56 @@
<property name="position">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">List View</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkCheckButton" id="use_tree_view_checkbutton">
+ <property name="label" translatable="yes">Navigate folders in a tree</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="position">2</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]