-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct built-in open and save menu items. #930
Conversation
druid/src/menu.rs
Outdated
@@ -566,8 +566,8 @@ pub mod sys { | |||
/// The 'Save' menu item. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment here for Windows. Just take the macOS comment I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I knew I would forget something when splitting things up 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Just for the historical record: a lot of this menu stuff is specifically motivated by my wanting, on the mac, to mimic the look and behaviour of Cocoa apps. In particular this means that if you are an app that manages documents, and you have a new unsaved document, the "save" menu item is titled "Save..." and will bring up the save panel; that is it behaves like "save as". If you've already saved the document, it is titled "Save", does not bring up the dialog, and just saves it at its existing location. In Cocoa menus, any menu item that will ask for additional options has a trailing ellipsis; menu items that work without further input do not. So I'm not totally sure if this makes sense on windows or elsewhere, or not? |
@cmyr We had a rather long Zulip discussion (linked in the PR comment) where we discovered that basically all platforms recommend doing this, it's just that they do not adhere to their own guidelines. |
The Windows and Gnome/KDE docs recommend that exact same approach. In practice nobody follows it. That said, I think it's fine (and simplifies things) if we just recommend the "Save..." -> "Save" situation (like it works on macOS) on all platforms. |
One thing I'd like to do in the future is to rework menus to work more like widgets; that is they can be computed based on the data, and updated automatically. In this world if we can just have some way to check that a document has a path, we can do this automatically. |
Second part of #908 .
Based on the Zulip discussion here.
On Windows / Linux:
save_ellipsis
now actually displays an ellipsis.On mac:
open_file
shows the dialog instead of submitting an invalidOPEN_FILE
command.All:
save_ellipsis
shows the dialog and thus behaves likesave_as
instead ofsave
.