It's difficult to tell whether this is a bug or expected behavior, but it can lead to confusion:
Steps to reproduce:
- Open rosegarden
- Save session as fileInMind.rg
- Close RG and relaunch
- Hit CTRL-R to open the last file in mind, and it should of course be the fileInMind.rg session
- Now use File/Import/Import XML File... to import any MusicXML file e.g. anyMusicXML.xml
- As an aside, the wording does make it look like anyMusicXML.xml is to be imported into fileInMind.rg session, but historically that is not actually true. A new session (a new something...see later) called anyMusicXML.xml is created based on the imported MusicXML as named in the window title bar
- Quit RG without saving that session i.e. basically abort
- Launch RG
- Hit CTRL-R to open the last file in mind, and surprisingly it's anyMusicXML.xml, which was not saved. In fact, it opens as edited and still not saved.
- Check File/Open Recent and sure enough anyMusicXML.xml (with that extension, not an rg extension) has taken top place above fileInMind.rg as the most recent session (?)
- In addition, it has an edit status indicating that it needs to be saved, which shows up as an option to do so even quitting immediately
Strictly speaking, anyMusicXML.xml was indeed the last file visited, but only to import that XML into an RG session or more correctly as an RG session...a session which ultimately was never saved above?
In addition, if you actually use RG's File/Open to navigate to the anyMusicXML.xml shown in the Recent list, at least in my case, the file manager automatically has All supported files selected, and anyMusicXML.xml file does not show up...presumably because it's not an RG session. True, I could change the drop down to All files, see anyMusicXML.xml and open it. At that point, I get the behavior observed above i.e. RG claims something has been modified and supposedly expects it to be saved.
I believe the confusion stems from the following:
- RG, by default, opens and saves sessions which have an rg extension
- When an XML is imported, it is converted to an RG session, which when saved will have an rg extension by default.
- But the Recent list shows an entry with an xml extension
- I don't think an xml extension (by default) makes sense in the Recent list?
- In addition, only when saved should it show up in the Recent list using an rg extension
This is probably the best time to mention that it might be nice to have a Clear (or Edit) Recent list. These unwanted entries will quickly work their way off the list, but there have been times where I've looked at a file on a different path, but with a similar basename, and then both are in the list...the one I am focused on and the other e.g. a backup, that I don't want to visit by accident. Hence, removing that entry or clearing the list would be a useful option from the GUI, although I can do this from the command line. I guess that's a new feature though?
Using import (but not merge) (xml or midi) the file is entered into the recent file list and the composition is considered unsaved - ie. not saved in rg format.
I believe this is intentional and seems to make sense for me.
It seems to me an editor for the recent file list is unnecessary - I know of no program that offers this feature.
A clear for the recent files menu is fairly straightforward.
Yes it is a feature request - but I have implemented it - see Codeberg pull request.
Last edit: Ted Felix 44 minutes ago
Just to be certain, I meant it opens as unsaved after first closing the file without saving, then reopening it e.g. with CTRL-R. I think you can even close RG and relaunch it and select that file in the Recent List and the asterisk for unsaved is automatically seen and then attempting to close it at that point prompts for a save, when the user obviously has not changed anything on that second opening. Do you see that behavior? And if so, is that what you mean makes sense?
Also confirm that you also mean that the file should automatically have the extension in the Recent list (I didn't put it there), even though once opened it looks nothing like an XML, but looks instead like an RG session.
Gimp does. I'm certain you know of gimp :-) It has both a clear list and allows direct editing of the list. I use the latter all the time so that their version of CTRL-R doesn't restore some temporary session which happens to be on the top of the list. However, I will probably never use it in RG, so I won't be beating down the door for that function. Clear list is always handy, and will be valuable for previously visited sessions which I don't want to visit in error e.g. backups.
Rosegarden warns if the file is not saved as a .rg file so even if no changes are made Rosegarden considers the file unsaved.
Maybe we need someone else to vote on whether this is a bug or not !
The Recent File Menu shows the complete file name including extnesion so you can see the file type there (.rg .xml or .mid)
A recent file editor (yes gimp has one) is certainly a new feature.
Diff:
I'd say this is working as designed. Imports are treated like .rg files WRT the MRU (recent) list. When you import, the modified flag is set to remind you to save as an .rg file. If it annoys you, perhaps we can add an option to not put imports in the MRU list?