From: Steven Yi <stevenyi@gm...> - 2007-12-23 15:09:39
This has been requested a few times over the years but it's actually
not such a simple thing to do. I'd have to go in to every edit action
in the codebase and add code to increment a "dirty" counter if an edit
happens and used a decrement if an edit is undone. I'd have to also
make sure this is working with batched edits (i.e. undoing a text edit
that undoes a number of character inserts). Ideally, all edits would
be encapsulated and added to a project-wide undo stack but that isn't
implemented and not a small task.
I've largely just accepted that saying "No" to save a project, while
perhaps tedious, is not nearly as bad as for me to have to go in to
modify all of blue to support detecting whether to show the save
dialog or not. I'm not getting that much composition time as it is,
and am splitting my programming time between blue and csound these
days as well have a few writing projects, so this is not very pressing
for me to spend time on.
Feel free to add the feature request to the blue tracker. I may not
be able to implement this any time soon, but maybe someone else might
want to go and implement it (which would be nice!), and at least the
request would be in the system and trackable.
On Dec 20, 2007 5:57 PM, Atte Andr=E9 Jensen <atte.jensen@...> wrote:
> Is it possible to only show the "Save project?" dialog if the project
> has been modified since last save?
> peace, love & harmony
> http://atte.dk | http://myspace.com/attejensen
> http://anagrammer.dk | http://modlys.dk
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> Bluemusic-users mailing list
Steven Yi wrote:
> Hi Atte,
> This has been requested a few times over the years but it's actually
> not such a simple thing to do.
Sorry for not replying to this earlier, and sorry for going into an old
I don't know how you generate the .blue file to be saved, but a simple
solution would be this: When the user exits, blue generates (in ram) the
file that should be saved. Then a simple diff between this in-ram
version of the project and the one on disc can tell if saving is needed
or not. If no difference is found, it's safe just to exit, if there's a
difference, the current dialog ("Do you want to save the project")
should be shown.
Depending on how long it takes to generate that in-ram blue file, the
exit is made longer in case there's no need to save (if it should be
saved this time would be spend anyhow), but IMHO that's better than
being presented with the dialog, even if nothings changed...
peace, love & harmony
http://atte.dk | http://myspace.com/attejensenhttp://anagrammer.dk | http://modlys.dk