From df577d94a52556d0276adbd9e6fb452e599fa82b Mon Sep 17 00:00:00 2001 From: jgcodes2020 Date: Wed, 4 Dec 2024 08:54:52 -0500 Subject: [PATCH] Remove `using Gtk 4.0` decl from blueprint include --- gtk4-macros/src/blueprint.rs | 1 - gtk4-macros/tests/my_widget.blp | 2 ++ gtk4-macros/tests/templates.rs | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk4-macros/src/blueprint.rs b/gtk4-macros/src/blueprint.rs index a10e0a59c502..f814dbfece9f 100644 --- a/gtk4-macros/src/blueprint.rs +++ b/gtk4-macros/src/blueprint.rs @@ -14,7 +14,6 @@ pub(crate) fn compile_blueprint(blueprint: &[u8]) -> Result { .unwrap_or_else(|_| panic!("blueprint-compiler not found")); let mut stdin = compiler.stdin.take().unwrap(); - stdin.write_all(b"using Gtk 4.0;\n")?; stdin.write_all(blueprint)?; drop(stdin); diff --git a/gtk4-macros/tests/my_widget.blp b/gtk4-macros/tests/my_widget.blp index 31daaa24e956..2b3a7b36bd15 100644 --- a/gtk4-macros/tests/my_widget.blp +++ b/gtk4-macros/tests/my_widget.blp @@ -1,3 +1,5 @@ +using Gtk 4.0; + template $MyWidget5 { Label label { label: 'foobar'; diff --git a/gtk4-macros/tests/templates.rs b/gtk4-macros/tests/templates.rs index 4e5813b88676..85f10e912a61 100644 --- a/gtk4-macros/tests/templates.rs +++ b/gtk4-macros/tests/templates.rs @@ -212,6 +212,8 @@ mod imp4 { #[derive(Debug, Default, gtk::CompositeTemplate)] #[template(string = " + using Gtk 4.0; + template $MyWidget4 : Widget { Label label { label: 'foobar';