mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-05 16:09:07 -04:00
language: Fix some issues with menus
Blueprint's handling of menus didn't line up with how GtkBuilder handles them. The root <menu> element must have an ID and may not have attributes, and menus may not be used inline in a property.
This commit is contained in:
parent
93f2a27e35
commit
bbad6988fa
18 changed files with 52 additions and 53 deletions
|
@ -1,5 +0,0 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button {
|
||||
label: menu {};
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
4,3,15,Cannot assign Gio.MenuModel to string
|
7
tests/sample_errors/assign_menu.blp
Normal file
7
tests/sample_errors/assign_menu.blp
Normal file
|
@ -0,0 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
Button {
|
||||
label: my_menu;
|
||||
}
|
||||
|
||||
menu my_menu {}
|
1
tests/sample_errors/assign_menu.err
Normal file
1
tests/sample_errors/assign_menu.err
Normal file
|
@ -0,0 +1 @@
|
|||
4,10,7,Cannot assign Gio.MenuModel to string
|
5
tests/sample_errors/menu_errors.blp
Normal file
5
tests/sample_errors/menu_errors.blp
Normal file
|
@ -0,0 +1,5 @@
|
|||
using Gtk 4.0;
|
||||
|
||||
menu {
|
||||
label: "hi";
|
||||
}
|
2
tests/sample_errors/menu_errors.err
Normal file
2
tests/sample_errors/menu_errors.err
Normal file
|
@ -0,0 +1,2 @@
|
|||
3,1,4,Menu requires an ID
|
||||
4,3,12,Menu root may not have attributes
|
Loading…
Add table
Add a link
Reference in a new issue