summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-02 12:56:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-02 19:02:20 +0200
commit4d19361336b32585d5cd5bd5faccba4467b7d5e8 (patch)
treed7480487574cb717284c3bd8dae2a06064bca9ca /bin
parenta91ac466e2a996a07248ec4a2518d5ba9bdf3d61 (diff)
lint-ui: add check for upper in GtkAdjustment
Change-Id: I3a9859dbb4dbb0aeb2446176a239843a19d40e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/lint-ui.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/lint-ui.py b/bin/lint-ui.py
index 5dc33eaaec2a..26c011f2637a 100755
--- a/bin/lint-ui.py
+++ b/bin/lint-ui.py
@@ -96,6 +96,14 @@ def check_radio_buttons(root):
if len(radio_underlines) < 1:
lint_assert(False, "No use_underline in GtkRadioButton with id = '" + radio.attrib['id'] + "'", radio)
+def check_adjustments(root):
+ adjustments = [element for element in root.findall('.//object') if element.attrib['class'] == 'GtkAdjustment']
+ for adjusment in adjustments:
+ uppers = radio.findall("./property[@name='upper']")
+ assert len(uppers) <= 1
+ if len(uppers) < 1:
+ lint_assert(False, "No upper in GtkAdjustment with id = '" + radio.attrib['id'] + "'", radio)
+
def check_menu_buttons(root):
buttons = [element for element in root.findall('.//object') if element.attrib['class'] == "GtkMenuButton"]
for button in buttons: