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

Update doc example #731

Merged
merged 1 commit into from Oct 28, 2018

Conversation

Projects
None yet
3 participants
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Oct 24, 2018

Part of #730.

cc @sdroege @EPashkin

//! // Don't forget to make all widgets visible.
//! window.show_all();
//! // Handle closing of the window.
//! window.connect_delete_event(|_, _| {

This comment has been minimized.

@EPashkin

EPashkin Oct 24, 2018

Member

All your examples contains

    window.connect_delete_event(|win, _| {
        win.destroy();
        Inhibit(false)
    });

This comment has been minimized.

@EPashkin

EPashkin Oct 24, 2018

Member

so IMHO it still needed here too

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Oct 24, 2018

Author Member

Yes sir!

This comment has been minimized.

@EPashkin

EPashkin Oct 25, 2018

Member

@GuillaumeGomez, @sdroege Seems main windows destroyed normally even without connect_delete_event,
any reason to use it?

This comment has been minimized.

@sdroege

sdroege Oct 26, 2018

Member

Then it's not needed unless some additional code has to be executed when the window is closed.

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:doc-example branch from 68faded to 425a8c3 Oct 24, 2018

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Oct 24, 2018

Updated.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Oct 24, 2018

//! let uiapp = gtk::Application::new("org.gtkrsnotes.demo",
//! gio::ApplicationFlags::FLAGS_NONE)
//! .expect("Application::new failed");
//! uiapp.connect_activate(|app| {

This comment has been minimized.

@EPashkin

EPashkin Oct 25, 2018

Member

Strange, UI builds in connect_startup and connect_activate empty in examples,
but gtk examples https://gitlab.gnome.org/GNOME/gtk/blob/master/examples/bp/bloatpad.c shows that UI needed be created in connect_activate,
seems we need change examples.

This comment has been minimized.

@GuillaumeGomez

GuillaumeGomez Oct 27, 2018

Author Member

Ah indeed!

@GuillaumeGomez GuillaumeGomez force-pushed the GuillaumeGomez:doc-example branch from 425a8c3 to 1ed724a Oct 27, 2018

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Oct 27, 2018

Removed the unneeded connect_delete.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Oct 28, 2018

For me this PR ready for merge.
@GuillaumeGomez, thanks

@sdroege

This comment has been minimized.

Copy link
Member

sdroege commented Oct 28, 2018

Yes, go ahead :)

@GuillaumeGomez

This comment has been minimized.

Copy link
Member Author

GuillaumeGomez commented Oct 28, 2018

I merge then!

@GuillaumeGomez GuillaumeGomez merged commit 1631eb1 into gtk-rs:master Oct 28, 2018

2 checks passed

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

@GuillaumeGomez GuillaumeGomez deleted the GuillaumeGomez:doc-example branch Oct 28, 2018

@GuillaumeGomez GuillaumeGomez referenced this pull request Nov 15, 2018

Closed

Update doc examples #730

vhdirk pushed a commit to vhdirk/gtk-rs that referenced this pull request Jan 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.