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

add basic subclassing functionality for treeview #975

Merged
merged 1 commit into from
Mar 14, 2020

Conversation

vhdirk
Copy link

@vhdirk vhdirk commented Mar 13, 2020

This adds the possibility to subclass TreeView. It does not, however, enable overriding subclasses since:

  1. I can't figure out which ones I would need to implement. The generated bindings seem very illogical in that respect.
  2. Most of what these methods do can still be done by connecting to signals.

Would it make sense to provide 'stub' subclassing Impls for all other widgets as well?

@sdroege
Copy link
Member

sdroege commented Mar 14, 2020

1. I can't figure out which ones I would need to implement. The generated bindings seem very illogical in that respect.

What do you mean with the generated bindings being illogical?

Would it make sense to provide 'stub' subclassing Impls for all other widgets as well?

Yes, over time we should start adding the missing vfuncs though.

@GuillaumeGomez Good to be merged once the CI is happy :)

@GuillaumeGomez
Copy link
Member

error[E0599]: no method named `parent_startup` found for reference `&SimpleApplicationPrivate` in the current scope
   --> src\bin\basic_subclass.rs:187:14
    |
187 |         self.parent_startup(app);
    |              ^^^^^^^^^^^^^^ method not found in `&SimpleApplicationPrivate`
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
15  | use gio::subclass::application::ApplicationImplExt;
    |
error: aborting due to previous error

@EPashkin
Copy link
Member

It must be fixed by gtk-rs/gio#284, I restarted CI

@sdroege
Copy link
Member

sdroege commented Mar 14, 2020

@GuillaumeGomez good to be merged, only the macos timeout failure as usual.

@GuillaumeGomez
Copy link
Member

I'll need to investigate this very annoying failure at some point...

@GuillaumeGomez GuillaumeGomez merged commit 1567929 into gtk-rs:master Mar 14, 2020
@EPashkin
Copy link
Member

@GuillaumeGomez It just too long, IMHO we need to minimize number of examples for CI, at minimum for macos.

@GuillaumeGomez
Copy link
Member

Maybe, to be investigated...

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

Successfully merging this pull request may close these issues.

4 participants