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(demo): Reconstruct it using gtk-rust-template #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

marhkb
Copy link
Contributor

@marhkb marhkb commented Oct 3, 2023

The demo was recreated using gtk-rust-template and renamed to origami-demo. This makes it more available for people who just want to build it quickly and try it out. Maybe we could also publish it on flathub at some point.

Copy link
Collaborator

@yuraiz yuraiz left a comment

Choose a reason for hiding this comment

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

I didn't use the template because I think it's too much for a simple demo. Not sure that you actually need resources and translations. Publishing to flathub can be useful

origami-demo/src/window/spoiler/spoiler.blp Show resolved Hide resolved
origami-demo/data/resources/style.css Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think meson actually complicates testing. Are you still able to open the demo on a specific page by cargo run page?

Probably it's required for i18n

Copy link
Contributor Author

@marhkb marhkb Oct 3, 2023

Choose a reason for hiding this comment

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

Just using cargo run isn't that easy anymore. That's because Meson does some things like i18n as you said, setting version, constructing the desktop file, etc. Btw, I've just added an About dialog.

Is there a special use case of opening a page directly. I think, maybe when you work on a widget you want just hit arrow up in the console to get the previous cargo command and then start directly with that page?
As a workaround, we could maybe save the last page as a gsetting when running in debug mode.

Copy link
Collaborator

Choose a reason for hiding this comment

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

gsetting for the last page is a good solution, just make sure that it doesn't crash if the setting was changed to an incorrect one. I think that resetting to the main page is okay for that case.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can that be translated to blueprint and moved outside of resources?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've moved it out. But AFAIK to make it a blp I have to define it as a resource so that is compiled beforehand.

@marhkb marhkb force-pushed the marhkb/feat/demo-from-gtk-rust-template branch from df12fd6 to 657b82a Compare October 3, 2023 14:33
The demo was recreated using gtk-rust-template and renamed to
origami-demo. This makes it more available for people who just want to
build it quickly and try it out. Maybe we could also publish it on
flathub at some point.
@marhkb marhkb force-pushed the marhkb/feat/demo-from-gtk-rust-template branch from 657b82a to fbc8ecd Compare October 3, 2023 14:37
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.

2 participants