-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Some fixes to recent files #3621
Conversation
Works fine. Clears the action up good. Some more testing and I'll merge this later. |
Seem to be fixed for when you create project from a template but not when the project is the |
No. It works if you save a project as default project. @tresf Should there be a default.mpt in the factory templates? |
It certainly sounds more logical than a hard-coded project. |
Works like a charm! |
I believe this also takes care of issue #528 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this, works like a charm, can confirm it fixes #528 too
src/core/ConfigManager.cpp
Outdated
@@ -282,7 +282,8 @@ void ConfigManager::addRecentlyOpenedProject( const QString & file ) | |||
{ | |||
QFileInfo recentFile( file ); | |||
if( recentFile.suffix().toLower() == "mmp" || | |||
recentFile.suffix().toLower() == "mmpz" ) | |||
recentFile.suffix().toLower() == "mmpz" || | |||
recentFile.suffix().toLower() == "mpt" ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could remove the one tab of indentation here so these two lines are at the same level
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
src/core/main.cpp
Outdated
@@ -846,13 +846,15 @@ int main( int argc, char * * argv ) | |||
else if( ConfigManager::inst()-> | |||
value( "app", "openlastproject" ).toInt() && | |||
!ConfigManager::inst()-> | |||
recentlyOpenedProjects().isEmpty() ) | |||
recentlyOpenedProjects().isEmpty() && | |||
!recoveryFilePresent ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here you could add another tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added even more for a casual look. Bohemic chic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, it'll maybe look weird in some editors that don't have the same spaces for tabs like github does, don't you think?
data/projects/templates/default.mpt
Outdated
@@ -0,0 +1,89 @@ | |||
<?xml version="1.0"?> | |||
<!DOCTYPE lmms-project> | |||
<lmms-project version="1.0" creator="LMMS" creatorversion="1.2.0-rc3.15" type="song"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder what we should do with the creator version, this way we'd need to update it for every version, otherwise the users would keep getting the 'Project version mismatch' tool tip on each new project, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the creatorversion
manually. It could be automated with the --upgrade
command. For another release though...
Interesting point about creator version. A cmake configured |
I thought about suppressing warnings too but we should really keep our own made stuff up to date, making such a sing a bit superfluous. Update the projects for a new release makes most sense to me. |
* Add a factory default data/projects/templates/default.mpt. Fixes LMMS#528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
Cherry-picked and ready for master via 9edaa59. |
* Add a factory default data/projects/templates/default.mpt. Fixes LMMS#528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
* Add a factory default data/projects/templates/default.mpt. Fixes LMMS#528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
* Add a factory default data/projects/templates/default.mpt. Fixes LMMS#528 * On launch, if the last project was a template we create a new project (default.mpt) instead. * If there is a recovery file present and you discard it we create a new project as the project launched could be defective or, if .lmmsrc.xml wasn't written, an earlier project.
The recent file system feels a bit glitchy. If you work with a saved file and then start a new project, or a new project from template that you decide to scratch, the next time you launch LMMS you will get back the previous saved work again. I find this a bit unintuitive as you've done other work in between.
Fixes