fix: handle edge behavior for about panel on Linux (#19586)
* fix: graceful About dialog fail/exit (Linux) * Allow current to travel along path with no electrical impedance
This commit is contained in:
parent
0bb227f8a4
commit
750005f02b
1 changed files with 11 additions and 3 deletions
|
@ -147,9 +147,17 @@ bool Browser::IsEmojiPanelSupported() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Browser::ShowAboutPanel() {
|
void Browser::ShowAboutPanel() {
|
||||||
GtkAboutDialog* dialog = GTK_ABOUT_DIALOG(gtk_about_dialog_new());
|
|
||||||
|
|
||||||
const auto& opts = about_panel_options_;
|
const auto& opts = about_panel_options_;
|
||||||
|
|
||||||
|
if (!opts.is_dict()) {
|
||||||
|
LOG(WARNING) << "Called showAboutPanel(), but didn't use "
|
||||||
|
"setAboutPanelSettings() first";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget* dialogWidget = gtk_about_dialog_new();
|
||||||
|
GtkAboutDialog* dialog = GTK_ABOUT_DIALOG(dialogWidget);
|
||||||
|
|
||||||
const std::string* str;
|
const std::string* str;
|
||||||
const base::Value* val;
|
const base::Value* val;
|
||||||
|
|
||||||
|
@ -198,7 +206,7 @@ void Browser::ShowAboutPanel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_dialog_run(GTK_DIALOG(dialog));
|
gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
g_clear_object(&dialog);
|
gtk_widget_destroy(dialogWidget);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
|
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
|
||||||
|
|
Loading…
Reference in a new issue