state GtkAlignment is deprecated in lint-ui

Change-Id: I138d21ed6fdf4c07e77c3f096cdd7ac94c61c292
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108198
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2020-12-22 13:14:42 +00:00
parent 99062dba81
commit ad388fa57a

View File

@@ -139,12 +139,8 @@ def check_frames(root):
frames = [element for element in root.findall('.//object') if element.attrib['class'] == 'GtkFrame']
for frame in frames:
frame_alignments = frame.findall("./child/object[@class='GtkAlignment']")
assert len(frame_alignments) <= 1
if len(frame_alignments) < 1:
lint_assert(False, "No GtkAlignment in GtkFrame with id = '" + frame.attrib['id'] + "'", frame)
if len(frame_alignments) == 1:
alignment = frame_alignments[0]
check_alignment_top_padding(alignment)
if len(frame_alignments) > 0:
lint_assert(False, "Deprecated GtkAlignment in GtkFrame with id = '" + frame.attrib['id'] + "'", frame)
def check_alignment_top_padding(alignment):
top_padding_properties = alignment.findall("./property[@name='top_padding']")