linebender/druid

Selecting multiple files / directories is not actually implemented.

Open

#1.067 aberto em 29 de jun. de 2020

Ver no GitHub
 (5 comments) (0 reactions) (0 assignees)Rust (567 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (9.091 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador