Behavior about saving on exit

Dirk Hohndel dirk at hohndel.org
Tue Jul 17 15:30:03 PDT 2012


Pierre-Yves Chibon <pingou at pingoured.fr> writes:

> Hi,
>
> I have started to work on this but I realize it might be better if I ask
> for feedback on the ideas first.
>
> When someone opens a file, change something in it and try to quit, the
> program asked whether the data should be saved.
> If 'Ok' then it shows the save-window and the user can choose to save
> the file or rename it.
> My habits in such case would be that since I opened a specific file, I
> want to save to that specific file, therefore, when I press 'Ok', I want
> it to save automatically to the file I opened.
>
> So I have been working on changes that do:
> - When a file has been opened by the user, save to this same file if the
> user is 'Ok' while closing.
> - Add a 'Cancel' option to the pop-up window that offers to save the
> file while closing (at the moment it offers Yes and No but both keep the
> program closing).
> - Add a  'Save As' entry in the file menu 

All this seems to make sense to me. I had fixing the exit flow on my
todo list for a while.

> This last change might be better off using overloading for the save_file
> function for the case where it is accessed from the menu entry or while
> closing the program. This would keep the current behavior still allowing
> the described closing approach.

Not sure what you mean here. Can you elaborate?

> The beginning of this work is available at:
> http://ambre.pingoured.fr/cgit/subsurface.git
> I already found that there is at least one problem but this being my
> first lines of C++ I'll have to dig/ask to people with more knowledge to
> fix them if the ideas are considered interesting.

I think all this is actually C, not C++ :-)

/D


More information about the subsurface mailing list