Kaydet (Commit) b31ed9dc authored tarafından Caolán McNamara's avatar Caolán McNamara

look for radio buttons without underlines

Change-Id: I0ed97515a03a5633628a492ec7797fc3ade8a3d8
Reviewed-on: https://gerrit.libreoffice.org/52846Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 066ad8cf
......@@ -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__":
......
......@@ -202,6 +202,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">RB_RANGE</property>
......
......@@ -148,6 +148,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_positive_negative|tooltip_text">Positive and Negative</property>
<property name="image">image2</property>
<property name="xalign">0</property>
......@@ -164,6 +165,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_positive|tooltip_text">Positive</property>
<property name="image">image1</property>
<property name="xalign">0</property>
......@@ -180,6 +182,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="sidebarerrorbar|radiobutton_negative|tooltip_text">Negative</property>
<property name="image">image3</property>
<property name="xalign">0</property>
......
......@@ -217,6 +217,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......@@ -233,6 +234,7 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......
......@@ -136,6 +136,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......
......@@ -42,6 +42,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......@@ -59,6 +60,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......
......@@ -156,6 +156,7 @@
<property name="label" translatable="yes" context="colorpage|RGB">RGB</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
......@@ -172,6 +173,7 @@
<property name="label" translatable="yes" context="colorpage|CMYK">CMYK</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>