summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-13 16:02:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-14 00:43:48 +0200
commitb31ed9dc1d3a8a93f924d10cd441cf756847cc5f (patch)
tree2f2e0344eea874e9b3dd6d609a289c748b4a27df /bin
parent066ad8cfcdf570c0d14f3de379adfa6c3c196518 (diff)
look for radio buttons without underlines
Change-Id: I0ed97515a03a5633628a492ec7797fc3ade8a3d8 Reviewed-on: https://gerrit.libreoffice.org/52846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lint-ui.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/lint-ui.py b/bin/lint-ui.py
index 34669c85690a..27447be36165 100755
--- a/bin/lint-ui.py
+++ b/bin/lint-ui.py
@@ -59,6 +59,14 @@ def check_message_box_spacing(element):
lint_assert(spacing.text == MESSAGE_BOX_SPACING,
"Button box 'spacing' should be " + MESSAGE_BOX_SPACING)
+def check_radio_buttons(root):
+ radios = [element for element in root.findall('.//object') if element.attrib['class'] == 'GtkRadioButton']
+ for radio in radios:
+ radio_underlines = radio.findall("./property[@name='use_underline']")
+ assert len(radio_underlines) <= 1
+ if len(radio_underlines) < 1:
+ lint_assert(False, "No use_underline in GtkRadioButton with id = '" + radio.attrib['id'] + "'")
+
def check_frames(root):
frames = [element for element in root.findall('.//object') if element.attrib['class'] == 'GtkFrame']
for frame in frames:
@@ -120,6 +128,8 @@ def main():
check_frames(root)
+ check_radio_buttons(root)
+
check_title_labels(root)
if __name__ == "__main__":