Merge pull request #1908 from curlymorphic/pathDialog

Re organizing of the user LMMS directory
This commit is contained in:
Tres Finocchiaro
2015-04-13 21:21:05 +00:00
7 changed files with 234 additions and 59 deletions

View File

@@ -67,6 +67,8 @@ ConfigManager::ConfigManager() :
#endif
m_vstDir( m_workingDir + "vst" + QDir::separator() ),
m_flDir( QDir::home().absolutePath() ),
m_gigDir( m_workingDir + GIG_PATH ),
m_sf2Dir( m_workingDir + SF2_PATH ),
m_version( defaultVersion() )
{
}
@@ -179,6 +181,16 @@ void ConfigManager::setBackgroundArtwork( const QString & _ba )
#endif
}
void ConfigManager::setGIGDir(const QString &gd)
{
m_gigDir = gd;
}
void ConfigManager::setSF2Dir(const QString &sfd)
{
m_sf2Dir = sfd;
}
@@ -339,6 +351,9 @@ void ConfigManager::loadConfigFile()
}
}
setWorkingDir( value( "paths", "workingdir" ) );
setGIGDir( value( "paths", "gigdir" ) == "" ? gigDir() : value( "paths", "gigdir" ) );
setSF2Dir( value( "paths", "sf2dir" ) == "" ? sf2Dir() : value( "paths", "sf2dir" ) );
setVSTDir( value( "paths", "vstdir" ) );
setFLDir( value( "paths", "fldir" ) );
setLADSPADir( value( "paths", "laddir" ) );
@@ -369,7 +384,7 @@ void ConfigManager::loadConfigFile()
m_vstDir = windowsConfigPath( CSIDL_PROGRAM_FILES ) +
QDir::separator() + "VstPlugins";
#else
m_vstDir = ensureTrailingSlash( QDir::home().absolutePath() );
m_vstDir = m_workingDir + "plugins/vst" + QDir::separator();
#endif
}
@@ -388,6 +403,7 @@ void ConfigManager::loadConfigFile()
#else
m_ladDir = qApp->applicationDirPath() + '/' + LIB_DIR + "/ladspa/";
#endif
m_ladDir += ","+userLadspaDir();
}
#ifdef LMMS_HAVE_STK
@@ -426,6 +442,11 @@ void ConfigManager::loadConfigFile()
QDir().mkpath( userTemplateDir() );
QDir().mkpath( userSamplesDir() );
QDir().mkpath( userPresetsDir() );
QDir().mkpath( userGigDir() );
QDir().mkpath( userSf2Dir() );
QDir().mkpath( userVstDir() );
QDir().mkpath( userLadspaDir() );
}
upgrade();
@@ -440,6 +461,8 @@ void ConfigManager::saveConfigFile()
setValue( "paths", "workingdir", m_workingDir );
setValue( "paths", "vstdir", m_vstDir );
setValue( "paths", "fldir", m_flDir );
setValue( "paths", "gigdir", m_gigDir );
setValue( "paths", "sf2dir", m_sf2Dir );
setValue( "paths", "laddir", m_ladDir );
#ifdef LMMS_HAVE_STK
setValue( "paths", "stkdir", m_stkDir );