summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/ui-rules-enforcer.py33
-rw-r--r--cui/uiconfig/ui/spellingdialog.ui1
-rw-r--r--sfx2/uiconfig/ui/tabbarcontents.ui2
3 files changed, 35 insertions, 1 deletions
diff --git a/bin/ui-rules-enforcer.py b/bin/ui-rules-enforcer.py
index dfffe79ce7cd..bc3561bab1e1 100755
--- a/bin/ui-rules-enforcer.py
+++ b/bin/ui-rules-enforcer.py
@@ -222,6 +222,38 @@ def remove_label_fill(current):
if label_fill != None:
current.remove(label_fill)
+def enforce_menubutton_indicator_consistency(current):
+ draw_indicator = None
+ image = None
+ ismenubutton = current.get('class') == "GtkMenuButton"
+ insertpos = 0
+ for child in current:
+ enforce_menubutton_indicator_consistency(child)
+ if not ismenubutton:
+ continue
+ if child.tag == "property":
+ insertpos = insertpos + 1;
+ attributes = child.attrib
+ if attributes.get("name") == "draw_indicator" or attributes.get("name") == "draw-indicator":
+ draw_indicator = child
+ elif attributes.get("name") == "image":
+ image = child
+
+ if ismenubutton:
+ if draw_indicator == None:
+ if image == None:
+ # if there is no draw indicator and no image there should be a draw indicator
+ draw_indicator = etree.Element("property")
+ attributes = draw_indicator.attrib
+ attributes["name"] = "draw-indicator"
+ draw_indicator.text = "True"
+ current.insert(insertpos, draw_indicator)
+ else:
+ # if there is no draw indicator but there is an image that image should be open-menu-symbolic or x-office-calendar
+ for status_elem in tree.xpath("/interface/object[@id='" + image.text + "']/property[@name='icon_name' or @name='icon-name']"):
+ if status_elem.text != 'x-office-calendar':
+ status_elem.text = "open-menu-symbolic"
+
with open(sys.argv[1], encoding="utf-8") as f:
header = f.readline()
f.seek(0)
@@ -244,6 +276,7 @@ replace_image_stock(root)
remove_check_button_align(root)
remove_track_visited_links(root)
remove_label_fill(root)
+enforce_menubutton_indicator_consistency(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
diff --git a/cui/uiconfig/ui/spellingdialog.ui b/cui/uiconfig/ui/spellingdialog.ui
index c2465fd57972..cbd9093a6180 100644
--- a/cui/uiconfig/ui/spellingdialog.ui
+++ b/cui/uiconfig/ui/spellingdialog.ui
@@ -605,6 +605,7 @@
<property name="use_underline">True</property>
<property name="popup">addmenu</property>
<property name="use_popover">False</property>
+ <property name="draw-indicator">True</property>
<child>
<placeholder/>
</child>
diff --git a/sfx2/uiconfig/ui/tabbarcontents.ui b/sfx2/uiconfig/ui/tabbarcontents.ui
index ba2822692be4..31a8ceb818b4 100644
--- a/sfx2/uiconfig/ui/tabbarcontents.ui
+++ b/sfx2/uiconfig/ui/tabbarcontents.ui
@@ -5,7 +5,7 @@
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="can-focus">False</property>
- <property name="icon-name">sfx2/res/symphony/open_more.png</property>
+ <property name="icon-name">open-menu-symbolic</property>
<property name="icon_size">2</property>
</object>
<object class="GtkMenu" id="mainmenu">