[Libreoffice-commits] core.git: bin/ui-rules-enforcer.py chart2/uiconfig cui/uiconfig sc/uiconfig sw/uiconfig

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 16 19:43:40 UTC 2021


 bin/ui-rules-enforcer.py                  |   17 +++++++++++++++++
 chart2/uiconfig/ui/sidebarerrorbar.ui     |    1 -
 chart2/uiconfig/ui/tp_3D_SceneGeometry.ui |    1 -
 chart2/uiconfig/ui/tp_Trendline.ui        |    1 -
 cui/uiconfig/ui/textflowpage.ui           |    1 -
 sc/uiconfig/scalc/ui/splitcolumnentry.ui  |    1 -
 sw/uiconfig/swriter/ui/textgridpage.ui    |    1 -
 7 files changed, 17 insertions(+), 6 deletions(-)

New commits:
commit 0f8c44ce269f8f2a8563bd3682349ebfb2db1f70
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 16 12:57:48 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jun 16 21:42:48 2021 +0200

    remove SpinButton input-purpose properties
    
    Change-Id: I68629d4350c43c80fdd00f9fcb8af3733753fe43
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117327
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 2624b441aa3b..644f8d0ba431 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -192,6 +192,22 @@ def remove_check_button_align(current):
         raise Exception(sys.argv[1] + ': non-default yalign', yalign.text)
       current.remove(yalign)
 
+def remove_spin_button_input_purpose(current):
+  input_purpose = None
+  isspinbutton = current.get('class') == "GtkSpinButton"
+  for child in current:
+    remove_spin_button_input_purpose(child)
+    if not isspinbutton:
+        continue
+    if child.tag == "property":
+      attributes = child.attrib
+      if attributes.get("name") == "input_purpose" or attributes.get("name") == "input-purpose":
+        input_purpose = child
+
+  if isspinbutton:
+    if input_purpose != None:
+      current.remove(input_purpose)
+
 def remove_track_visited_links(current):
   track_visited_links = None
   islabel = current.get('class') == "GtkLabel"
@@ -332,6 +348,7 @@ if not sys.argv[1].endswith('/multiline.ui'): # let this one alone not truncate
 replace_button_use_stock(root)
 replace_image_stock(root)
 remove_check_button_align(root)
+remove_spin_button_input_purpose(root)
 remove_track_visited_links(root)
 remove_expander_label_fill(root)
 remove_expander_spacing(root)
diff --git a/chart2/uiconfig/ui/sidebarerrorbar.ui b/chart2/uiconfig/ui/sidebarerrorbar.ui
index ac2daba8f517..7ffdc3a68192 100644
--- a/chart2/uiconfig/ui/sidebarerrorbar.ui
+++ b/chart2/uiconfig/ui/sidebarerrorbar.ui
@@ -130,7 +130,6 @@
                     <property name="can_focus">True</property>
                     <property name="halign">start</property>
                     <property name="text" translatable="yes" context="sidebarerrorbar|spinbutton_neg">0.00</property>
-                    <property name="input_purpose">alpha</property>
                     <property name="adjustment">adjustmentNEG</property>
                     <property name="truncate-multiline">True</property>
                     <property name="digits">2</property>
diff --git a/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui b/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
index d6e74c77def1..ef8e6e0ec0fa 100644
--- a/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
+++ b/chart2/uiconfig/ui/tp_3D_SceneGeometry.ui
@@ -143,7 +143,6 @@
         <property name="visible">True</property>
         <property name="can_focus">True</property>
         <property name="activates_default">True</property>
-        <property name="input_purpose">alpha</property>
         <property name="adjustment">adjustmentROTATION3</property>
         <property name="truncate-multiline">True</property>
         <child internal-child="accessible">
diff --git a/chart2/uiconfig/ui/tp_Trendline.ui b/chart2/uiconfig/ui/tp_Trendline.ui
index df04260bba57..5698ed56ae83 100644
--- a/chart2/uiconfig/ui/tp_Trendline.ui
+++ b/chart2/uiconfig/ui/tp_Trendline.ui
@@ -578,7 +578,6 @@
                 <property name="text">0</property>
                 <property name="truncate-multiline">True</property>
                 <property name="caps-lock-warning">False</property>
-                <property name="input-purpose">number</property>
                 <property name="adjustment">adjustmentForwardBackward2</property>
                 <property name="digits">2</property>
                 <accessibility>
diff --git a/cui/uiconfig/ui/textflowpage.ui b/cui/uiconfig/ui/textflowpage.ui
index 2d9ac00bacf6..2a8a39c4abaf 100644
--- a/cui/uiconfig/ui/textflowpage.ui
+++ b/cui/uiconfig/ui/textflowpage.ui
@@ -133,7 +133,6 @@
                 <property name="halign">start</property>
                 <property name="margin-start">25</property>
                 <property name="activates_default">True</property>
-                <property name="input_purpose">number</property>
                 <property name="adjustment">adjustment1</property>
                 <property name="truncate-multiline">True</property>
                 <child internal-child="accessible">
diff --git a/sc/uiconfig/scalc/ui/splitcolumnentry.ui b/sc/uiconfig/scalc/ui/splitcolumnentry.ui
index d96747687850..dd7b299c44e1 100644
--- a/sc/uiconfig/scalc/ui/splitcolumnentry.ui
+++ b/sc/uiconfig/scalc/ui/splitcolumnentry.ui
@@ -69,7 +69,6 @@
               <object class="GtkSpinButton" id="num_cols">
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
-                <property name="input_purpose">digits</property>
                 <property name="numeric">True</property>
                 <property name="truncate-multiline">True</property>
                 <property name="value">-1</property>
diff --git a/sw/uiconfig/swriter/ui/textgridpage.ui b/sw/uiconfig/swriter/ui/textgridpage.ui
index 20b61c09b628..583361f62987 100644
--- a/sw/uiconfig/swriter/ui/textgridpage.ui
+++ b/sw/uiconfig/swriter/ui/textgridpage.ui
@@ -268,7 +268,6 @@
                       <object class="GtkSpinButton" id="spinNF_LINESPERPAGE">
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
-                        <property name="input_purpose">digits</property>
                         <property name="adjustment">adjustmentLINESPERPAGE</property>
                         <property name="numeric">True</property>
                         <property name="truncate-multiline">True</property>


More information about the Libreoffice-commits mailing list