[gnome-builder] tweaks: move sections around and hoist configurations



commit ebb7f6971f3f309dde91876bd9a422b9553e08a9
Author: Christian Hergert <chergert redhat com>
Date:   Sat Aug 27 03:58:33 2022 -0700

    tweaks: move sections around and hoist configurations
    
    If we move the configurations into the top list, then they are quicker
    access w/o subpages, but also allow us to add subpages to them for things
    like Meson, Cargo, etc which might have per-project tweaks.

 src/libide/gui/tweaks.ui        |  15 ++++--
 src/plugins/buildui/tweaks.ui   | 116 +++++++++++++++++++---------------------
 src/plugins/projectui/tweaks.ui |  56 ++++++++++---------
 3 files changed, 94 insertions(+), 93 deletions(-)
---
diff --git a/src/libide/gui/tweaks.ui b/src/libide/gui/tweaks.ui
index 8b3517d61..71aa9e6b6 100644
--- a/src/libide/gui/tweaks.ui
+++ b/src/libide/gui/tweaks.ui
@@ -42,6 +42,11 @@
         <property name="hidden-when">project</property>
       </object>
     </child>
+    <child>
+      <object class="IdeTweaksSection" id="foundry_section">
+        <property name="title">foundry</property>
+      </object>
+    </child>
     <child>
       <object class="IdeTweaksSection" id="vcs_section">
         <property name="title">vcs</property>
@@ -49,13 +54,15 @@
       </object>
     </child>
     <child>
-      <object class="IdeTweaksSection" id="foundry_section">
-        <property name="title">foundry</property>
+      <object class="IdeTweaksSection" id="external_section">
+        <property name="title">external</property>
       </object>
     </child>
     <child>
-      <object class="IdeTweaksSection" id="external_section">
-        <property name="title">external</property>
+      <object class="IdeTweaksSection" id="configs_section">
+        <property name="title" translatable="yes">Configurations</property>
+        <property name="hidden-when">application</property>
+        <property name="show-header">true</property>
       </object>
     </child>
     <child>
diff --git a/src/plugins/buildui/tweaks.ui b/src/plugins/buildui/tweaks.ui
index eceee8be4..d8a5b4544 100644
--- a/src/plugins/buildui/tweaks.ui
+++ b/src/plugins/buildui/tweaks.ui
@@ -307,77 +307,73 @@
         </child>
       </object>
     </child>
-    <child internal-child="overview_section">
+    <child internal-child="configs_section">
       <object class="IdeTweaksSection">
-        <child internal-child="configs_page">
-          <object class="IdeTweaksPage">
-            <child internal-child="config_factory">
-              <object class="IdeTweaksFactory">
-                <child internal-child="config_page">
-                  <object class="IdeTweaksPage">
+        <child internal-child="config_factory">
+          <object class="IdeTweaksFactory">
+            <child internal-child="config_page">
+              <object class="IdeTweaksPage">
+                <child>
+                  <object class="IdeTweaksGroup">
+                    <property name="title" translatable="yes">General</property>
                     <child>
-                      <object class="IdeTweaksGroup">
-                        <property name="title" translatable="yes">General</property>
-                        <child>
-                          <object class="IdeTweaksDirectory" id="config_prefix_entry">
-                            <property name="title" translatable="yes">Installation Prefix</property>
-                            <property name="subtitle" translatable="yes">The project will be installed to 
this directory during the installation phase of the build pipeline.</property>
-                            <property name="is-directory">true</property>
-                            <property name="binding">
-                              <object class="IdeTweaksProperty">
-                                <property name="name">prefix</property>
-                                <binding name="object">
-                                  <lookup name="item">config_factory</lookup>
-                                </binding>
-                              </object>
-                            </property>
+                      <object class="IdeTweaksDirectory" id="config_prefix_entry">
+                        <property name="title" translatable="yes">Installation Prefix</property>
+                        <property name="subtitle" translatable="yes">The project will be installed to this 
directory during the installation phase of the build pipeline.</property>
+                        <property name="is-directory">true</property>
+                        <property name="binding">
+                          <object class="IdeTweaksProperty">
+                            <property name="name">prefix</property>
+                            <binding name="object">
+                              <lookup name="item">config_factory</lookup>
+                            </binding>
                           </object>
-                        </child>
+                        </property>
                       </object>
                     </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="IdeTweaksGroup">
                     <child>
-                      <object class="IdeTweaksGroup">
-                        <child>
-                          <object class="IdeTweaksEntry" id="config_opts_entry">
-                            <property name="title" translatable="yes">Configure Options</property>
-                            <property name="binding">
-                              <object class="IdeTweaksProperty">
-                                <property name="name">config-opts</property>
-                                <binding name="object">
-                                  <lookup name="item">config_factory</lookup>
-                                </binding>
-                              </object>
-                            </property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="IdeTweaksCaption">
-                            <property name="text" translatable="yes">These options are used by the build 
system to configure the project during the configure phase of the build pipeline</property>
+                      <object class="IdeTweaksEntry" id="config_opts_entry">
+                        <property name="title" translatable="yes">Configure Options</property>
+                        <property name="binding">
+                          <object class="IdeTweaksProperty">
+                            <property name="name">config-opts</property>
+                            <binding name="object">
+                              <lookup name="item">config_factory</lookup>
+                            </binding>
                           </object>
