diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d9389aff..e61668d821 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -83,6 +83,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 @@ -173,6 +174,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 [#940]: https://github.com/xi-editor/druid/pull/940 [#942]: https://github.com/xi-editor/druid/pull/942 diff --git a/druid/src/menu.rs b/druid/src/menu.rs index a66922330f..31cac785d1 100644 --- a/druid/src/menu.rs +++ b/druid/src/menu.rs @@ -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()) @@ -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() -> MenuItem { 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") } @@ -742,7 +744,7 @@ pub mod sys { pub fn open_file() -> MenuItem { MenuItem::new( LocalizedString::new("common-menu-file-open"), - commands::OPEN_FILE, + commands::SHOW_OPEN_PANEL, ) .hotkey(RawMods::Meta, "o") } @@ -771,7 +773,7 @@ pub mod sys { pub fn save_ellipsis() -> MenuItem { MenuItem::new( LocalizedString::new("common-menu-file-save-ellipsis"), - commands::SAVE_FILE, + commands::SHOW_SAVE_PANEL, ) .hotkey(RawMods::Meta, "s") }