Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
- GTK: Support file filters in open/save dialogs. ([#903] by [@jneem])
- X11: Support key and mouse button state. ([#920] by [@jneem])
- Routing `LifeCycle::FocusChanged` to descendant widgets. ([#925] by [@yrns])
- Built-in open and save menu items now show the correct label and submit the right commands. ([#930] by [@finnerale])

### Visual

Expand Down Expand Up @@ -171,6 +172,7 @@ While some features like the clipboard, menus or file dialogs are not yet availa
[#924]: https://github.com/xi-editor/druid/pull/924
[#925]: https://github.com/xi-editor/druid/pull/925
[#928]: https://github.com/xi-editor/druid/pull/928
[#930]: https://github.com/xi-editor/druid/pull/930

## [0.5.0] - 2020-04-01

Expand Down
16 changes: 9 additions & 7 deletions druid/src/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,8 @@ pub mod sys {
.append(new())
.append(open())
.append(close())
.append(save().disabled())
.append(save_as().disabled())
.append(save_ellipsis())
.append(save_as())
// revert to saved?
.append(print().disabled())
.append(page_setup().disabled())
Expand Down Expand Up @@ -563,11 +563,13 @@ pub mod sys {
.hotkey(RawMods::Ctrl, "s")
}

/// The 'Save' menu item.
/// The 'Save...' menu item.
///
/// This is used if we need to show a dialog to select save location.
pub fn save_ellipsis<T: Data>() -> MenuItem<T> {
MenuItem::new(
LocalizedString::new("common-menu-file-save"),
commands::SAVE_FILE,
LocalizedString::new("common-menu-file-save-ellipsis"),
commands::SHOW_SAVE_PANEL,
)
.hotkey(RawMods::Ctrl, "s")
}
Expand Down Expand Up @@ -742,7 +744,7 @@ pub mod sys {
pub fn open_file<T: Data>() -> MenuItem<T> {
MenuItem::new(
LocalizedString::new("common-menu-file-open"),
commands::OPEN_FILE,
commands::SHOW_OPEN_PANEL,
)
.hotkey(RawMods::Meta, "o")
}
Expand Down Expand Up @@ -771,7 +773,7 @@ pub mod sys {
pub fn save_ellipsis<T: Data>() -> MenuItem<T> {
MenuItem::new(
LocalizedString::new("common-menu-file-save-ellipsis"),
commands::SAVE_FILE,
commands::SHOW_SAVE_PANEL,
)
.hotkey(RawMods::Meta, "s")
}
Expand Down