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

Prompting the user to Save As after autosave file is restored #414

Closed
davelab6 opened this issue Mar 11, 2013 · 4 comments
Closed

Prompting the user to Save As after autosave file is restored #414

davelab6 opened this issue Mar 11, 2013 · 4 comments
Assignees
Labels

Comments

@davelab6
Copy link
Member

When FontForge has made an autosave (placing a file in ~/.FontForge/autosave/Family-Style.asfd) and then crashes, it will ask the user to restore the autosave version. After loading the ASFD file, FontForge will then delete the file from the filesystem and allow the user to edit the file that is loaded in memory. If the user doesn't save it, and it crashes again before FontForge makes another autosave, then the user will TOTALLY lose their work. This is obviously bad news.

Instead, after loading the ASFD file, FontForge should pop up a notification dialog confirming the file has been recovered and telling the user to save it as a new file - in Native Scripting, it would be PostNotice("Your file has been recovered.\nYou must now Save your file to continue working on it.") - and when the user presses OK, the Save As dialog should appear - same as File menu, Save As

@monkeyiq
Copy link
Contributor

#423

@davelab6
Copy link
Member Author

@monkeyiq seems like this funcitonality needs to be located in GUI code, not in autosave.c itself, so I'm reopening this issue until building non-gui FF works again

@monkeyiq
Copy link
Contributor

#575

@monkeyiq
Copy link
Contributor

I made that part that was offending in autosave conditional upon having a GUI. If we are without-x then we are likely to also be in a scripted run, so can't really halt and ask the user/script to save the font file (breaks existing scripts).

blipvert pushed a commit to blipvert/fontforge that referenced this issue Dec 12, 2013
This fixes the issue fontforge#414
by only prompting the user to save the font file if we have a GUI. If
it is on the command line only then we don't want to halt there and ask
the user because it might well be a script and not expecting this new prompt.

Ohter FD monitoring stuff is also handled without x. Note that the
background timers do not function without an X server around.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants