Skip to content

Start file dialogs on the desktop - #938

Open
kisaraki wants to merge 1 commit into
microsoft:mainfrom
kisaraki:codex/file-dialog-desktop-default
Open

Start file dialogs on the desktop#938
kisaraki wants to merge 1 commit into
microsoft:mainfrom
kisaraki:codex/file-dialog-desktop-default

Conversation

@kisaraki

Copy link
Copy Markdown
Contributor

Summary

  • start Open and first Save As operations on the user's desktop
  • keep Save As beside an already named document
  • retain explicitly supplied command-line directories and file parents
  • use the cross-platform dirs provider instead of platform-specific APIs

Validation

  • cargo test --all-features --all-targets on Windows and WSL/Ubuntu
  • cargo clippy --workspace --all-features --all-targets -- --no-deps --deny warnings on Windows and WSL/Ubuntu

Contribution ownership

This contribution is entirely my own work. It is not created on behalf of, or connected with, any organization or company. I agree to contribute it under the repository's MIT License and to the repository's applicable contribution terms.

@stdmnpkg stdmnpkg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current behavior is consistent with DOS edit, vi, and GNU ed, and desktop is not always exist, no need to change.

@lhecker Leonard Hecker (lhecker) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you picked the Desktop instead of e.g. the Documents directory?

On Windows at least, the default directory for the file picker is the last directory you navigated to for the given primary file type. E.g. if you last opened a .txt file in the Downloads folder, another application will start in the Downloads folder as well. That system is kind of clever.

For simplicity, I think the current CWD system is preferable.

Comment thread crates/edit/Cargo.toml
debug-latency = []

[dependencies]
dirs = "6.0.0"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project avoids dependencies intentionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants