fix: gtk_native_dialog_run() calls show() internally (#32049)
In the synchronous code path, gtk_native_dialog_run() will call gtk_native_dialog_show(). Previously this was causing an assertion to be hit at run time.
This commit is contained in:
parent
cce427dc46
commit
eabfd6c1b9
1 changed files with 2 additions and 3 deletions
|
@ -412,9 +412,8 @@ void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) {
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void ShowFileDialog(const FileChooserDialog& dialog) {
|
void ShowFileDialog(const FileChooserDialog& dialog) {
|
||||||
if (*supports_gtk_file_chooser_native) {
|
// gtk_native_dialog_run() will call gtk_native_dialog_show() for us.
|
||||||
dl_gtk_native_dialog_show(static_cast<void*>(dialog.dialog()));
|
if (!*supports_gtk_file_chooser_native) {
|
||||||
} else {
|
|
||||||
gtk_widget_show_all(GTK_WIDGET(dialog.dialog()));
|
gtk_widget_show_all(GTK_WIDGET(dialog.dialog()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue