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

Improve Dialog API #789

Merged
merged 3 commits into from Feb 23, 2019

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Copy link
Member

commented Feb 22, 2019

ignore = true
[[object.function]]
name = "get_response_for_widget"
ignore = true

This comment has been minimized.

Copy link
@sdroege

sdroege Feb 22, 2019

Member

Don't we have a way to override the return type?

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Feb 22, 2019

Author Member

That's a good question! Looking for that.

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Feb 22, 2019

Author Member

Doesn't seem like we do. :-/

@sdroege

This comment has been minimized.

Copy link
Member

commented Feb 22, 2019

Good otherwise

@EPashkin

This comment has been minimized.

Copy link
Member

commented Feb 22, 2019

👍

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Feb 22, 2019

I need to update gtk examples as well.

EDIT: Just to implement Display on ResponseType.

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:dialog branch from 08181fa to 1349d3c Feb 22, 2019

fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "SortColumn::{}", match *self {
SortColumn::Default => "Default",
SortColumn::Index(_) => "Index",

This comment has been minimized.

Copy link
@EPashkin

EPashkin Feb 22, 2019

Member

Don't print column number?

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Feb 22, 2019

Author Member

Debug does it. :)

This comment has been minimized.

Copy link
@sdroege

sdroege Feb 22, 2019

Member

This is not a Display impl anyway but you know my opinion about that ;)

In this case it should print things like "Default column", "Column at index {}", etc. and not basically the same as the Debug impl.

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Feb 22, 2019

Author Member

Yes I know. But the current way of implementing Display is this one. However I agree this is not very nice... I'm open to suggestions for next release!

This comment has been minimized.

Copy link
@sdroege

sdroege Feb 22, 2019

Member

My suggestion is that you can't automatically implement Display as it requires context specific knowledge about the type that we don't have.

For this specific type a correct Display implementation would be the one I mentioned.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

commented Feb 23, 2019

CI passed so I merge.

About the Display implementations issue: we need to make something official. I don't fully agree with @sdroege's views on it and I think that @EPashkin might have some ideas about it. I'll open the issue on gir directly.

@GuillaumeGomez GuillaumeGomez merged commit 7b2df20 into gtk-rs:master Feb 23, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:dialog branch Feb 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.