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

Support glade #14

Open
Tracked by #102
antoyo opened this issue Apr 12, 2017 · 16 comments
Open
Tracked by #102

Support glade #14

antoyo opened this issue Apr 12, 2017 · 16 comments
Labels
Milestone

Comments

@antoyo
Copy link
Owner

antoyo commented Apr 12, 2017

Idea:

glade_view!("file.glade");

instead of using view! {} when we want to use a UI from a glade file.

@mikolajpp
Copy link

Any progress on this? With recent improvements to Glade, it is going to be the go-to solution for designing GTK interfaces.

@antoyo
Copy link
Owner Author

antoyo commented Apr 4, 2018

Unfortunately, no.
Anyone wants to work on this issue?
@zzeroo Maybe?

@ZelphirKaltstahl
Copy link

With recent improvements to Glade, it is going to be the go-to solution for designing GTK interfaces.

If the experience is anything like on GTK, I doubt it, until proven : ) I've still to find that GUI framework, where XML files for declaring how the UI looks work so well and non-sluggish and are integrated so well, that there is no issue with the types or difficult to figure out stuff, that it makes sense to use such a representation. I will go on hoping for one such framework.

@antoyo antoyo added this to the 1.0 milestone Apr 4, 2018
@mikolajpp
Copy link

@ZelphirKaltstahl Unless I misunderstood you, the point of glade is not to touch XML. It is a GUI tool. I have checked the latest version, and on the surface it works really well.

Unsure what you mean about types. Glade objects are using standard gobject interfacing.

@antoyo
Copy link
Owner Author

antoyo commented Apr 4, 2018

There's no point in having this debate here.
Some people like WYSIWYG tools to create GUI and some people don't (I personally don't, but whatever).
Since many people want this feature I'll do it for the version 1.0.
It might take a couple of months to have it, though.

@antoyo antoyo mentioned this issue Apr 4, 2018
39 tasks
@thefzsalam
Copy link

I have written a small macro to reduce boilerplate while loading glade file here: https://github.com/thefzsalam/dvm-ng/blob/master/src/views/macros.rs

@thefzsalam
Copy link

I couldn't find a way to initialize non constant variables outside main().
I resorted to defining a method build() which accepts gtk::Builder and calling let my_view = MyView::build(Builder::new_from_str(include_str!("file.glade"))); from main() instead.

@MGlolenstine
Copy link

any updates so far? This idea looks amazing!

@antoyo
Copy link
Owner Author

antoyo commented Feb 26, 2020

@MGlolenstine: unfortunately, no.

@antoyo
Copy link
Owner Author

antoyo commented Nov 8, 2020

I added an example showing how to use Glade with relm. I haven't created the macro to make this automatic yet.

@antoyo
Copy link
Owner Author

antoyo commented Nov 8, 2020

@MGlolenstine @thefzsalam : How do you expect this to work? Something like this macro?

@blfpd
Copy link

blfpd commented Feb 18, 2021

Is this issue still a priority for 1.0? Or useful?
Questioning this after reading Chris Davis’ Glade Not Recommended blog post.

@antoyo
Copy link
Owner Author

antoyo commented Feb 18, 2021

@batisteo Don't worry, relm will always provide the declarative syntax. This issue is just about adding an alternative to write the UI using a graphical tool.
By the way, read the comments in this article: it seems the author went a bit too far ;) .

@blfpd
Copy link

blfpd commented Feb 18, 2021

I was just afraid that we’re pushing on you a soon-to-be deprecated feature of GTK 4. Seems it’s not really the case indeed.

@pepijndevos
Copy link

What does Relm offer when combined with Glade?
Imagine you're working with a designer who doesn't do Rust, would it make sense to have them design in Glade, or it kind of defeats most of the purpose of Relm, and it's better to just have them work in whatever prototyping thing they like and implement it in "pure" Relm?

@antoyo
Copy link
Owner Author

antoyo commented Mar 18, 2021

@pepijndevos Well, the point of this issue is to gather ideas about how relm could be combined with Glade. I'm still waiting for the other people to provide ideas, especially regarding how events should be handled.

So, I can't really answer your questions. I guess it's up to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants