mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-06-22 23:19:25 -04:00
Compare commits
1 commit
79e1ce4541
...
1f28084df6
Author | SHA1 | Date | |
---|---|---|---|
|
1f28084df6 |
3 changed files with 4 additions and 33 deletions
|
@ -60,21 +60,19 @@ class ScopeCtx:
|
||||||
|
|
||||||
passed = {}
|
passed = {}
|
||||||
for obj in self._iter_recursive(self.node):
|
for obj in self._iter_recursive(self.node):
|
||||||
from .gtk_menu import Menu
|
if obj.tokens["id"] is None:
|
||||||
|
|
||||||
if not (isinstance(obj, Object) or isinstance(obj, Menu)) or obj.id is None:
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if obj.id in passed:
|
if obj.tokens["id"] in passed:
|
||||||
token = obj.group.tokens["id"]
|
token = obj.group.tokens["id"]
|
||||||
if not isinstance(obj, Template) and not isinstance(
|
if not isinstance(obj, Template) and not isinstance(
|
||||||
obj, ExtListItemFactory
|
obj, ExtListItemFactory
|
||||||
):
|
):
|
||||||
raise CompileError(
|
raise CompileError(
|
||||||
f"Duplicate object ID '{obj.id}'",
|
f"Duplicate object ID '{obj.tokens['id']}'",
|
||||||
token.range,
|
token.range,
|
||||||
)
|
)
|
||||||
passed[obj.id] = obj
|
passed[obj.tokens["id"]] = obj
|
||||||
|
|
||||||
def _iter_recursive(self, node: AstNode):
|
def _iter_recursive(self, node: AstNode):
|
||||||
yield node
|
yield node
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
using Gtk 4.0;
|
|
||||||
using Adw 1;
|
|
||||||
|
|
||||||
Adw.AlertDialog dialog1 {
|
|
||||||
responses [
|
|
||||||
ok: "Ok",
|
|
||||||
cancel: "Cancel",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
Button cancel {}
|
|
|
@ -1,16 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--
|
|
||||||
DO NOT EDIT!
|
|
||||||
This file was @generated by blueprint-compiler. Instead, edit the
|
|
||||||
corresponding .blp file and regenerate this file with blueprint-compiler.
|
|
||||||
-->
|
|
||||||
<interface>
|
|
||||||
<requires lib="gtk" version="4.0"/>
|
|
||||||
<object class="AdwAlertDialog" id="dialog1">
|
|
||||||
<responses>
|
|
||||||
<response id="ok">Ok</response>
|
|
||||||
<response id="cancel">Cancel</response>
|
|
||||||
</responses>
|
|
||||||
</object>
|
|
||||||
<object class="GtkButton" id="cancel"></object>
|
|
||||||
</interface>
|
|
Loading…
Add table
Add a link
Reference in a new issue