Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use compile template #1

Merged
merged 1 commit into from Mar 27, 2024

Conversation

ericktucto
Copy link
Contributor

Hola estoy usando la Composite Templates

De esta manera se puede usar los archivos .ui para componentes propios, esto PR es un ejemplo de como puede usar en el proyecto

Comment on lines +7 to +8
#[derive(CompositeTemplate, Default)]
#[template(file = "../../data/ui/rowheader.ui")]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me dio curiosidad esto y cloné este branch y no estoy pudiendo ejecutar el código.
El error es:

couldn't read src/components/../../data/ui/rowheader.ui: No such file or directory

Este código es algo funcional o solo es de ejemplo?

Si esto se arregla es una muy buena inclusión para empezar bien el proyecto

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creo que la intención es utilizar el script compile.sh para pasar de .blp a .ui. No lo he ejecutado aún pero sospecho que es eso, porque no se commitea el .ui.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Efectivamente, compile.sh es para compilar blp a ui y debes tener el compilador instalado (blueprint-compiler)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bien. Ahora si me funciono. Lo único que me tiro este error
imagen
Simplemente, quite ese $ y funcionó el compilar

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cuando compilo sin el $ me sale error
imagen
uso la version 0.10.0 de blueprint-compiler
parece que es una nueva sintaxis
imagen

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bueno, si es solo problema mío, por mí está muy bueno el cambio

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

te paso los ui compilados para que puedas probar
ui.zip
colocas en la carpeta data/ui del repositorio

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yo tengo la 0.10 y me compila correcto igual que a @ericktucto. ¿Qué reporta blueprint-compiler --version, @BasileusErwin? En principio la sintaxis del dolar según el GitLab se metió antes de salir la 0.8.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ubuntu haciendo de las suyas, tengo la versión 0.6.0.

Compile la última versión del Gitlab (0.12.1) y funciono todo bien sin ningún cambio. Detalles de versiones para tener en cuenta a futuro.

Copy link
Owner

@danirod danirod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He sacado un rato para aprender sobre GtkTemplates y el composite binding (en Python y sin Blueprint, eso sí) y ahora se me hace super claro de entender este código, así que LGTM 🚀

De momento voy dejando por aquí mi OK para ir anticipando que si lo ves bien, el miércoles entra.

Al archivo compile.sh le auguro un futuro corto, eso sí, porque entre traducciones y templates me doy cuenta que agregar Meson para que haga estas cosas automáticamente no va a ser una opción, sino una necesidad. 😅

@danirod danirod merged commit 26efe5c into danirod:trunk Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants