diff options
author | Robert Jonsson <spamatica@gmail.com> | 2010-12-22 22:55:39 +0000 |
---|---|---|
committer | Robert Jonsson <spamatica@gmail.com> | 2010-12-22 22:55:39 +0000 |
commit | e2930cc7ceb780eac3a43365535e04fd7189e4aa (patch) | |
tree | 518c90934dab6fe1328a877b5fd2d867fd6cfb93 /muse2/muse | |
parent | 37e405424cabc04b3b3c1915374847c2e7f05f8d (diff) |
usability dialog for midi inputs
Diffstat (limited to 'muse2/muse')
-rw-r--r-- | muse2/muse/app.h | 2 | ||||
-rw-r--r-- | muse2/muse/arranger/trackinfo.cpp | 14 | ||||
-rw-r--r-- | muse2/muse/confmport.cpp | 10 | ||||
-rw-r--r-- | muse2/muse/widgets/popupmenu.cpp | 1 |
4 files changed, 19 insertions, 8 deletions
diff --git a/muse2/muse/app.h b/muse2/muse/app.h index 72d20208..3a9925aa 100644 --- a/muse2/muse/app.h +++ b/muse2/muse/app.h @@ -242,7 +242,6 @@ class MusE : public QMainWindow void toggleMixer1(bool); void toggleMixer2(bool); - void configMidiPorts(); void configMidiSync(); void configMidiFile(); void configShortCuts(); @@ -335,6 +334,7 @@ class MusE : public QMainWindow void showDidYouKnowDialog(); void routingPopupMenuAboutToHide(); + void configMidiPorts(); public: MusE(int argc, char** argv); diff --git a/muse2/muse/arranger/trackinfo.cpp b/muse2/muse/arranger/trackinfo.cpp index 3a20accb..c1253358 100644 --- a/muse2/muse/arranger/trackinfo.cpp +++ b/muse2/muse/arranger/trackinfo.cpp @@ -9,6 +9,7 @@ #include <QPainter> #include <QScrollBar> #include <QTimer> +#include <QMessageBox> #include <math.h> #include <string.h> @@ -605,8 +606,19 @@ void Arranger::inRoutesPressed() PopupMenu* pup = muse->prepareRoutingPopupMenu(selected, false); //PopupView* pup = muse->prepareRoutingPopupView(selected, false); - if(!pup) + + if(!pup) { + int ret = QMessageBox::warning(this, tr("No inputs"), + tr("There are no midi inputs.\n" + "Do you want to open the midi configuration dialog?"), + QMessageBox::Ok | QMessageBox::Cancel, + QMessageBox::Ok); + if (ret == QMessageBox::Ok) { + printf("open config midi ports\n"); + muse->configMidiPorts(); + } return; + } gRoutingPopupMenuMaster = midiTrackInfo; connect(pup, SIGNAL(triggered(QAction*)), SLOT(routingPopupMenuActivated(QAction*))); diff --git a/muse2/muse/confmport.cpp b/muse2/muse/confmport.cpp index 69cbccdd..77e6889c 100644 --- a/muse2/muse/confmport.cpp +++ b/muse2/muse/confmport.cpp @@ -1016,13 +1016,11 @@ void MPConfig::removeInstanceClicked() void MusE::configMidiPorts() { - if (!midiPortConfig) - midiPortConfig = new MPConfig(0); - if (midiPortConfig->isVisible()) { + if (!midiPortConfig) { + midiPortConfig = new MPConfig(this); + } + midiPortConfig->show(); midiPortConfig->raise(); midiPortConfig->activateWindow(); - } - else - midiPortConfig->show(); } diff --git a/muse2/muse/widgets/popupmenu.cpp b/muse2/muse/widgets/popupmenu.cpp index 618f0d19..862bda91 100644 --- a/muse2/muse/widgets/popupmenu.cpp +++ b/muse2/muse/widgets/popupmenu.cpp @@ -11,6 +11,7 @@ //#include <stdio.h> #include <QMouseEvent> #include <QAction> +#include <stdio.h> //#include <QStandardItemModel> #include "popupmenu.h" |