Skip to content
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

Open files as read-only #3811

Closed
dacap opened this issue Apr 12, 2023 · 3 comments
Closed

Open files as read-only #3811

dacap opened this issue Apr 12, 2023 · 3 comments
Assignees
Labels
feature Feature request, or something should be improved persistence Issues about loading or saving files / persisting information on disk ui
Milestone

Comments

@dacap
Copy link
Member

dacap commented Apr 12, 2023

It would be nice to have an option to load files as read-only, or load then as read-only by default when something strange happens in the loading process, mainly when loading .aseprite files, e.g. some unsupported information/chunk inside the file was discarded, so we don't want to overwrite the content by default.

@dacap dacap added feature Feature request, or something should be improved ui persistence Issues about loading or saving files / persisting information on disk labels Apr 12, 2023
@dacap dacap added this to the v1.3-rc3 milestone Apr 12, 2023
@dacap dacap moved this to Todo in Aseprite v1.3.x Apr 12, 2023
@martincapello martincapello self-assigned this Apr 17, 2023
@martincapello
Copy link
Member

What if we just show a warning message as suggested in #3812 and then the loaded file is renamed as <original filename>-incomplete.aseprite for instance, this way the file can still be writable and there is no chance to mistakenly save the file and overwrite its content.

@dacap
Copy link
Member Author

dacap commented Apr 18, 2023

Probably we could rename the file (so it's harder to overwrite the original file) but still load it as read-only (so the user must use File > Save As explicitly or something similar).

Generally I think that saving this file will result in an unexpected result for the user and lost of information, I'm still not sure if we should or not completely disable the save option in this case (the only proper solution to continue for the user is updating Aseprite to the latest version, that is the most important part of the message in #3812, that the latest version of Aseprite must be used to edit the file without losing information).

martincapello added a commit to martincapello/aseprite that referenced this issue Apr 25, 2023
@martincapello martincapello moved this from Todo to In Progress in Aseprite v1.3.x Apr 25, 2023
@martincapello martincapello moved this from In Progress to Done in Aseprite v1.3.x Apr 25, 2023
@martincapello martincapello moved this from Done to In Progress in Aseprite v1.3.x Apr 25, 2023
martincapello added a commit to martincapello/aseprite that referenced this issue Apr 25, 2023
martincapello added a commit to martincapello/aseprite that referenced this issue Apr 25, 2023
@martincapello martincapello moved this from In Progress to Done in Aseprite v1.3.x Apr 25, 2023
@martincapello martincapello moved this from Done to In Progress in Aseprite v1.3.x May 3, 2023
martincapello added a commit to martincapello/aseprite that referenced this issue May 4, 2023
@martincapello martincapello moved this from In Progress to Done in Aseprite v1.3.x May 4, 2023
@dacap dacap self-assigned this May 11, 2023
@dacap
Copy link
Member Author

dacap commented May 11, 2023

Along with #3829 I'll include some changes, mainly to centralize the read-only/warning dialog to something like this:

image

The "Update Aseprite" link just goes to https://www.aseprite.org/faq/#update

@dacap dacap closed this as completed in 3f581a5 May 11, 2023
dacap added a commit that referenced this issue May 11, 2023
…bility (#3811, #3812)

Several changes were included:
- Fixes in TextBox widget to show it with proper size hint when it's
  outside a viewport
- Added the IncompatFileWindow with a message + link to know how to
  update Aseprite and solve the situation
- Moved CannotModifyWhenReadOnlyException from app/doc.h to
  app/transaction.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request, or something should be improved persistence Issues about loading or saving files / persisting information on disk ui
Projects
Archived in project
2 participants