gtk4-macros: Avoid copying the XML when using #[template(file)]
@@ -13,8 +13,7 @@ use crate::util::*;
fn gen_set_template(source: TemplateSource) -> TokenStream {
match source {
TemplateSource::File(file) => quote! {
- let t = include_bytes!(#file);
- klass.set_template(t);
+ klass.set_template_static(include_bytes!(#file));
},
TemplateSource::Resource(resource) => quote! {
klass.set_template_from_resource(&#resource);
