fix: revert required portal version for file chooser dialogs (#44681)
* feat: add support for configuring xdg portal version at runtime Co-authored-by: deepak1556 <hop2deep@gmail.com> * doc: update command-line-switches.md Co-authored-by: deepak1556 <hop2deep@gmail.com> * doc: update command-line-switches.md Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robo <hop2deep@gmail.com> * doc: required portal version for defaultPath support Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robo <hop2deep@gmail.com> * doc: update more occurrances Co-authored-by: deepak1556 <hop2deep@gmail.com> * fix: remove warning from save dialogs Co-authored-by: deepak1556 <hop2deep@gmail.com> * doc: update command-line-switches.md Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: Robo <hop2deep@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
parent
900400e442
commit
2ee65f9c10
4 changed files with 170 additions and 10 deletions
|
@ -241,6 +241,13 @@ Force using discrete GPU when there are multiple GPUs available.
|
|||
|
||||
Force using integrated GPU when there are multiple GPUs available.
|
||||
|
||||
### --xdg-portal-required-version=`version`
|
||||
|
||||
Sets the minimum required version of XDG portal implementation to `version`
|
||||
in order to use the portal backend for file dialogs on linux. File dialogs
|
||||
will fallback to using gtk or kde depending on the desktop environment when
|
||||
the required version is unavailable. Current default is set to `3`.
|
||||
|
||||
## Node.js Flags
|
||||
|
||||
Electron supports some of the [CLI flags][node-cli] supported by Node.js.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue