linebender / linebender/druid

Implement file dialog default extension in mac & gtk

Open
#390 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted shell/gtk shell/mac
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

The `FileDialogOptions` struct has a field `default_type: Option` that specifies which of the types in `allowed_types: Option>` is the default. If no `default_type` is specified or if `default_type` isn't actually among `allowed_types` then the first entry of `allowed_types` is the default.

PR #387 implemented it for Windows. In Windows `allowed_types` translate into a dropdown control in the file picker dialog and `default_type` determines which item in that dropdown is preselected.

This behavior needs to also be implemented in the `mac` and `gtk` platform code. If this behavior can't be implemented or doesn't make sense on the platform, then comments describing that are definitely welcome.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing PR #387 for the Windows implementation, then locate the mac and GTK platform code handling FileDialogOptions. Implement or document the behavior for default_type and allowed_types on each platform, and verify that the selected default matches the specified or first allowed type.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.