diff options
Diffstat (limited to 'muse2')
-rw-r--r-- | muse2/ChangeLog | 6 | ||||
-rw-r--r-- | muse2/muse/app.cpp | 26 | ||||
-rw-r--r-- | muse2/muse/arranger/arranger.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/midiedit/drumedit.cpp | 12 | ||||
-rw-r--r-- | muse2/muse/midiedit/pianoroll.cpp | 15 | ||||
-rw-r--r-- | muse2/muse/route.cpp | 4 | ||||
-rw-r--r-- | muse2/muse/waveedit/waveedit.cpp | 47 | ||||
-rw-r--r-- | muse2/muse/widgets/gensetbase.ui | 36 | ||||
-rw-r--r-- | muse2/muse/widgets/noteinfo.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/widgets/tb1.cpp | 1 | ||||
-rw-r--r-- | muse2/muse/widgets/tools.cpp | 1 | ||||
-rw-r--r-- | muse2/share/templates/default.med | 2 |
12 files changed, 108 insertions, 44 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog index a0dd731c..3bde8768 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,9 @@ +13.02.2011: + - restore toolbar locations for main window and editors (rj) + - fixed some layout issues in general settings (rj) + - removed window geometry from default template, TODO add a menu option for creating + templates, which might not contain certain types of data, including geometry (rj) + - fixed bug if jack zombifies during project load which led to a crash (rj) 10.02.2011: - added cut/copy/paste and keyboard shortcuts to wave editor (rj) 09.02.2011: diff --git a/muse2/muse/app.cpp b/muse2/muse/app.cpp index 2f3d32ed..55f840b6 100644 --- a/muse2/muse/app.cpp +++ b/muse2/muse/app.cpp @@ -12,6 +12,7 @@ #include <QSignalMapper> #include <QTimer> #include <QWhatsThis> +#include <QSettings> #include "app.h" #include "master/lmaster.h" @@ -1219,9 +1220,11 @@ MusE::MusE(int argc, char** argv) : QMainWindow() //-------------------------------------------------- tools = addToolBar(tr("File Buttons")); + tools->setObjectName("File Buttons"); tools->addAction(fileNewAction); tools->addAction(fileOpenAction); tools->addAction(fileSaveAction); + // // Whats This @@ -1233,11 +1236,14 @@ MusE::MusE(int argc, char** argv) : QMainWindow() tools1 = new EditToolBar(this, arrangerTools); addToolBar(tools1); + tools1->setObjectName("arrangerTools"); QToolBar* transportToolbar = addToolBar(tr("Transport")); + transportToolbar->setObjectName("Transport"); transportToolbar->addActions(transportAction->actions()); QToolBar* panicToolbar = addToolBar(tr("Panic")); + panicToolbar->setObjectName("Panic"); panicToolbar->addAction(panicAction); if (realTimePriority < sched_get_priority_min(SCHED_FIFO)) @@ -1560,7 +1566,11 @@ MusE::MusE(int argc, char** argv) : QMainWindow() } song->blockSignals(false); loadProjectFile(name, useTemplate, true); + changeConfig(false); + QSettings settings("MusE", "MusE-qt"); + //restoreGeometry(settings.value("MusE/geometry").toByteArray()); + restoreState(settings.value("MusE/windowState").toByteArray()); song->update(); } @@ -2035,6 +2045,10 @@ void MusE::closeEvent(QCloseEvent* event) } } + QSettings settings("MusE", "MusE-qt"); + //settings.setValue("MusE/geometry", saveGeometry()); + settings.setValue("MusE/windowState", saveState()); + // save "Open Recent" list QString prjPath(configPath); prjPath += "/projects"; @@ -2046,13 +2060,13 @@ void MusE::closeEvent(QCloseEvent* event) fclose(f); } if(debugMsg) - printf("Muse: Exiting JackAudio\n"); + printf("MusE: Exiting JackAudio\n"); exitJackAudio(); if(debugMsg) - printf("Muse: Exiting DummyAudio\n"); + printf("MusE: Exiting DummyAudio\n"); exitDummyAudio(); if(debugMsg) - printf("Muse: Exiting Metronome\n"); + printf("MusE: Exiting Metronome\n"); exitMetronome(); // p3.3.47 @@ -2091,18 +2105,18 @@ void MusE::closeEvent(QCloseEvent* event) if(lash_client) { if(debugMsg) - printf("Muse: Disconnecting from LASH\n"); + printf("MusE: Disconnecting from LASH\n"); lash_event_t* lashev = lash_event_new_with_type (LASH_Quit); lash_send_event(lash_client, lashev); } #endif if(debugMsg) - printf("Muse: Exiting Dsp\n"); + printf("MusE: Exiting Dsp\n"); AL::exitDsp(); if(debugMsg) - printf("Muse: Exiting OSC\n"); + printf("MusE: Exiting OSC\n"); exitOSC(); // p3.3.47 diff --git a/muse2/muse/arranger/arranger.cpp b/muse2/muse/arranger/arranger.cpp index 9b0de8c8..06f8b472 100644 --- a/muse2/muse/arranger/arranger.cpp +++ b/muse2/muse/arranger/arranger.cpp @@ -118,6 +118,7 @@ Arranger::Arranger(QMainWindow* parent, const char* name) parent->addToolBarBreak(); QToolBar* toolbar = parent->addToolBar(tr("Arranger")); + toolbar->setObjectName("ArrangerToolbar"); QLabel* label = new QLabel(tr("Cursor")); label->setAlignment(Qt::AlignRight|Qt::AlignVCenter); diff --git a/muse2/muse/midiedit/drumedit.cpp b/muse2/muse/midiedit/drumedit.cpp index 7bdac223..563f7eda 100644 --- a/muse2/muse/midiedit/drumedit.cpp +++ b/muse2/muse/midiedit/drumedit.cpp @@ -20,6 +20,7 @@ #include <QSizeGrip> #include <QToolButton> #include <QWhatsThis> +#include <QSettings> #include "drumedit.h" #include "mtscale.h" @@ -133,6 +134,10 @@ void DrumEdit::setHeaderToolTips() void DrumEdit::closeEvent(QCloseEvent* e) { + QSettings settings("MusE", "MusE-qt"); + //settings.setValue("Drumedit/geometry", saveGeometry()); + settings.setValue("Drumedit/windowState", saveState()); + //Store values of the horizontal splitter QList<int> sizes = split2->sizes(); QList<int>::iterator it = sizes.begin(); @@ -245,6 +250,7 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini //--------------------------------------------------- tools = addToolBar(tr("Drum tools")); + tools->setObjectName("Drum tools"); QToolButton *ldm = new QToolButton(); ldm->setToolTip(tr("Load Drummap")); @@ -280,9 +286,11 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini addToolBar(tools2); QToolBar* panicToolbar = addToolBar(tr("panic")); + panicToolbar->setObjectName("panic"); panicToolbar->addAction(panicAction); QToolBar* transport = addToolBar(tr("transport")); + transport->setObjectName("transport"); transport->addActions(transportAction->actions()); addToolBarBreak(); @@ -451,6 +459,10 @@ DrumEdit::DrumEdit(PartList* pl, QWidget* parent, const char* name, unsigned ini if(pos > MAXINT) pos = MAXINT; hscroll->setOffset((int)pos); + + QSettings settings("MusE", "MusE-qt"); + //restoreGeometry(settings.value("Drumedit/geometry").toByteArray()); + restoreState(settings.value("Drumedit/windowState").toByteArray()); } //--------------------------------------------------------- diff --git a/muse2/muse/midiedit/pianoroll.cpp b/muse2/muse/midiedit/pianoroll.cpp index ed5f54c5..981770fd 100644 --- a/muse2/muse/midiedit/pianoroll.cpp +++ b/muse2/muse/midiedit/pianoroll.cpp @@ -25,6 +25,7 @@ #include <QCloseEvent> #include <QMimeData> #include <QScrollArea> +#include <QSettings> #include <stdio.h> @@ -280,7 +281,8 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i connect(mapper, SIGNAL(mapped(int)), this, SLOT(cmd(int))); //---------ToolBar---------------------------------- - tools = addToolBar(tr("Pianoroll tools")); + tools = addToolBar(tr("Pianoroll tools")); + tools->setObjectName("Pianoroll tools"); tools->addActions(undoRedo->actions()); tools->addSeparator(); @@ -306,11 +308,13 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i addToolBar(tools2); QToolBar* panicToolbar = addToolBar(tr("panic")); + panicToolbar->setObjectName("panic"); panicToolbar->addAction(panicAction); //------------------------------------------------------------- // Transport Bar QToolBar* transport = addToolBar(tr("transport")); + transport->setObjectName("transport"); transport->addActions(transportAction->actions()); addToolBarBreak(); @@ -544,6 +548,11 @@ PianoRoll::PianoRoll(PartList* pl, QWidget* parent, const char* name, unsigned i if(pos > MAXINT) pos = MAXINT; hscroll->setOffset((int)pos); + + QSettings settings("MusE", "MusE-qt"); + //restoreGeometry(settings.value("Pianoroll/geometry").toByteArray()); + restoreState(settings.value("Pianoroll/windowState").toByteArray()); + } //--------------------------------------------------------- @@ -802,6 +811,10 @@ void PianoRoll::removeCtrl(CtrlEdit* ctrl) void PianoRoll::closeEvent(QCloseEvent* e) { + QSettings settings("MusE", "MusE-qt"); + //settings.setValue("Pianoroll/geometry", saveGeometry()); + settings.setValue("Pianoroll/windowState", saveState()); + emit deleted((unsigned long)this); e->accept(); } diff --git a/muse2/muse/route.cpp b/muse2/muse/route.cpp index 05d25eee..c3df6517 100644 --- a/muse2/muse/route.cpp +++ b/muse2/muse/route.cpp @@ -1417,7 +1417,9 @@ void Route::read(Xml& xml) else if(rtype == JACK_ROUTE) { - void* jport = audioDevice->findPort(s.toLatin1().constData()); + void* jport = 0; + if (audioDevice) // fix crash if jack is zombified at this point + jport=audioDevice->findPort(s.toLatin1().constData()); if(jport == 0) printf("Route::read(): jack port <%s> not found\n", s.toLatin1().constData()); else diff --git a/muse2/muse/waveedit/waveedit.cpp b/muse2/muse/waveedit/waveedit.cpp index 89e7fb78..2350a2c5 100644 --- a/muse2/muse/waveedit/waveedit.cpp +++ b/muse2/muse/waveedit/waveedit.cpp @@ -5,6 +5,22 @@ // (C) Copyright 2000 Werner Schweer (ws@seh.de) //========================================================= +#include <QMenu> +#include <QSignalMapper> +#include <QToolBar> +#include <QToolButton> +#include <QLayout> +#include <QSizeGrip> +#include <QScrollBar> +#include <QLabel> +#include <QSlider> +#include <QMenuBar> +#include <QAction> +#include <QCloseEvent> +#include <QResizeEvent> +#include <QKeyEvent> +#include <QSettings> + #include "app.h" #include "xml.h" #include "waveedit.h" @@ -21,20 +37,6 @@ #include "icons.h" #include "shortcuts.h" -#include <QMenu> -#include <QSignalMapper> -#include <QToolBar> -#include <QToolButton> -#include <QLayout> -#include <QSizeGrip> -#include <QScrollBar> -#include <QLabel> -#include <QSlider> -#include <QMenuBar> -#include <QAction> -#include <QCloseEvent> -#include <QResizeEvent> -#include <QKeyEvent> extern QColor readColor(Xml& xml); @@ -47,6 +49,9 @@ int WaveEdit::_heightInit = 400; void WaveEdit::closeEvent(QCloseEvent* e) { + QSettings settings("MusE", "MusE-qt"); + //settings.setValue("Waveedit/geometry", saveGeometry()); + settings.setValue("Waveedit/windowState", saveState()); emit deleted((unsigned long)this); e->accept(); } @@ -148,21 +153,25 @@ WaveEdit::WaveEdit(PartList* pl) connect(selectNoneAction, SIGNAL(triggered()), mapper, SLOT(map())); //---------ToolBar---------------------------------- - tools = addToolBar(tr("Wave edit tools")); + tools = addToolBar(tr("Wave edit tools")); + tools->setObjectName("Wave edit tools"); + tools->addActions(undoRedo->actions()); connect(muse, SIGNAL(configChanged()), SLOT(configChanged())); //-------------------------------------------------- // Transport Bar - QToolBar* transport = addToolBar(tr("transport")); + QToolBar* transport = addToolBar(tr("transport")); + transport->setObjectName("transport"); transport->addActions(transportAction->actions()); //-------------------------------------------------- // ToolBar: Solo Cursor1 Cursor2 addToolBarBreak(); - tb1 = addToolBar(tr("Pianoroll tools")); + tb1 = addToolBar(tr("Pianoroll tools")); + tb1->setObjectName("Pianoroll tools"); //tb1->setLabel(tr("weTools")); solo = new QToolButton(); @@ -251,6 +260,10 @@ WaveEdit::WaveEdit(PartList* pl) WavePart* part = (WavePart*)(parts()->begin()->second); solo->setChecked(part->track()->solo()); } + QSettings settings("MusE", "MusE-qt"); + //restoreGeometry(settings.value("Waveedit/geometry").toByteArray()); + restoreState(settings.value("Waveedit/windowState").toByteArray()); + } void WaveEdit::initShortcuts() diff --git a/muse2/muse/widgets/gensetbase.ui b/muse2/muse/widgets/gensetbase.ui index 4d937ecb..cdbaea2c 100644 --- a/muse2/muse/widgets/gensetbase.ui +++ b/muse2/muse/widgets/gensetbase.ui @@ -7,19 +7,13 @@ <x>0</x> <y>0</y> <width>522</width> - <height>518</height> + <height>528</height> </rect> </property> <property name="windowTitle"> <string>MusE: Global Settings</string> </property> - <layout class="QVBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>11</number> - </property> + <layout class="QVBoxLayout" name="verticalLayout_4"> <item> <widget class="QTabWidget" name="TabWidget2"> <property name="sizePolicy"> @@ -29,7 +23,7 @@ </sizepolicy> </property> <property name="currentIndex"> - <number>3</number> + <number>2</number> </property> <widget class="QWidget" name="TabPage"> <attribute name="title"> @@ -755,6 +749,7 @@ <property name="font"> <font> <pointsize>8</pointsize> + <italic>true</italic> </font> </property> <property name="text"> @@ -907,7 +902,7 @@ Shorter periods are desirable.</string> <property name="title"> <string>Ticks</string> </property> - <layout class="QGridLayout" name="gridLayout9"> + <layout class="QGridLayout" name="gridLayout_2"> <item row="0" column="0"> <widget class="QLabel" name="TextLabel3"> <property name="text"> @@ -1103,6 +1098,19 @@ Shorter periods are desirable.</string> </property> </widget> </item> + <item row="4" column="1"> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> </layout> </widget> </item> @@ -1241,13 +1249,7 @@ Shorter periods are desirable.</string> </widget> </item> <item> - <layout class="QHBoxLayout"> - <property name="spacing"> - <number>6</number> - </property> - <property name="margin"> - <number>0</number> - </property> + <layout class="QHBoxLayout" name="horizontalLayout"> <item> <spacer name="Spacer1"> <property name="orientation"> diff --git a/muse2/muse/widgets/noteinfo.cpp b/muse2/muse/widgets/noteinfo.cpp index 4f0e0c8c..f6d40857 100644 --- a/muse2/muse/widgets/noteinfo.cpp +++ b/muse2/muse/widgets/noteinfo.cpp @@ -26,6 +26,7 @@ NoteInfo::NoteInfo(QWidget* parent) : QToolBar(tr("Note Info"), parent) { + setObjectName("Note Info"); deltaMode = false; //QLabel* label = new QLabel(tr("Start"), this, "Start"); diff --git a/muse2/muse/widgets/tb1.cpp b/muse2/muse/widgets/tb1.cpp index 0380b795..917e6ae2 100644 --- a/muse2/muse/widgets/tb1.cpp +++ b/muse2/muse/widgets/tb1.cpp @@ -53,6 +53,7 @@ static const char* quantStrings[] = { Toolbar1::Toolbar1(QWidget* parent, int r, int q, bool sp) : QToolBar(QString("Quant'n'Snap-tools"), parent) { + setObjectName("Quant'n'Snap-tools"); pitch = 0; showPitch = sp; // ORCAN - FIXME: Check this: diff --git a/muse2/muse/widgets/tools.cpp b/muse2/muse/widgets/tools.cpp index 268a03d5..40b0a328 100644 --- a/muse2/muse/widgets/tools.cpp +++ b/muse2/muse/widgets/tools.cpp @@ -57,6 +57,7 @@ ToolB toolList[] = { EditToolBar::EditToolBar(QWidget* parent, int tools, const char*) : QToolBar(tr("Edit Tools"), parent) { + setObjectName("Edit Tools"); QActionGroup* action = new QActionGroup(parent); // Parent needed. action->setExclusive(true); diff --git a/muse2/share/templates/default.med b/muse2/share/templates/default.med index 31bb5128..a95df4bb 100644 --- a/muse2/share/templates/default.med +++ b/muse2/share/templates/default.med @@ -18,8 +18,6 @@ <bigtimeVisible>0</bigtimeVisible> <transportVisible>0</transportVisible> <markerVisible>0</markerVisible> - <geometryMain x="0" y="0" w="1172" h="489"></geometryMain> - <geometryTransport x="0" y="0" w="598" h="88"></geometryTransport> <mixer1Visible>0</mixer1Visible> <mixer2Visible>0</mixer2Visible> <arranger> |