summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog3
-rw-r--r--muse2/muse/icons.cpp36
-rw-r--r--muse2/muse/icons.h10
-rw-r--r--muse2/muse/liste/editctrlbase.ui2
-rw-r--r--muse2/muse/song.cpp29
-rw-r--r--muse2/muse/widgets/gensetbase.ui4
-rw-r--r--muse2/share/scripts/CMakeLists.txt15
-rw-r--r--muse2/synti/simpledrums2/ssplugingui.cpp2
8 files changed, 74 insertions, 27 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index 3e18642c..a12d7ec1 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -1,3 +1,6 @@
+10.12.2010:
+ - More compiler and build warnings fixes. (Orcan)
+ - Restored the scripts menu and fixed scripts handling. Tested OK. (Orcan)
09.12.2010:
- Fix: column orders mess up in the main window, and they do not save properly in
the .med files. (Orcan)
diff --git a/muse2/muse/icons.cpp b/muse2/muse/icons.cpp
index d89977c2..226dcb79 100644
--- a/muse2/muse/icons.cpp
+++ b/muse2/muse/icons.cpp
@@ -119,15 +119,12 @@
#include "xpm/flagS.xpm"
#include "xpm/lock.xpm"
#include "xpm/toc.xpm"
-#include "xpm/piano.xpm"
+// #include "xpm/piano.xpm" // not used -Orcan
// #include "xpm/pianoS.xpm"
#include "xpm/exitS.xpm"
#include "xpm/undo.xpm"
#include "xpm/redo.xpm"
-#include "xpm/editcut.xpm"
-#include "xpm/editcopy.xpm"
-#include "xpm/editpaste.xpm"
#include "xpm/undoS.xpm"
#include "xpm/redoS.xpm"
#include "xpm/editcutS.xpm"
@@ -135,13 +132,18 @@
#include "xpm/editpasteS.xpm"
#include "xpm/editmute.xpm"
#include "xpm/editmuteS.xpm"
-#include "xpm/editpasteclone.xpm"
#include "xpm/editpastecloneS.xpm"
-#include "xpm/editpaste2track.xpm"
#include "xpm/editpaste2trackS.xpm"
-#include "xpm/editpasteclone2track.xpm"
#include "xpm/editpasteclone2trackS.xpm"
+/* Not used - Orcan
+#include "xpm/editcut.xpm"
+#include "xpm/editcopy.xpm"
+#include "xpm/editpaste.xpm"
+#include "xpm/editpasteclone.xpm"
+#include "xpm/editpaste2track.xpm"
+#include "xpm/editpasteclone2track.xpm"
+*/
#include "xpm/speaker.xpm"
#include "xpm/buttondown.xpm"
#include "xpm/configure.xpm"
@@ -361,6 +363,16 @@ QIcon* editpaste2TrackIconSet;
QIcon* editpasteCloneIconSet;
QIcon* editpasteClone2TrackIconSet;
+/* Not used - Orcan
+QIcon* pianoIcon;
+QIcon* editcutIcon;
+QIcon* editcopyIcon;
+QIcon* editpasteIcon;
+QIcon* editpasteCloneIcon;
+QIcon* editpaste2TrackIcon;
+QIcon* editpasteClone2TrackIcon;
+*/
+
QPixmap* redLedIcon;
QPixmap* darkRedLedIcon;
QPixmap* greendotIcon;
@@ -539,7 +551,15 @@ void initIcons()
editpaste2TrackIconSet = new MICON(editpaste2trackS_xpm, NULL);
editpasteCloneIconSet = new MICON(editpastecloneS_xpm, NULL);
editpasteClone2TrackIconSet = new MICON(editpasteclone2trackS_xpm, NULL); // ..
-
+ /* Not used - Orcan
+ pianoIcon = new MICON(piano_xpm, NULL);
+ editcutIcon = new MICON(editcut_xpm, "edit-cut");
+ editcopyIcon = new MICON(editcopy_xpm, "edit-copy");
+ editpasteIcon = new MICON(editpaste_xpm, "edit-paste");
+ editpasteCloneIcon = new MICON(editpasteclone_xpm, NULL);
+ editpaste2TrackIcon = new MICON(editpaste2track_xpm, NULL);
+ editpasteClone2TrackIcon = new MICON(editpasteclone2track_xpm, NULL);
+ */
exitIcon = new MPIXMAP(exit_xpm, "application-exit");
exit1Icon = new MPIXMAP(exit1_xpm, "application-exit");
diff --git a/muse2/muse/icons.h b/muse2/muse/icons.h
index 5f518958..ccb776cc 100644
--- a/muse2/muse/icons.h
+++ b/muse2/muse/icons.h
@@ -112,6 +112,16 @@ extern QIcon* editpaste2TrackIconSet;
extern QIcon* editpasteCloneIconSet;
extern QIcon* editpasteClone2TrackIconSet;
+/* Not used
+extern QIcon* pianoIcon;
+extern QIcon* editcutIcon;
+extern QIcon* editcopyIcon;
+extern QIcon* editpasteIcon;
+extern QIcon* editpasteCloneIcon;
+extern QIcon* editpaste2TrackIcon;
+extern QIcon* editpasteClone2TrackIcon;
+*/
+
extern QPixmap* exitIcon;
extern QPixmap* exit1Icon;
extern QPixmap* record1_Icon;
diff --git a/muse2/muse/liste/editctrlbase.ui b/muse2/muse/liste/editctrlbase.ui
index 2af3d884..1665a0d8 100644
--- a/muse2/muse/liste/editctrlbase.ui
+++ b/muse2/muse/liste/editctrlbase.ui
@@ -578,7 +578,7 @@
</item>
</layout>
</widget>
- <widget class="QWidget" name="WStackPage">
+ <widget class="QWidget" name="WStackPage2">
<property name="geometry">
<rect>
<x>0</x>
diff --git a/muse2/muse/song.cpp b/muse2/muse/song.cpp
index dded4c10..64287e14 100644
--- a/muse2/muse/song.cpp
+++ b/muse2/muse/song.cpp
@@ -3516,7 +3516,6 @@ void Song::removeTrack3(Track* /*track*/)//prevent of compiler warning: unused p
*/
}
-
//---------------------------------------------------------
// executeScript
//---------------------------------------------------------
@@ -3534,9 +3533,12 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo
//
song->startUndo(); // undo this entire block
for (iPart i = parts->begin(); i != parts->end(); i++) {
- const char* tmp = tmpnam(NULL);
+ //const char* tmp = tmpnam(NULL);
+ char tmp[16] = "muse-tmp-XXXXXX";
+ int fd = mkstemp(tmp);
printf("script input filename=%s\n",tmp);
- FILE *fp = fopen(tmp, "w");
+ //FILE *fp = fopen(tmp, "w");
+ FILE *fp = fdopen(fd , "w");
MidiPart *part = (MidiPart*)(i->second);
int partStart = part->endTick()-part->lenTick();
int z, n;
@@ -3645,14 +3647,15 @@ void Song::executeScript(const char* scriptfile, PartList* parts, int quant, boo
endUndo(SC_EVENT_REMOVED);
}
-#define SCRIPTSSUFFIX "/share/muse/scripts/"
+
#define USERSCRIPTSSUFFIX "/.muse/scripts/"
void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver)
{
//
// List scripts
//
- QString distScripts = QString(INSTPREFIX) + QString(SCRIPTSSUFFIX);
+ QString distScripts = QString(INSTPREFIX) + "/" + SHAREINSTPREFIX + "/"
+ + INSTALL_NAME + "/scripts";
QString home = "";
if (getenv("HOME") != NULL)
home = QString(getenv("HOME"));
@@ -3671,6 +3674,9 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver)
userScriptNames = dir.entryList();
}
+ QSignalMapper* distSignalMapper = new QSignalMapper(this);
+ QSignalMapper* userSignalMapper = new QSignalMapper(this);
+
if (deliveredScriptNames.size() > 0 || userScriptNames.size() > 0) {
//menuPlugins = new QPopupMenu(this);
//menuBar()->insertItem(tr("&Plugins"), menuPlugins);
@@ -3679,17 +3685,23 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver)
for (QStringList::Iterator it = deliveredScriptNames.begin(); it != deliveredScriptNames.end(); it++, id++) {
//menuPlugins->insertItem(*it, this, SLOT(execDeliveredScript(int)), 0, id);
//menuPlugins->insertItem(*it, this, slot_deliveredscripts, 0, id);
- menuPlugins->addAction(*it, receiver, SLOT(execDeliveredScript(int))); //id
+ QAction* act = menuPlugins->addAction(*it);
+ connect(act, SIGNAL(triggered()), distSignalMapper, SLOT(map()));
+ distSignalMapper->setMapping(act, id);
}
menuPlugins->addSeparator();
}
if (userScriptNames.size() > 0) {
for (QStringList::Iterator it = userScriptNames.begin(); it != userScriptNames.end(); it++, id++) {
//menuPlugins->insertItem(*it, this, slot_userscripts, 0, id);
- menuPlugins->addAction(*it, receiver, SLOT(execUserScript(int))); //id
+ QAction* act = menuPlugins->addAction(*it);
+ connect(act, SIGNAL(triggered()), userSignalMapper, SLOT(map()));
+ userSignalMapper->setMapping(act, id);
}
menuPlugins->addSeparator();
}
+ connect(distSignalMapper, SIGNAL(mapped(int)), receiver, SLOT(execDeliveredScript(int)));
+ connect(userSignalMapper, SIGNAL(mapped(int)), receiver, SLOT(execUserScript(int)));
}
return;
}
@@ -3700,7 +3712,8 @@ void Song::populateScriptMenu(QMenu* menuPlugins, QObject* receiver)
QString Song::getScriptPath(int id, bool isdelivered)
{
if (isdelivered) {
- QString path = QString(INSTPREFIX) + SCRIPTSSUFFIX + deliveredScriptNames[id];
+ QString path = QString(INSTPREFIX) + "/" + SHAREINSTPREFIX + "/" + INSTALL_NAME
+ + "/scripts/" + deliveredScriptNames[id];
return path;
}
diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui
index c41f7e1e..9d63cbe5 100644
--- a/muse2/muse/widgets/gensetbase.ui
+++ b/muse2/muse/widgets/gensetbase.ui
@@ -889,7 +889,7 @@ Shorter periods are desirable.</string>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab">
+ <widget class="QWidget" name="tab2">
<attribute name="title">
<string>Midi</string>
</attribute>
@@ -1088,7 +1088,7 @@ Shorter periods are desirable.</string>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab">
+ <widget class="QWidget" name="tab3">
<attribute name="title">
<string>GUI</string>
</attribute>
diff --git a/muse2/share/scripts/CMakeLists.txt b/muse2/share/scripts/CMakeLists.txt
index 0be0850e..3fc898d1 100644
--- a/muse2/share/scripts/CMakeLists.txt
+++ b/muse2/share/scripts/CMakeLists.txt
@@ -18,11 +18,12 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
-# FIXME: Won't work
-#install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts DoNothing RemoveShortEvents DoubleSpeed ConstantLength SwingQuantize1 )
+file(GLOB script_files DoNothing
+ RemoveShortEvents
+ DoubleSpeed
+ ConstantLength
+ SwingQuantize1
+ )
+install (PROGRAMS ${script_files}
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts)
-install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts DoNothing )
-install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts RemoveShortEvents )
-install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts DoubleSpeed )
-install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts ConstantLength )
-install_files( /${SHARE_INSTALL_PREFIX}/${MusE_INSTALL_NAME}/scripts SwingQuantize1 )
diff --git a/muse2/synti/simpledrums2/ssplugingui.cpp b/muse2/synti/simpledrums2/ssplugingui.cpp
index ff17255e..d52d3a8f 100644
--- a/muse2/synti/simpledrums2/ssplugingui.cpp
+++ b/muse2/synti/simpledrums2/ssplugingui.cpp
@@ -483,7 +483,7 @@ void SS_PluginFront::setParameterValue(int param, int val)
}
SS_PluginGui::SS_PluginGui(QWidget* parent)
- : QDialog(parent, false)
+ : QDialog(parent)
{
setWindowTitle("SimpleDrums LADSPA sendeffects");
for (int i=0; i<SS_NR_OF_SENDEFFECTS; i++) {