diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-13 17:01:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-14 00:44:07 +0200 |
commit | f80029445e2b558f0d0e0a25c2c1bbcbe5254120 (patch) | |
tree | 69716976bd8ab6ab293a038915c4919ebd0ab55a /bin | |
parent | b31ed9dc1d3a8a93f924d10cd441cf756847cc5f (diff) |
look for check buttons without underlines
Change-Id: Ia9963190cf3dccbfa82951a3f2c0e29e00171429
Reviewed-on: https://gerrit.libreoffice.org/52847
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-x | bin/lint-ui.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/lint-ui.py b/bin/lint-ui.py index 27447be36165..91c68bb0af60 100755 --- a/bin/lint-ui.py +++ b/bin/lint-ui.py @@ -67,6 +67,15 @@ def check_radio_buttons(root): if len(radio_underlines) < 1: lint_assert(False, "No use_underline in GtkRadioButton with id = '" + radio.attrib['id'] + "'") +def check_check_buttons(root): + radios = [element for element in root.findall('.//object') if element.attrib['class'] == 'GtkCheckButton'] + 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 GtkCheckButton 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: @@ -130,6 +139,8 @@ def main(): check_radio_buttons(root) + check_check_buttons(root) + check_title_labels(root) if __name__ == "__main__": |