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

fix: handle edge behavior for about panel on Linux #19586

Merged
merged 2 commits into from Aug 5, 2019

Conversation

erickzhao
Copy link
Member

@erickzhao erickzhao commented Aug 2, 2019

Description of Change

This PR fixes two small issues:

  • If app.showAboutPanel() would be called before app.setAboutPanelOptions(), the app would crash. This PR handles this edge case gracefully by skipping the option logic if none are there and logging a warning to the user.
  • Upon closing the About dialog, there were previously warnings from GTK stemming from the g_clear_object(&dialog) call.
    Screenshot from 2019-08-01 18-49-47
    This has now been replaced with a call to destroy the GtkWidget after closing the About dialog.

cc @codebytere @ckerr

Checklist

Release Notes

Notes: Fixed bug where app would crash if app.showAboutPanel() was called before setting any About panel options on Linux.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 2, 2019
@erickzhao erickzhao changed the title fix: handle edge behavior for About panel on Linux fix: handle edge behavior for about panel on Linux Aug 2, 2019
}
} else {
LOG(WARNING) << "Called showAboutPanel(), but didn't use "
Copy link
Member

Choose a reason for hiding this comment

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

Unclear what we do on other platforms but should this throw an error?

Also should we short-circuit this and not even allocate the GtkWidget if no options are set?

Copy link
Member

Choose a reason for hiding this comment

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

I'm in agreement w the above: this should be short-circuited i would say.

Copy link
Member Author

@erickzhao erickzhao Aug 2, 2019

Choose a reason for hiding this comment

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

Unclear what we do on other platforms but should this throw an error?

Also should we short-circuit this and not even allocate the GtkWidget if no options are set?

So just not display the panel at all? I could make that happen.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 3, 2019
@codebytere codebytere merged commit 750005f into master Aug 5, 2019
@release-clerk
Copy link

release-clerk bot commented Aug 5, 2019

Release Notes Persisted

Fixed bug where app would crash if app.showAboutPanel() was called before setting any About panel options on Linux.

@codebytere codebytere deleted the intern/linux-about-dialog-graceful branch August 5, 2019 14:53
@trop
Copy link
Contributor

trop bot commented Aug 5, 2019

I was unable to backport this PR to "6-0-x" cleanly;
you will need to perform this backport manually.

@trop trop bot removed the target/6-0-x label Aug 5, 2019
@trop
Copy link
Contributor

trop bot commented Aug 5, 2019

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Aug 5, 2019

I have automatically backported this PR to "7-0-x", please check out #19625

@codebytere
Copy link
Member

@erickzhao please backport this to 5 & 6!

@trop
Copy link
Contributor

trop bot commented Aug 5, 2019

A maintainer has manually backported this PR to "5-0-x", please check out #19634

@trop
Copy link
Contributor

trop bot commented Aug 5, 2019

A maintainer has manually backported this PR to "6-0-x", please check out #19635

@sofianguy sofianguy added this to 7.0.0-beta.2 in 7.2.x Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
7.2.x
Fixed in 7.0.0-beta.2
Development

Successfully merging this pull request may close these issues.

None yet

4 participants