linebender/druid

Selecting multiple files / directories is not actually implemented.

開放

#1,067 建立於 2020年6月29日

 (5 則留言) (0 個反應) (0 位負責人)Rust (567 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (9,091 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

A bug I ran into just now:

I currently have:

    let dialog_options = FileDialogOptions::new()
        .select_directories()
        .multi_selection();

    let window = WindowDesc::new(build_schauglas)
        .menu(MenuDesc::new(LocalizedString::new("menubar")).append(
            MenuDesc::new(LocalizedString::new("file").with_placeholder("File")).append(
                MenuItem::new(
                    LocalizedString::new("open").with_placeholder("Open"),
                    Command::new(SHOW_OPEN_PANEL, dialog_options),
                ),
            ),
        ));

And in my delegate, I am simply printing out whatever command gets in:

      -> bool {
        debug!("Cmd: {:?}", cmd);
        if let Some(file_info) = cmd.get(OPEN_FILE) {
            return true;
        }

        false
    }

this gives me the following outputs:

  • When selecting a single directory: Cmd: Command { symbol: "druid-builtin.open-file-path", payload: Any }
  • When selecting multiple:

Info:

  • Windows 10
  • Druid 0.6

貢獻者指南