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

Add more missing Gtk types #443

Merged
merged 2 commits into from Feb 8, 2017
Merged

Add more missing Gtk types #443

merged 2 commits into from Feb 8, 2017

Conversation

Susurrus
Copy link
Contributor

@Susurrus Susurrus commented Feb 8, 2017

Partially address #442.

Haven't used any of this code, but didn't see any warnings about generating it. There were some GTK types that can't be generated, so I commented them out. Should I add them to the ignore list instead?

Gir.toml Outdated
@@ -175,7 +182,13 @@ generate = [
"Gtk.StateType",
"Gtk.Statusbar",
"Gtk.StatusIcon",
"Gtk.Style",
Copy link
Member

Choose a reason for hiding this comment

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

Its deprecated in 3.0, so better don't generate.

use glib::translate::*;

glib_wrapper! {
pub struct Border(Boxed<ffi::GtkBorder>);
Copy link
Member

Choose a reason for hiding this comment

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

Without fields it IMHO unusable

}

impl TargetList {
//pub fn new(targets: /*Ignored*/&[&TargetEntry], ntargets: u32) -> TargetList {
Copy link
Member

Choose a reason for hiding this comment

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

No reason to generate record without constructors

@EPashkin
Copy link
Member

EPashkin commented Feb 8, 2017

Strange that it builds, as I remember WidgetPath has mixed const/mut* usage and fails.

@Susurrus
Copy link
Contributor Author

Susurrus commented Feb 8, 2017

I think I resolved all of your comments, so here's another batch of changes. Sorry about not checking over the generated code, I looked over the remaining generated types and they all seemed to have enough useful methods to be worthwhile.

@GuillaumeGomez
Copy link
Member

Seems ok for me. Anything else for you @EPashkin?

@EPashkin
Copy link
Member

EPashkin commented Feb 8, 2017

style_context.rs don't builds on gtk/v3_20.
Function to_string conflict in impl fmt::Display for StyleContext
Gir need change to don't generate this impl for nonstandard functions.
@GuillaumeGomez, seems all good.

@GuillaumeGomez
Copy link
Member

@EPashkin: I merge then.
@Susurrus: Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 344453c into gtk-rs:master Feb 8, 2017
@Susurrus
Copy link
Contributor Author

Susurrus commented Feb 8, 2017

Given the fix in #313 I think there'll need to be another regent to make StylrContext correct, yes?

@EPashkin
Copy link
Member

EPashkin commented Feb 8, 2017

I already made PR, but forgot link this.

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.

None yet

3 participants