Port prefs to AdwSpinRow

Tue, 15 Oct 2024 00:59:23 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 15 Oct 2024 00:59:23 -0500
changeset 43012
e34bd482a051
parent 43011
ce3144e2bc33
child 43013
26d30c0db9a5

Port prefs to AdwSpinRow

Now that we are Adwaita 1.4+, we don't need to do these manually.

Testing Done:
Opened prefs and checked all the ones with `GtkSpinButton` were now `AdwSpinRow`, changed them all, and confirmed updates to `pidgin3.ini`.

Reviewed at https://reviews.imfreedom.org/r/3583/

pidgin/resources/Prefs/away.ui file | annotate | diff | comparison | revisions
pidgin/resources/Prefs/conversation.ui file | annotate | diff | comparison | revisions
pidgin/resources/Prefs/network.ui file | annotate | diff | comparison | revisions
--- a/pidgin/resources/Prefs/away.ui	Tue Oct 15 00:47:42 2024 -0500
+++ b/pidgin/resources/Prefs/away.ui	Tue Oct 15 00:59:23 2024 -0500
@@ -85,26 +85,20 @@
           </object>
         </child>
         <child>
-          <object class="AdwActionRow">
-            <property name="activatable-widget">mins_before_away</property>
+          <object class="AdwSpinRow" id="mins_before_away">
             <property name="title" translatable="1">_Minutes before becoming idle</property>
             <property name="use-underline">1</property>
-            <child>
-              <object class="GtkSpinButton" id="mins_before_away">
-                <property name="focusable">1</property>
-                <property name="adjustment">
-                  <object class="GtkAdjustment">
-                    <property name="lower">1</property>
-                    <property name="upper">1440</property>
-                    <property name="value">1</property>
-                    <property name="step-increment">1</property>
-                    <property name="page-increment">10</property>
-                  </object>
-                </property>
-                <property name="numeric">1</property>
-                <property name="valign">center</property>
+            <property name="adjustment">
+              <object class="GtkAdjustment">
+                <property name="lower">1</property>
+                <property name="upper">1440</property>
+                <property name="value">1</property>
+                <property name="step-increment">1</property>
+                <property name="page-increment">10</property>
               </object>
-            </child>
+            </property>
+            <property name="digits">0</property>
+            <property name="numeric">1</property>
           </object>
         </child>
         <child>
--- a/pidgin/resources/Prefs/conversation.ui	Tue Oct 15 00:47:42 2024 -0500
+++ b/pidgin/resources/Prefs/conversation.ui	Tue Oct 15 00:59:23 2024 -0500
@@ -54,18 +54,12 @@
           </object>
         </child>
         <child>
-          <object class="AdwActionRow">
-            <property name="activatable-widget">minimum_entry_lines</property>
+          <object class="AdwSpinRow" id="minimum_entry_lines">
             <property name="title" translatable="1">Minimum input area height in lines</property>
             <property name="use-underline">1</property>
-            <child>
-              <object class="GtkSpinButton" id="minimum_entry_lines">
-                <property name="focusable">1</property>
-                <property name="adjustment">minimum_entry_lines.adjustment</property>
-                <property name="numeric">1</property>
-                <property name="valign">center</property>
-              </object>
-            </child>
+            <property name="adjustment">minimum_entry_lines.adjustment</property>
+            <property name="digits">0</property>
+            <property name="numeric">1</property>
           </object>
         </child>
       </object>
--- a/pidgin/resources/Prefs/network.ui	Tue Oct 15 00:47:42 2024 -0500
+++ b/pidgin/resources/Prefs/network.ui	Tue Oct 15 00:59:23 2024 -0500
@@ -77,37 +77,23 @@
             <property name="use-underline">1</property>
             <property name="focusable">0</property>
             <child>
-              <object class="AdwActionRow">
-                <property name="activatable-widget">ports_range_start</property>
+              <object class="AdwSpinRow" id="ports_range_start">
                 <property name="title" translatable="1">_Start</property>
                 <property name="use-underline">1</property>
-                <property name="focusable">0</property>
-                <child>
-                  <object class="GtkSpinButton" id="ports_range_start">
-                    <property name="focusable">1</property>
-                    <property name="valign">center</property>
-                    <property name="text" translatable="1">0</property>
-                    <property name="adjustment">ports_range_start.adjustment</property>
-                    <property name="numeric">1</property>
-                  </object>
-                </child>
+                <property name="adjustment">ports_range_start.adjustment</property>
+                <property name="digits">0</property>
+                <property name="numeric">1</property>
+                <property name="value">0</property>
               </object>
             </child>
             <child>
-              <object class="AdwActionRow">
-                <property name="activatable-widget">ports_range_end</property>
+              <object class="AdwSpinRow" id="ports_range_end">
                 <property name="title" translatable="1">_End</property>
                 <property name="use-underline">1</property>
-                <property name="focusable">0</property>
-                <child>
-                  <object class="GtkSpinButton" id="ports_range_end">
-                    <property name="focusable">1</property>
-                    <property name="valign">center</property>
-                    <property name="text" translatable="1">0</property>
-                    <property name="adjustment">ports_range_end.adjustment</property>
-                    <property name="numeric">1</property>
-                  </object>
-                </child>
+                <property name="adjustment">ports_range_end.adjustment</property>
+                <property name="digits">0</property>
+                <property name="numeric">1</property>
+                <property name="value">0</property>
               </object>
             </child>
           </object>

mercurial