-                        </child>
+                        </property>
                       </object>
                     </child>
                     <child>
-                      <object class="IdeTweaksGroup">
-                        <property name="title" translatable="yes">SDK</property>
-                        <child>
-                          <object class="IdeTweaksWidget">
-                            <signal name="create-for-item" handler="create_runtime_list_cb" swapped="true" 
object="GbpBuilduiTweaksAddin"/>
-                            <property name="binding">
-                              <object class="IdeTweaksProperty">
-                                <property name="name">runtime-id</property>
-                                <binding name="object">
-                                  <lookup name="item">config_factory</lookup>
-                                </binding>
-                              </object>
-                            </property>
-                          </object>
-                        </child>
-                        <child>
-                          <object class="IdeTweaksCaption">
-                            <property name="text" translatable="yes">The SDK used to build your application 
is automatically determined from the runtime.</property>
+                      <object class="IdeTweaksCaption">
+                        <property name="text" translatable="yes">These options are used by the build system 
to configure the project during the configure phase of the build pipeline</property>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child>
+                  <object class="IdeTweaksGroup">
+                    <property name="title" translatable="yes">SDK</property>
+                    <child>
+                      <object class="IdeTweaksWidget">
+                        <signal name="create-for-item" handler="create_runtime_list_cb" swapped="true" 
object="GbpBuilduiTweaksAddin"/>
+                        <property name="binding">
+                          <object class="IdeTweaksProperty">
+                            <property name="name">runtime-id</property>
+                            <binding name="object">
+                              <lookup name="item">config_factory</lookup>
+                            </binding>
                           </object>
-                        </child>
+                        </property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="IdeTweaksCaption">
+                        <property name="text" translatable="yes">The SDK used to build your application is 
automatically determined from the runtime.</property>
                       </object>
                     </child>
                   </object>
diff --git a/src/plugins/projectui/tweaks.ui b/src/plugins/projectui/tweaks.ui
index 16ca78887..d23d03d71 100644
--- a/src/plugins/projectui/tweaks.ui
+++ b/src/plugins/projectui/tweaks.ui
@@ -195,39 +195,37 @@
             </child>
           </object>
         </child>
+      </object>
+    </child>
+    <child internal-child="configs_section">
+      <object class="IdeTweaksSection">
         <child>
-          <object class="IdeTweaksPage" id="configs_page">
-            <property name="title" translatable="yes">Configurations</property>
-            <property name="icon-name">builder-build-configure-symbolic</property>
+          <object class="IdeTweaksFactory" id="config_factory">
+            <property name="model">Configurations</property>
             <child>
-              <object class="IdeTweaksFactory" id="config_factory">
-                <property name="model">Configurations</property>
+              <object class="IdeTweaksPage" id="config_page">
+                <binding name="icon-name">
+                  <lookup name="icon-name" type="IdeRuntime">
+                    <lookup name="runtime" type="IdeConfig">
+                      <lookup name="item">config_factory</lookup>
+                    </lookup>
+                  </lookup>
+                </binding>
+                <binding name="title">
+                  <lookup name="display-name" type="IdeConfig">
+                    <lookup name="item">config_factory</lookup>
+                  </lookup>
+                </binding>
                 <child>
-                  <object class="IdeTweaksPage" id="config_page">
-                    <binding name="icon-name">
-                      <lookup name="icon-name" type="IdeRuntime">
-                        <lookup name="runtime" type="IdeConfig">
-                          <lookup name="item">config_factory</lookup>
-                        </lookup>
-                      </lookup>
-                    </binding>
-                    <binding name="title">
-                      <lookup name="display-name" type="IdeConfig">
-                        <lookup name="item">config_factory</lookup>
-                      </lookup>
-                    </binding>
+                  <object class="IdeTweaksGroup">
                     <child>
-                      <object class="IdeTweaksGroup">
-                        <child>
-                          <object class="IdeTweaksInfo">
-                            <property name="title" translatable="yes">Configuration</property>
-                            <binding name="value">
-                              <lookup name="display-name" type="IdeConfig">
-                                <lookup name="item">config_factory</lookup>
-                              </lookup>
-                            </binding>
-                          </object>
-                        </child>
+                      <object class="IdeTweaksInfo">
+                        <property name="title" translatable="yes">Configuration</property>
+                        <binding name="value">
+                          <lookup name="display-name" type="IdeConfig">
+                            <lookup name="item">config_factory</lookup>
+                          </lookup>
+                        </binding>
                       </object>
                     </child>
                   </object>


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