summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrcan Ogetbil <oget.fedora@gmail.com>2010-12-21 09:29:00 +0000
committerOrcan Ogetbil <oget.fedora@gmail.com>2010-12-21 09:29:00 +0000
commit90cfa63b4fb1b52ed15027441c6a979a830d8ca3 (patch)
treeb44ee81311c34c6582d4f7f79546a419e4969b23
parente15d47a854b5a2786968fd8a783abc6a16d945d3 (diff)
Moved user config paths. Please see the ChangeLog.
-rw-r--r--muse2/ChangeLog7
-rw-r--r--muse2/muse/app.cpp10
-rw-r--r--muse2/muse/globals.cpp5
-rw-r--r--muse2/muse/globals.h1
-rw-r--r--muse2/muse/main.cpp6
-rw-r--r--muse2/muse/song.cpp9
-rw-r--r--muse2/muse/widgets/gensetbase.ui2
-rw-r--r--muse2/synti/deicsonze/deicsonze.cpp2
-rw-r--r--muse2/synti/deicsonze/deicsonzegui.cpp2
-rw-r--r--muse2/synti/simpledrums2/ssplugin.cpp2
-rw-r--r--muse2/synti/vam/vamgui.cpp7
11 files changed, 33 insertions, 20 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index c12cbfb4..a9f66242 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,10 @@
+21.12.2010:
+ - Moved all the config files "~/.musePrj, ~/.MusE, ~/.deicsonze.dco" into ~/.config/MusE/
+ and renamed them as "projects, MusE.cfg, deicsonze.dco", respectively. (Orcan)
+ TODO: user instruments path will be made user configurable with default location in
+ ~/.config/MusE/
+ - In simpledrums2, set the 64bit ladpsa plugin paths. (Orcan)
+ - Fix: gensetbase was opening in the last tab instead of the first. (Orcan)
20.12.2010:
- Fixed arranger grid h-line drawing, track, and part drawing alignment, border issues. (Tim)
- To open help pages, use the default browser of the system via QDeskopServices. Removed
diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp
index ecee0f71..d53ed033 100644
--- a/muse2/muse/app.cpp
+++ b/muse2/muse/app.cpp
@@ -789,7 +789,7 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
//routingPopupView = 0;
appName = QString("MusE");
-
+ setWindowTitle(appName);
editSignalMapper = new QSignalMapper(this);
midiPluginSignalMapper = new QSignalMapper(this);
followSignalMapper = new QSignalMapper(this);
@@ -1475,8 +1475,8 @@ MusE::MusE(int argc, char** argv) : QMainWindow()
// read list of "Recent Projects"
//---------------------------------------------------
- QString prjPath(getenv("HOME"));
- prjPath += QString("/.musePrj");
+ QString prjPath(configPath);
+ prjPath += QString("/projects");
FILE* f = fopen(prjPath.toLatin1().constData(), "r");
if (f == 0) {
perror("open projectfile");
@@ -2021,8 +2021,8 @@ void MusE::closeEvent(QCloseEvent* event)
}
// save "Open Recent" list
- QString prjPath(getenv("HOME"));
- prjPath += "/.musePrj";
+ QString prjPath(configPath);
+ prjPath += "/projects";
FILE* f = fopen(prjPath.toLatin1().constData(), "w");
if (f) {
for (int i = 0; i < PROJECT_LIST_LEN; ++i) {
diff --git a/muse2/muse/globals.cpp b/muse2/muse/globals.cpp
index 93cc834a..f53846f9 100644
--- a/muse2/muse/globals.cpp
+++ b/muse2/muse/globals.cpp
@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <QActionGroup>
+#include <QDir>
+#include <QFileInfo>
#include "globals.h"
#include "config.h"
@@ -75,7 +77,8 @@ QString museGlobalShare;
QString museUser;
QString museProject;
QString museProjectInitPath("./");
-QString configName;
+QString configName = QString(getenv("HOME")) + QString("/.config/MusE/MusE.cfg");
+QString configPath = QFileInfo(configName).absoluteDir().absolutePath();
QString museInstruments;
QString museUserInstruments;
diff --git a/muse2/muse/globals.h b/muse2/muse/globals.h
index 5cad778e..cb4da0c5 100644
--- a/muse2/muse/globals.h
+++ b/muse2/muse/globals.h
@@ -48,6 +48,7 @@ extern QString museUser;
extern QString museProject;
extern QString museProjectInitPath;
extern QString configName;
+extern QString configPath;
extern QString museInstruments;
extern QString museUserInstruments;
diff --git a/muse2/muse/main.cpp b/muse2/muse/main.cpp
index 76917aec..8a0b5cec 100644
--- a/muse2/muse/main.cpp
+++ b/muse2/muse/main.cpp
@@ -255,7 +255,11 @@ int main(int argc, char* argv[])
//museGlobalShare = museGlobal + QString("/") + QString(SHAREINSTPREFIX);
}
museProject = museProjectInitPath; //getcwd(0, 0);
- configName = QString(getenv("HOME")) + QString("/.MusE");
+
+ // Create config dir if it doesn't exists
+ QDir cPath = QDir(configPath);
+ if (! cPath.exists())
+ cPath.mkpath(".");
museInstruments = museGlobalShare + QString("/instruments");
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index 329cdd97..e0268577 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -3719,17 +3719,14 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo
}
-#define USERSCRIPTSSUFFIX "/.muse/scripts/"
void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver)
{
//
// List scripts
//
QString distScripts = QString(SHAREDIR) + "/scripts";
- QString home = "";
- if (getenv("HOME") != NULL)
- home = QString(getenv("HOME"));
- QString userScripts = home + QString(USERSCRIPTSSUFFIX);
+
+ QString userScripts = configPath + "/scripts";
QFileInfo distScriptsFi(distScripts);
if (distScriptsFi.isDir()) {
@@ -3786,7 +3783,7 @@ QString Song::getScriptPath(int id, bool isdelivered)
return path;
}
- QString path = QString(getenv("HOME")) + USERSCRIPTSSUFFIX + userScriptNames[id - deliveredScriptNames.size()];
+ QString path = configPath + "/scripts/" + userScriptNames[id - deliveredScriptNames.size()];
return path;
}
diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui
index 6e5bfec8..9885f97f 100644
--- a/muse2/muse/widgets/gensetbase.ui
+++ b/muse2/muse/widgets/gensetbase.ui
@@ -29,7 +29,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
- <number>3</number>
+ <number>0</number>
</property>
<widget class="QWidget" name="TabPage">
<attribute name="title">
diff --git a/muse2/synti/deicsonze/deicsonze.cpp b/muse2/synti/deicsonze/deicsonze.cpp
index 049daeed..0168432a 100644
--- a/muse2/synti/deicsonze/deicsonze.cpp
+++ b/muse2/synti/deicsonze/deicsonze.cpp
@@ -166,7 +166,7 @@ DeicsOnze::DeicsOnze() : Mess(2) {
//Load configuration
QString defaultConf =
- (QString(getenv("HOME")) + QString("/." DEICSONZESTR ".dco"));
+ (configPath + QString("/" DEICSONZESTR ".dco"));
FILE* f;
f = fopen(defaultConf.toAscii().data(), "r");
if(f) {
diff --git a/muse2/synti/deicsonze/deicsonzegui.cpp b/muse2/synti/deicsonze/deicsonzegui.cpp
index 84cf4d22..58fbb903 100644
--- a/muse2/synti/deicsonze/deicsonzegui.cpp
+++ b/muse2/synti/deicsonze/deicsonzegui.cpp
@@ -553,7 +553,7 @@ void DeicsOnzeGui::saveConfiguration() {
// saveDefaultConfiguration
//-----------------------------------------------------------
void DeicsOnzeGui::saveDefaultConfiguration() {
- QString filename = QString(getenv("HOME")) + QString("/." DEICSONZESTR ".dco");
+ QString filename = configPath + QString("/" DEICSONZESTR ".dco");
if(!filename.isEmpty()) {
QFile f(filename);
f.open(QIODevice::WriteOnly);
diff --git a/muse2/synti/simpledrums2/ssplugin.cpp b/muse2/synti/simpledrums2/ssplugin.cpp
index 2d8382e6..9d32b2c3 100644
--- a/muse2/synti/simpledrums2/ssplugin.cpp
+++ b/muse2/synti/simpledrums2/ssplugin.cpp
@@ -97,7 +97,7 @@ void SS_initPlugins()
const char* ladspaPath = getenv("LADSPA_PATH");
if (ladspaPath == 0)
- ladspaPath = "/usr/lib/ladspa:/usr/local/lib/ladspa";
+ ladspaPath = "/usr/lib/ladspa:/usr/local/lib/ladspa:/usr/lib64/ladspa:/usr/local/lib64/ladspa";
const char* p = ladspaPath;
while (*p != '\0') {
diff --git a/muse2/synti/vam/vamgui.cpp b/muse2/synti/vam/vamgui.cpp
index ab7c3ddb..50b6552c 100644
--- a/muse2/synti/vam/vamgui.cpp
+++ b/muse2/synti/vam/vamgui.cpp
@@ -43,6 +43,7 @@
#include <QSlider>
#include <QSocketNotifier>
+#include "muse/globals.h"
#include "muse/xml.h"
#include "muse/midi.h"
#include "muse/midictrl.h"
@@ -559,7 +560,7 @@ void VAMGui::loadPresetsPressed()
{
#if 1 // TODO
QString iname;
- QString s(getenv("HOME"));
+ QString s(configPath);
/* QString filename = QFileDialog::getOpenFileName(lastdir, QString("*.[Ss][Ff]2"),
this,
@@ -674,7 +675,7 @@ void VAMGui::doSavePresets(const QString& fn, bool showWarning)
void VAMGui::savePresetsPressed()
{
#if 1 // TODO
- QString s(getenv("MUSE"));
+ QString s(configPath);
QString fn = QFileDialog::getSaveFileName(this, tr("MusE: Save VAM Presets"),
s, "Presets (*.vam)");
if (fn.isEmpty())
@@ -692,7 +693,7 @@ void VAMGui::savePresetsToFilePressed()
{
if (!presetFileName ) {
- QString s(getenv("MUSE"));
+ QString s(configPath);
QString fn = QFileDialog::getSaveFileName(this, tr("MusE: Save VAM Presets"),
s, "Presets (*.vam)");
presetFileName = new QString(fn);