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
Conversation
shell/browser/browser_linux.cc
Outdated
} | ||
} else { | ||
LOG(WARNING) << "Called showAboutPanel(), but didn't use " |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
- On macOS, I believe there are defaults based on the
.plist
file. - Windows behaviour is TBD, as the PR is still open (feat: add about panel customization on Windows #19420).
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.
Release Notes Persisted
|
I was unable to backport this PR to "6-0-x" cleanly; |
I was unable to backport this PR to "5-0-x" cleanly; |
I have automatically backported this PR to "7-0-x", please check out #19625 |
@erickzhao please backport this to 5 & 6! |
A maintainer has manually backported this PR to "5-0-x", please check out #19634 |
A maintainer has manually backported this PR to "6-0-x", please check out #19635 |
Description of Change
This PR fixes two small issues:
app.showAboutPanel()
would be called beforeapp.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.g_clear_object(&dialog)
call.This has now been replaced with a call to destroy the
GtkWidget
after closing the About dialog.cc @codebytere @ckerr
Checklist
npm test
passesRelease Notes
Notes: Fixed bug where app would crash if
app.showAboutPanel()
was called before setting any About panel options on Linux.