gtk-rs / examples

DEPRECATED, use https://github.com/gtk-rs/gtk-rs repository instead!
MIT License
283 stars 76 forks source link

basic_subclass: fix name of our GObject subclasss type #308

Closed alatiera closed 4 years ago

alatiera commented 4 years ago

Close #307

alatiera commented 4 years ago

cc @sdroege I think this is correct but not entirely sure. The name constant there corresponds to what we would set with ClassName in C right?

sdroege commented 4 years ago

The name constant there corresponds to what we would set with ClassName in C right?

Yes. That's why I usually do things different than you did here. An imp module with struct Foo for the implementation, and outside the imp module a struct Foo for the public type. This way you don't have the confusion about type names and can distinguish between the two via imp::Foo and super::Foo.

alatiera commented 4 years ago

done as well, I think its from when I initially had implemented the functions on the public struct.

sdroege commented 4 years ago

Looks good to me, @GuillaumeGomez please merge when green :)

GuillaumeGomez commented 4 years ago

:+1:

sdroege commented 4 years ago

@GuillaumeGomez green

GuillaumeGomez commented 4 years ago

Thanks @alatiera !