add ability to pass appid through to file dialogs (#1042)
* dialog: add new Dialog::create() method with new DialogSettings struct to allow passing app_id from portal; deprecating Dialog::new() * dialog: remove deprecation, move to builder pattern, add path_opt and kind options to DialogSettings * dialog: instances of -> DialogSettings to -> Self
This commit is contained in:
parent
d74576e446
commit
aba90279e6
2 changed files with 48 additions and 10 deletions
|
|
@ -66,6 +66,7 @@ use trash::TrashItem;
|
|||
#[cfg(all(feature = "wayland", feature = "desktop-applet"))]
|
||||
use wayland_client::{protocol::wl_output::WlOutput, Proxy};
|
||||
|
||||
use crate::dialog::DialogSettings;
|
||||
use crate::{
|
||||
clipboard::{ClipboardCopy, ClipboardKind, ClipboardPaste},
|
||||
config::{
|
||||
|
|
@ -2562,8 +2563,9 @@ impl Application for App {
|
|||
.map(|parent| parent.to_path_buf())
|
||||
{
|
||||
let (mut dialog, dialog_task) = Dialog::new(
|
||||
DialogKind::OpenFolder,
|
||||
Some(destination),
|
||||
DialogSettings::new()
|
||||
.kind(DialogKind::OpenFolder)
|
||||
.path(destination),
|
||||
Message::FileDialogMessage,
|
||||
Message::ExtractToResult,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue