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

Want some more user-callbacks? #714

Merged
merged 2 commits into from Jan 29, 2019

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Jan 29, 2019

@@ -474,7 +474,13 @@ impl Builder {
match rust_type(env, trampoline.ret.typ).unwrap().as_str() {
"GString" |
"File" => "res.to_glib_full()".to_owned(),
_ => "res.to_glib()".to_owned(),
_ => {
if env.type_(trampoline.ret.typ).is_fundamental_type(env) {

This comment has been minimized.

@sdroege

sdroege Jan 29, 2019

Member

Are enums, flags and other scalar types also considered "fundamental"?

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jan 29, 2019

Author Member

No.

This comment has been minimized.

@sdroege

sdroege Jan 29, 2019

Member

Then this is wrong and you need to match more on the actual type (what is returned by env.type_()).

There should be a function already for figuring this out.

This comment has been minimized.

@sdroege

sdroege Jan 29, 2019

Member

impl TrampolineToGlib for library::Parameter maybe, or code related to that

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Jan 29, 2019

Author Member

Ok!

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Jan 29, 2019

Does this cause any changes in the gtk-rs crates?

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Jan 29, 2019

It makes the code work but that's pretty much all. No changes on the to_glib/to_glib_full.

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Jan 29, 2019

Seems good to me then apart from the comment above :)

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:gpointer branch from 36dd6b4 to a3b05be Jan 29, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Jan 29, 2019

Updated.

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Jan 29, 2019

Heh, so much simpler. Looks good to me then as long as it doesn't change any other code in the gtk-rs crates apart from the broken ones :)

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Jan 29, 2019

Confirmed that it only fixed gtk in gtk-rs crates.
@GuillaumeGomez, @sdroege Many thanks to both of you.

@sdroege strange, but listbox_model is broken again.

error[E0282]: type annotations needed
   --> src\bin\listbox_model.rs:30:28
    |
30  |       (@param $x:ident) => ( $x );
    |                              ^^ consider giving this closure parameter a type
...
83  |       listbox.bind_model(&model, clone!(window_weak => move |item| {
    |  ________________________________-
84  | |         let box_ = gtk::ListBoxRow::new();
85  | |         let item = item.downcast_ref::<RowData>().expect("Row data is of wrong type");
86  | |
...   |
162 | |         box_
163 | |     }));
    | |______- in this macro invocation
    |
    = note: type must be known at this point

@EPashkin EPashkin merged commit 4a30517 into gtk-rs:master Jan 29, 2019

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:gpointer branch Jan 29, 2019

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Jan 29, 2019

@sdroege strange, but listbox_model is broken again.

Yes, that's #713

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.