fix: revert required portal version for file chooser dialogs (#44426)

* feat: add support for configuring xdg portal version at runtime

* doc: update command-line-switches.md

* doc: update command-line-switches.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* doc: required portal version for defaultPath support

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* doc: update more occurrances

* fix: remove warning from save dialogs

* doc: update command-line-switches.md

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
Robo 2024-11-15 23:31:33 +09:00 committed by GitHub
parent 27fe6cc97f
commit 4fb5aab2ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 170 additions and 10 deletions

View file

@ -78,6 +78,11 @@ dialog.showOpenDialogSync(mainWindow, {
})
```
**Note:** On Linux `defaultPath` is not supported when using portal file chooser
dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
[command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
to force gtk or kde dialogs.
### `dialog.showOpenDialog([window, ]options)`
* `window` [BaseWindow](base-window.md) (optional)
@ -150,6 +155,11 @@ dialog.showOpenDialog(mainWindow, {
})
```
**Note:** On Linux `defaultPath` is not supported when using portal file chooser
dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
[command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
to force gtk or kde dialogs.
### `dialog.showSaveDialogSync([window, ]options)`
* `window` [BaseWindow](base-window.md) (optional)