Fix menus

- Menus require an ID
- The top level menu block can't have attributes
This commit is contained in:
James Westman 2022-12-19 14:36:32 -06:00
parent 8a1dba662a
commit 51d8969ced
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
9 changed files with 43 additions and 13 deletions

View file

@ -1,9 +1,6 @@
using Gtk 4.0;
menu {
label: _("menu label");
test-custom-attribute: 3.1415;
menu my-menu {
submenu {
section {
label: "test section";

View file

@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<menu>
<attribute name="label" translatable="true">menu label</attribute>
<attribute name="test-custom-attribute">3.1415</attribute>
<menu id="my-menu">
<submenu>
<section>
<attribute name="label">test section</attribute>

View file

@ -1,9 +1,6 @@
using Gtk 4.0;
menu {
label: _("menu label");
test-custom-attribute: "3.1415";
menu my-menu {
submenu {
section {
label: "test section";