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

Builder setters accept references #767

Merged
merged 5 commits into from May 16, 2019

Conversation

Projects
None yet
3 participants
@EPashkin
Copy link
Member

commented May 15, 2019

Close #763
Makes minor fixes after #757, #764

+++ b/src/auto/about_dialog.rs
@@ -505,8 +505,8 @@ impl AboutDialogBuilder {
         self
     }
 
-    pub fn logo(mut self, logo: gdk_pixbuf::Pixbuf) -> Self {
-        self.logo = Some(logo);
+    pub fn logo(mut self, logo: &gdk_pixbuf::Pixbuf) -> Self {
+        self.logo = Some(logo.clone());
         self
     }

Only changes classes parameters, vector functions remain unchanged

    pub fn artists(mut self, artists: Vec<String>) -> Self {
        self.artists = Some(artists);
        self
    }

cc @GuillaumeGomez , @sdroege , @antoyo

};
if !param_type_override.is_empty() {

This comment has been minimized.

Copy link
@antoyo

antoyo May 15, 2019

Member

I'd rather use None instead of the empty string and do:

if let Some(typ) = param_type_override {

This comment has been minimized.

Copy link
@EPashkin

EPashkin May 16, 2019

Author Member

You right.
Done

@antoyo

antoyo approved these changes May 15, 2019

Copy link
Member

left a comment

Looks good to me.

@EPashkin EPashkin force-pushed the EPashkin:builder_accept_refs branch from 52a0c65 to 6445527 May 16, 2019

@EPashkin EPashkin force-pushed the EPashkin:builder_accept_refs branch from 6445527 to dfad4e0 May 16, 2019

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

commented May 16, 2019

👍

@EPashkin

This comment has been minimized.

Copy link
Member Author

commented May 16, 2019

Added object configuration generate_builder = true,
builders array now support both builder name and object name

builders = [
    "Gtk.AboutDialog",
    "Gtk.WindowBuilder",
]
@GuillaumeGomez

This comment has been minimized.

Copy link
Member

commented May 16, 2019

Awesome!

@EPashkin EPashkin merged commit a2958cc into gtk-rs:master May 16, 2019

2 checks passed

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

@EPashkin EPashkin deleted the EPashkin:builder_accept_refs branch May 16, 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.