[nautilus/latest-ux-changes: 20/21] preferences-window: Expose show sidebar setting



commit f2061e94093a33072e792181433b0618bf68d1b2
Author: Carlos Soriano <csoriano redhat com>
Date:   Thu Jul 26 13:14:23 2018 +0200

    preferences-window: Expose show sidebar setting
    
    Since we want to replicate inside Nautilus what's in the app menu.

 src/nautilus-preferences-window.c               |   5 +
 src/resources/ui/nautilus-preferences-window.ui | 183 ++++++++++++------------
 2 files changed, 100 insertions(+), 88 deletions(-)
---
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index 48861cfb4..509057a27 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -51,6 +51,8 @@
 /* bool preferences */
 #define NAUTILUS_PREFERENCES_DIALOG_FOLDERS_FIRST_WIDGET                       \
     "sort_folders_first_checkbutton"
+#define NAUTILUS_PREFERENCS_DIALOG_START_WITH_SIDEBAR                          \
+    "show_sidebar_checkbutton"
 #define NAUTILUS_PREFERENCES_DIALOG_DELETE_PERMANENTLY_WIDGET                  \
     "show_delete_permanently_checkbutton"
 #define NAUTILUS_PREFERENCES_DIALOG_CREATE_LINK_WIDGET                         \
@@ -460,6 +462,9 @@ static void nautilus_preferences_window_setup(GtkBuilder *builder,
     bind_builder_bool (builder, gtk_filechooser_preferences,
                        NAUTILUS_PREFERENCES_DIALOG_FOLDERS_FIRST_WIDGET,
                        NAUTILUS_PREFERENCES_SORT_DIRECTORIES_FIRST);
+    bind_builder_bool (builder, nautilus_window_state,
+                       NAUTILUS_PREFERENCS_DIALOG_START_WITH_SIDEBAR,
+                       NAUTILUS_WINDOW_STATE_START_WITH_SIDEBAR);
     bind_builder_bool (builder, nautilus_preferences,
                        NAUTILUS_PREFERENCES_DIALOG_TRASH_CONFIRM_WIDGET,
                        NAUTILUS_PREFERENCES_CONFIRM_TRASH);
diff --git a/src/resources/ui/nautilus-preferences-window.ui b/src/resources/ui/nautilus-preferences-window.ui
index 8cf07ff5f..94ae1dcf6 100644
--- a/src/resources/ui/nautilus-preferences-window.ui
+++ b/src/resources/ui/nautilus-preferences-window.ui
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.22.0 -->
 <interface>
   <requires lib="gtk+" version="3.16"/>
   <object class="GtkAdjustment" id="adjustment1">
@@ -14,10 +14,20 @@
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="destroy_with_parent">True</property>
-    <property name="use-header-bar">1</property>
+    <property name="type_hint">normal</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="vbox">
-        <property name="border-width">0</property>
+        <property name="can_focus">False</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
         <child>
           <object class="GtkNotebook" id="notebook1">
             <property name="visible">True</property>
@@ -31,6 +41,58 @@
                 <property name="border_width">12</property>
                 <property name="orientation">vertical</property>
                 <property name="spacing">18</property>
+                <child>
+                  <object class="GtkBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
+                    <property name="spacing">6</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="yes" context="preferences" 
comments="Translators: a title in the preferences dialog with an option to sort folder before files 
&quot;Sort folders before files&quot;.">General</property>
+                        <property name="xalign">0</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                        <accessibility>
+                          <relation type="label-for" target="vbox12"/>
+                        </accessibility>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="show_sidebar_checkbutton">
+                        <property name="label" translatable="yes">Show sidebar</property>
+                        <property name="use_action_appearance">False</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="use_underline">True</property>
+                        <property name="xalign">0</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <accessibility>
+                      <relation type="labelled-by" target="label6"/>
+                    </accessibility>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
                 <child>
                   <object class="GtkBox" id="vbox12">
                     <property name="visible">True</property>
@@ -41,10 +103,10 @@
                       <object class="GtkLabel" id="label6">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="label" context="preferences" comments="Translators: a title in the 
preferences dialog with an option to sort folder before files &quot;Sort folders before files&quot;." 
translatable="yes">Sort</property>
+                        <property name="label" translatable="yes" context="preferences" 
comments="Translators: a title in the preferences dialog with an option to sort folder before files 
&quot;Sort folders before files&quot;.">Sort</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox12"/>
@@ -73,11 +135,6 @@
                         <property name="position">1</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox12-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label6"/>
                     </accessibility>
@@ -85,7 +142,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">0</property>
+                    <property name="position">1</property>
                   </packing>
                 </child>
                 <child>
@@ -101,7 +158,7 @@
                         <property name="label" translatable="yes">List View</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="box1"/>
@@ -130,11 +187,6 @@
                         <property name="position">1</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="box1-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label7"/>
                     </accessibility>
@@ -142,7 +194,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">1</property>
+                    <property name="position">2</property>
                   </packing>
                 </child>
                 <child>
@@ -158,7 +210,7 @@
                         <property name="label" translatable="yes">Experimental</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="box2"/>
@@ -187,11 +239,6 @@
                         <property name="position">1</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="box2-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label19"/>
                     </accessibility>
@@ -199,7 +246,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">2</property>
+                    <property name="position">3</property>
                   </packing>
                 </child>
                 <child>
@@ -215,7 +262,7 @@
                         <property name="label" translatable="yes">Icon View Captions</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox27"/>
@@ -368,12 +415,12 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="the n-th position of an icon 
caption" comments="Translators: This is an ordinal number">Second</property>
                             <property name="xalign">1</property>
-                            <style>
-                              <class name="dim-label"/>
-                            </style>
                             <accessibility>
                               <relation type="label-for" target="captions_1_combobox"/>
                             </accessibility>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -386,12 +433,12 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="the n-th position of an icon 
caption" comments="Translators: This is an ordinal number">Third</property>
                             <property name="xalign">1</property>
-                            <style>
-                              <class name="dim-label"/>
-                            </style>
                             <accessibility>
                               <relation type="label-for" target="captions_2_combobox"/>
                             </accessibility>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -404,12 +451,12 @@
                             <property name="can_focus">False</property>
                             <property name="label" translatable="yes" context="the n-th position of an icon 
caption" comments="Translators: This is an ordinal number">First</property>
                             <property name="xalign">1</property>
-                            <style>
-                              <class name="dim-label"/>
-                            </style>
                             <accessibility>
                               <relation type="label-for" target="captions_0_combobox"/>
                             </accessibility>
+                            <style>
+                              <class name="dim-label"/>
+                            </style>
                           </object>
                           <packing>
                             <property name="left_attach">0</property>
@@ -423,11 +470,6 @@
                         <property name="position">3</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox27-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label28"/>
                     </accessibility>
@@ -435,7 +477,7 @@
                   <packing>
                     <property name="expand">False</property>
                     <property name="fill">True</property>
-                    <property name="position">3</property>
+                    <property name="position">4</property>
                   </packing>
                 </child>
               </object>
@@ -473,7 +515,7 @@
                         <property name="label" translatable="yes">Open Action</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox6"/>
@@ -521,11 +563,6 @@
                         <property name="position">3</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox6-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label10"/>
                     </accessibility>
@@ -549,7 +586,7 @@
                         <property name="label" translatable="yes">Link Creation</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox14"/>
@@ -578,11 +615,6 @@
                         <property name="position">1</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox14-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label13"/>
                     </accessibility>
@@ -606,7 +638,7 @@
                         <property name="label" translatable="yes">Executable Text Files</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox7"/>
@@ -672,11 +704,6 @@
                         <property name="position">4</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox7-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label12"/>
                     </accessibility>
@@ -700,7 +727,7 @@
                         <property name="label" translatable="yes">Trash</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                         <accessibility>
                           <relation type="label-for" target="vbox8"/>
@@ -746,11 +773,6 @@
                         <property name="position">2</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox8-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label14"/>
                     </accessibility>
@@ -818,11 +840,6 @@
                         <child>
                           <placeholder/>
                         </child>
-                        <child internal-child="accessible">
-                          <object class="AtkObject" id="list_columns_vbox-atkobject">
-                            <property name="AtkObject::accessible-role">38</property>
-                          </object>
-                        </child>
                         <accessibility>
                           <relation type="labelled-by" target="label33"/>
                         </accessibility>
@@ -877,7 +894,7 @@
                         <property name="label" translatable="yes">Search</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                       </object>
                       <packing>
@@ -953,11 +970,6 @@
                         <property name="position">4</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox3-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label4"/>
                     </accessibility>
@@ -981,7 +993,7 @@
                         <property name="label" translatable="yes">Thumbnails</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                       </object>
                       <packing>
@@ -1099,11 +1111,6 @@
                         <property name="position">5</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox11-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label15"/>
                     </accessibility>
@@ -1127,7 +1134,7 @@
                         <property name="label" translatable="yes">File count</property>
                         <property name="xalign">0</property>
                         <attributes>
-                          <attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
+                          <attribute name="weight" value="bold"/>
                         </attributes>
                       </object>
                       <packing>
@@ -1203,11 +1210,6 @@
                         <property name="position">4</property>
                       </packing>
                     </child>
-                    <child internal-child="accessible">
-                      <object class="AtkObject" id="vbox13-atkobject">
-                        <property name="AtkObject::accessible-role">38</property>
-                      </object>
-                    </child>
                     <accessibility>
                       <relation type="labelled-by" target="label16"/>
                     </accessibility>
@@ -1236,6 +1238,11 @@
               </packing>
             </child>
           </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
         </child>
       </object>
     </child>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]