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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Jun 17 14:27:20 UTC 2021


 bin/ui-rules-enforcer.py                    |   17 +++++++++++++++++
 chart2/uiconfig/ui/tp_AxisPositions.ui      |    1 -
 cui/uiconfig/ui/optbasicidepage.ui          |    1 -
 cui/uiconfig/ui/paragalignpage.ui           |    2 --
 sc/uiconfig/scalc/ui/sheetprintpage.ui      |    1 -
 sd/uiconfig/simpress/ui/publishingdialog.ui |    3 ---
 sw/uiconfig/swriter/ui/converttexttable.ui  |    1 -
 sw/uiconfig/swriter/ui/numparapage.ui       |    1 -
 sw/uiconfig/swriter/ui/splittable.ui        |    1 -
 9 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit 1442ab9c7d57de2242ff1a690c4fa7bcb3c1f757
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jun 17 11:50:09 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jun 17 16:26:33 2021 +0200

    remove 'relief' from CheckButtons
    
    Change-Id: I8a17c36489946327113e63f80b952525ae4201a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117377
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index 644f8d0ba431..f2da99524737 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_check_button_relief(current):
+  relief = None
+  ischeckorradiobutton = current.get('class') == "GtkCheckButton" or current.get('class') == "GtkRadioButton"
+  for child in current:
+    remove_check_button_relief(child)
+    if not ischeckorradiobutton:
+        continue
+    if child.tag == "property":
+      attributes = child.attrib
+      if attributes.get("name") == "relief":
+        relief = child
+
+  if ischeckorradiobutton:
+    if relief != None:
+      current.remove(relief)
+
 def remove_spin_button_input_purpose(current):
   input_purpose = None
   isspinbutton = current.get('class') == "GtkSpinButton"
@@ -348,6 +364,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_check_button_relief(root)
 remove_spin_button_input_purpose(root)
 remove_track_visited_links(root)
 remove_expander_label_fill(root)
diff --git a/chart2/uiconfig/ui/tp_AxisPositions.ui b/chart2/uiconfig/ui/tp_AxisPositions.ui
index 728a0fd296a1..5308a2bc911f 100644
--- a/chart2/uiconfig/ui/tp_AxisPositions.ui
+++ b/chart2/uiconfig/ui/tp_AxisPositions.ui
@@ -590,7 +590,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="relief">half</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
               </object>
diff --git a/cui/uiconfig/ui/optbasicidepage.ui b/cui/uiconfig/ui/optbasicidepage.ui
index 1a8f38804bc5..f4311747f724 100644
--- a/cui/uiconfig/ui/optbasicidepage.ui
+++ b/cui/uiconfig/ui/optbasicidepage.ui
@@ -136,7 +136,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">False</property>
-                <property name="relief">none</property>
                 <property name="use_underline">True</property>
                 <property name="draw_indicator">True</property>
                 <child internal-child="accessible">
diff --git a/cui/uiconfig/ui/paragalignpage.ui b/cui/uiconfig/ui/paragalignpage.ui
index bb266db6452a..70fab84cc46b 100644
--- a/cui/uiconfig/ui/paragalignpage.ui
+++ b/cui/uiconfig/ui/paragalignpage.ui
@@ -107,7 +107,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="relief">none</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                     <property name="group">radioBTN_LEFTALIGN</property>
@@ -139,7 +138,6 @@
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
                     <property name="margin-start">22</property>
-                    <property name="relief">none</property>
                     <property name="use_underline">True</property>
                     <property name="draw_indicator">True</property>
                   </object>
diff --git a/sc/uiconfig/scalc/ui/sheetprintpage.ui b/sc/uiconfig/scalc/ui/sheetprintpage.ui
index f3259ceda62a..5dae7d8ed5cf 100644
--- a/sc/uiconfig/scalc/ui/sheetprintpage.ui
+++ b/sc/uiconfig/scalc/ui/sheetprintpage.ui
@@ -97,7 +97,6 @@
                     <property name="receives_default">False</property>
                     <property name="halign">start</property>
                     <property name="valign">center</property>
-                    <property name="relief">none</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
diff --git a/sd/uiconfig/simpress/ui/publishingdialog.ui b/sd/uiconfig/simpress/ui/publishingdialog.ui
index dc4244b19846..ba7eb55b5903 100644
--- a/sd/uiconfig/simpress/ui/publishingdialog.ui
+++ b/sd/uiconfig/simpress/ui/publishingdialog.ui
@@ -1166,7 +1166,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="relief">half</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">resolution1Radiobutton</property>
@@ -1188,7 +1187,6 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="relief">half</property>
                             <property name="use_underline">True</property>
                             <property name="draw_indicator">True</property>
                             <property name="group">resolution1Radiobutton</property>
@@ -1523,7 +1521,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="relief">half</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>
diff --git a/sw/uiconfig/swriter/ui/converttexttable.ui b/sw/uiconfig/swriter/ui/converttexttable.ui
index 0faf39e79768..6fdb17083007 100644
--- a/sw/uiconfig/swriter/ui/converttexttable.ui
+++ b/sw/uiconfig/swriter/ui/converttexttable.ui
@@ -108,7 +108,6 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="relief">half</property>
                         <property name="use_underline">True</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
diff --git a/sw/uiconfig/swriter/ui/numparapage.ui b/sw/uiconfig/swriter/ui/numparapage.ui
index cb8f931c21da..b2a5ea27ce1d 100644
--- a/sw/uiconfig/swriter/ui/numparapage.ui
+++ b/sw/uiconfig/swriter/ui/numparapage.ui
@@ -198,7 +198,6 @@
                 <property name="tooltip_text" translatable="yes" context="numparapage|checkCB_NEW_START">For ordered lists and List Styles with numbering</property>
                 <property name="no_show_all">True</property>
                 <property name="hexpand">True</property>
-                <property name="relief">none</property>
                 <property name="use_underline">True</property>
                 <property name="inconsistent">True</property>
                 <property name="draw_indicator">True</property>
diff --git a/sw/uiconfig/swriter/ui/splittable.ui b/sw/uiconfig/swriter/ui/splittable.ui
index 95ee0fc6aba1..5a555a3e816d 100644
--- a/sw/uiconfig/swriter/ui/splittable.ui
+++ b/sw/uiconfig/swriter/ui/splittable.ui
@@ -92,7 +92,6 @@
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="relief">half</property>
                     <property name="use_underline">True</property>
                     <property name="active">True</property>
                     <property name="draw_indicator">True</property>


More information about the Libreoffice-commits mailing list