Open sharmanr opened 1 year ago
I think that would be a Good Thing to have.
We currently have such a dialog for unsaved playlists (with the standard Mac OS UI for such dialog boxes, I think). It's in maybeSave() in mainwindow.cpp L2874. There are Save, Discard, and Cancel buttons.
Note that there is an explicit way to back out of cuesheet changes: Lyrics > Revert Edits, which I do remember to use sometimes (note that I do NOT remember that choosing a different song will discard edits, too, so I think that argues that your proposal for a dialog box is in fact needed.)
Given all that, I am kinda leaning to something like the existing "playlist has been modified" dialog, but for lyrics, and with Save and Discard buttons (maybe a Cancel button too?). Seems like a good idea, and would save some accidentally-thrown-away work otherwise.
I'm still trying to pay the occasional attention and get the Linux port working, but I would also be super happy with some sort of auto-save mechanism and versioning mechanism. Do away with "save" altogether.
In fact, does git ship by default on Mac? Maybe do a VMS style ;
@danlyke I believe that MacOS has a built in versioning mechanism. I've never used it, because the UX for it is kinda wonky. I'm not sure that Qt supports it either, but at least for MacOS, it might be worthwhile to look at what it does under the covers.
Personally I don't think version control for lyrics would be very useful. How often would one want to go back to an older version, and if so how would one find which one? I think the "save as" is very handy because I'll often add to the title extra stuff, such as the level or a featured call. For example
AA-123 - hello.html
AA-123 - hello,ferris.html
AA-123 - hello,plus.html
and SquareDesk allows choosing which one (and nicely defaults to the last one selected!).
Oh hey, I just had a couple of ideas on this, so I looked it up!
Version history is provided as a feature by all the major cloud storage providers: Box.net, Dropbox, iCloud, and Google Drive. So, there is apparently an easy solution for version control, plus you would get automatic offsite backup for your music files (I am super paranoid about losing MP3 files, and I have a ton of them now...). I don't know whether these are all available for Linux.
I also backup on Mac using Time Machine, which automatically keeps older versions of all files. The "MacOS built-in versioning mechanism" I mentioned above is only present in apps that support "File > Revert To...". I can see that .txt have a File > Revert To option when opened in TextEdit, and when browsing versions it clearly tells me that these are Time Machine versions. So, if you use Time Machine on the Lyrics folder, you'll automatically get versioning accessible through Time Machine. To get versioning via File > Revert to... on MacOS would require some work on our part. This would not solve your problem on Linux though, so I'm just documenting this issue here.
If you edit lyrics but don't click "Save" or "Save As..." and then switch to a different song or exit the program, the changes are lost.
Could there be a warning? Perhaps a popup "Lyrics are not saved, save or discard?" with two buttons; the "save" would take you back to the lyrics editor (instead of switching songs or exiting), the other choice would just proceed as normal.
(The alternative of always saving when exiting the lyrics page would not allow cancelling an undesired or unintentional change; it would require a third "Cancel Changes"button after the Save or Save As.)