[Libreoffice-commits] core.git: bin/lint-ui.py

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Dec 22 20:06:36 UTC 2020


 bin/lint-ui.py |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit ad388fa57a0bb280c54998b416f6c6f5118ea9dc
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Dec 22 13:14:42 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Dec 22 21:05:43 2020 +0100

    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 at redhat.com>

diff --git a/bin/lint-ui.py b/bin/lint-ui.py
index 111fa3e18b21..7bbf46a2a113 100755
--- a/bin/lint-ui.py
+++ b/bin/lint-ui.py
@@ -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']")


More information about the Libreoffice-commits mailing list