summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-25 16:59:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-25 21:30:00 +0200
commit408be00b15ec44c9750450fc4dba70120dd0e978 (patch)
treed04be3f862e0fb167eed2f0a6886f59fe80ca8dd /bin
parentofz#30930 each picture triggers accumulating codesets (diff)
downloadcore-408be00b15ec44c9750450fc4dba70120dd0e978.tar.gz
core-408be00b15ec44c9750450fc4dba70120dd0e978.zip
add no max-length property in GtkSpinButton rule
Change-Id: I49ef02102620d6f455758a136d980b2c39b076df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117910 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ui-rules-enforcer.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index f2da99524737..020c10cd14a4 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -224,6 +224,22 @@ def remove_spin_button_input_purpose(current):
if input_purpose != None:
current.remove(input_purpose)
+def remove_spin_button_max_length(current):
+ max_length = None
+ isspinbutton = current.get('class') == "GtkSpinButton"
+ for child in current:
+ remove_spin_button_max_length(child)
+ if not isspinbutton:
+ continue
+ if child.tag == "property":
+ attributes = child.attrib
+ if attributes.get("name") == "max_length" or attributes.get("name") == "max-length":
+ max_length = child
+
+ if isspinbutton:
+ if max_length != None:
+ current.remove(max_length)
+
def remove_track_visited_links(current):
track_visited_links = None
islabel = current.get('class') == "GtkLabel"
@@ -366,6 +382,7 @@ replace_image_stock(root)
remove_check_button_align(root)
remove_check_button_relief(root)
remove_spin_button_input_purpose(root)
+remove_spin_button_max_length(root)
remove_track_visited_links(root)
remove_expander_label_fill(root)
remove_expander_spacing(root)