summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-16 12:57:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-16 21:42:48 +0200
commit0f8c44ce269f8f2a8563bd3682349ebfb2db1f70 (patch)
tree592fe22425be73afe9c0aa94bcd12cd0c92dd6cc /bin
parent7c49bd291ce1c77cbbf793d728cd2bafe90d8591 (diff)
remove SpinButton input-purpose properties
Change-Id: I68629d4350c43c80fdd00f9fcb8af3733753fe43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117327 Tested-by: Caolán McNamara <caolanm@redhat.com> 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 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)