summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-31 16:39:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-31 20:50:54 +0200
commit87fe3110bb74df751985ef6c68d98493ff8c0451 (patch)
treea516ed84b15a22650fab5f30d644e94fab4a50f0 /bin
parenta8ba9ce02f8d2b1fa5639a5bcc77693652152813 (diff)
GtkLabel:track-visited-links was removed
but we have some uses of it, which all look accidental Change-Id: Iccb12d904e8dc7410205735e49526b73bb81083e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116488 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ui-rules-enforcer.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index e981ade27b26..5e46367112cf 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -192,6 +192,21 @@ def remove_check_button_align(current):
raise Exception(sys.argv[1] + ': non-default yalign', yalign.text)
current.remove(yalign)
+def remove_track_visited_links(current):
+ track_visited_links = None
+ islabel = current.get('class') == "GtkLabel"
+ for child in current:
+ remove_track_visited_links(child)
+ if not islabel:
+ continue
+ if child.tag == "property":
+ attributes = child.attrib
+ if attributes.get("name") == "track_visited_links" or attributes.get("name") == "track-visited-links":
+ track_visited_links = child
+
+ if track_visited_links != None:
+ current.remove(track_visited_links)
+
with open(sys.argv[1], encoding="utf-8") as f:
header = f.readline()
f.seek(0)
@@ -212,6 +227,7 @@ if not sys.argv[1].endswith('/multiline.ui'): # let this one alone not truncate
replace_button_use_stock(root)
replace_image_stock(root)
remove_check_button_align(root)
+remove_track_visited_links(root)
with open(sys.argv[1], 'wb') as o:
# without encoding='unicode' (and the matching encode("utf8")) we get &#XXXX replacements for non-ascii characters