linebender/druid

Implement file dialog default extension in mac & gtk

開放

#390 建立於 2019年12月12日

 (0 則留言) (0 個反應) (0 位負責人)Rust (567 個分叉)batch import
help wantedshell/gtkshell/mac

倉庫指標

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

描述

The FileDialogOptions struct has a field default_type: Option<FileSpec> that specifies which of the types in allowed_types: Option<Vec<FileSpec>> 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.

貢獻者指南