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

Add method to create a "this" expression from GObject types #710

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

jf2048
Copy link
Member

@jf2048 jf2048 commented Nov 14, 2021

cc @SeaDve

Can be useful for some expressions, makes it so the expressions example could also be simplified as:

let metadata_expression = gtk::ListItem::this_expression("item")
             .chain_property::<Note>("metadata");
// ...
 metadata_expression
            .bind(&last_modified_label, "label", Some(list_item));

Not sure if it's worth creating an extra example for this?

@SeaDve
Copy link
Contributor

SeaDve commented Nov 14, 2021

Not sure if it's worth creating an extra example for this?

If it is possible, maybe add it on the expressions one

@jf2048 jf2048 force-pushed the this-expression branch 2 times, most recently from 8e3ba09 to bafca2f Compare November 14, 2021 18:05
@jf2048 jf2048 marked this pull request as ready for review November 14, 2021 18:05
@jf2048
Copy link
Member Author

jf2048 commented Nov 14, 2021

I changed one of the expressions in the example to use a this binding.

@SeaDve
Copy link
Contributor

SeaDve commented Nov 15, 2021

I think the chain on the title_binding could be just one chain, so maybe remove the metadata_expression variable and chain it directly

@jf2048 jf2048 marked this pull request as draft November 15, 2021 04:51
@jf2048
Copy link
Member Author

jf2048 commented Dec 13, 2021

This can wait until #714, there are some conflicts because both edit the same part of the example.

@jf2048 jf2048 marked this pull request as ready for review December 14, 2021 01:34
@bilelmoussaoui bilelmoussaoui merged commit e22a52c into gtk-rs:master Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants