summaryrefslogtreecommitdiff
path: root/muse2
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2010-12-22 22:55:39 +0000
committerRobert Jonsson <spamatica@gmail.com>2010-12-22 22:55:39 +0000
commite2930cc7ceb780eac3a43365535e04fd7189e4aa (patch)
tree518c90934dab6fe1328a877b5fd2d867fd6cfb93 /muse2
parent37e405424cabc04b3b3c1915374847c2e7f05f8d (diff)
usability dialog for midi inputs
Diffstat (limited to 'muse2')
-rw-r--r--muse2/ChangeLog1
-rw-r--r--muse2/muse/app.h2
-rw-r--r--muse2/muse/arranger/trackinfo.cpp14
-rw-r--r--muse2/muse/confmport.cpp10
-rw-r--r--muse2/muse/widgets/popupmenu.cpp1
5 files changed, 20 insertions, 8 deletions
diff --git a/muse2/ChangeLog b/muse2/ChangeLog
index b4deb554..0ff13419 100644
--- a/muse2/ChangeLog
+++ b/muse2/ChangeLog
@@ -2,6 +2,7 @@
- Capitalizations in the menus thanks to Geoff King (gsking1->gmail. com)
- Added some comments in app.cpp that I've been willing to include for a while. (Orcan)
- Added a line to CMakeLists to install the splash image. Commented out for now. (Orcan)
+ - added new-user help dialog for Input button on midi track-info (rj)
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)
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"