Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

*ImplExt traits are not exported from gtk::subclass::prelude #973

Closed
tsahyt opened this issue Mar 12, 2020 · 10 comments
Closed

*ImplExt traits are not exported from gtk::subclass::prelude #973

tsahyt opened this issue Mar 12, 2020 · 10 comments

Comments

@tsahyt
Copy link
Contributor

tsahyt commented Mar 12, 2020

The *ImplExt traits are required to call parent methods. Currently this requires explicitly importing them since they're not part of the prelude (with the exception of ObjectImplExt). Calling parent methods is a common enough thing that it might be worth to consider putting them into the prelude module.

I brought this up in the Matrix room yesterday and was instructed to open an issue here.

@sdroege
Copy link
Member

sdroege commented Mar 12, 2020

Yes it should be in the subclass prelude :) That wasn't noticed so far because usually people import the whole module with the subclass (e.g. use gtk::subclass::widget::*) in their code, but that shouldn't really be required.

@sdroege
Copy link
Member

sdroege commented Mar 12, 2020

Do you want to provide PRs for that (here and in gio and maybe in glib)?

@EPashkin
Copy link
Member

@sdroege We currently don't have "subclass prelude", better to add it to base "prelude.rs" or add new file?

@sdroege
Copy link
Member

sdroege commented Mar 12, 2020

We do :) here:

pub mod prelude {

@EPashkin
Copy link
Member

Thanks, updated gio's PR

@tsahyt
Copy link
Contributor Author

tsahyt commented Mar 13, 2020

@sdroege Sure, it only involves adding a bunch of pub use statements anyhow. So I suppose it should be added for all existing ImplExt traits then?

@sdroege
Copy link
Member

sdroege commented Mar 13, 2020

@tsahyt Yeah. For gio, @EPashkin did it already here gtk-rs/gio#284

@sdroege
Copy link
Member

sdroege commented Apr 5, 2020

@EPashkin This is done now or was something forgotten?

@EPashkin
Copy link
Member

EPashkin commented Apr 5, 2020

As I remember all done

@sdroege
Copy link
Member

sdroege commented Apr 5, 2020

@GuillaumeGomez Please close :)

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

No branches or pull requests

4 participants