diff options
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__": |