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

Adapt to glib::Inhibit removal #1414

Merged
merged 2 commits into from
Jul 6, 2023
Merged

Conversation

bilelmoussaoui
Copy link
Member

@bilelmoussaoui bilelmoussaoui commented Jul 6, 2023

@bilelmoussaoui bilelmoussaoui merged commit af9f9ad into master Jul 6, 2023
@bilelmoussaoui bilelmoussaoui deleted the bilelmoussaoui/no-inhibit branch July 6, 2023 20:24
@@ -41,7 +40,7 @@ fn build_ui(application: &gtk::Application) {
if let Some(application) = window.application() {
application.remove_window(window);
}
Inhibit(false)
ControlFlow::Break

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be ControlFlow::Continue?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very possibly, I will check tomorrow

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking at related changes I may say the change is correct.


But wording seems misleading. "Inhibit" is closer to "Break" (or "Stop" or "Prevent").

The GTK doc of a signal close-request says:

Return value
Type: gboolean
TRUE to stop other handlers from being invoked for the signal.

It seems natural to use Break to represent Inhibit(true) and Continue to represent Inhibit(false).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind opening an issue about this?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

2 participants