Page MenuHome

UI: Reports when saving a file
AcceptedPublic

Authored by Yevgeny Makarov (jenkm) on Feb 5 2020, 2:05 PM.

Details

Summary

UI: Reports when saving a file.

Now the behaviors are consistent for blend, image and text files:

  • If the file is not writable, will report it.
  • If the file is new (without a path), save as will be used.
  • If the file was deleted, will try to recreate it.

Diff Detail

Repository
rB Blender

Event Timeline

This seems fine but I need to test it still.

source/blender/editors/space_image/image_ops.c
2273

Either remove this code, or leave a comment about why it is disabled.

Yevgeny Makarov (jenkm) marked an inline comment as done.

Dim the "Save" menu item if the file is not dirty or goes to "Save As", for some cases which are easy to check.

Brecht Van Lommel (brecht) requested changes to this revision.Feb 10 2020, 3:15 PM

Dim the "Save" menu item if the file is not dirty or goes to "Save As", for some cases which are easy to check.

I don't see this in other applications, is that really a common convention?

To me it seems mostly inconvenient, I think Save in the menu and Ctrl + S should do exactly the same thing.

This revision now requires changes to proceed.Feb 10 2020, 3:15 PM

@Brecht Van Lommel (brecht) then just check the previous diff: https://developer.blender.org/D6755?id=21526

However, the "Save" in the menu and Ctrl + S do the same thing. The "Save" menu item just not set to active in .py to show the user that the file has already been saved (not dirty), for example. I think this is a common practice.


By the way, it is not very clear what the active and enabled options are for. The API docs says for enabled: "When false, this (sub)layout is grayed out", but it seems this way active works.

layout.active = False will gray out buttons inside a layout.
layout.enabled = False will gray out and completely disable the buttons inside a layout.

This revision is now accepted and ready to land.Mon, Mar 9, 5:24 PM

Update to reflect current state of master (in image_ops.c > image_save_exec).

Fix capitalization "Saved Image %s" > "Saved image %s".