Hello.

To make testing MIDI XML mapping files easier for myself (and hopefully others,) attached is a patch that allows Mixxx to accept a command line option "--loadXMLfile <filepath>" which will cause it to ignore the default ~/.MixxxMIDIBindings.xml file and use the one specified instead. (Basically just saves you from having to go through the prefs dialog to reload the XML file every time you want to test a tweak.) Not recommended for production use, just when developing new mappings.

(Don't shoot me, Garth!)

Sincerely,
Sean M. Pappalardo

<<--------------------------------------------------------------------------------->>
This E-Mail message has been scanned for viruses
and cleared by >>SmartMail<< from Smarter Technology, Inc.
<<--------------------------------------------------------------------------------->>
Index: src/dlgprefmidibindings.cpp
===================================================================
--- src/dlgprefmidibindings.cpp (revision 2442)
+++ src/dlgprefmidibindings.cpp (working copy)
@@ -65,8 +65,14 @@
     connect(btnRemoveOutputBinding, SIGNAL(clicked()), this, 
SLOT(slotRemoveOutputBinding()));
     connect(btnAddOutputBinding, SIGNAL(clicked()), this, 
SLOT(slotAddOutputBinding()));
 
-    // Try to read in the current XML bindings file, or create one if nothing 
is available
-    loadPreset(BINDINGS_PATH);
+    // Try to read in the current XML bindings file, one from the command 
line, or create one if nothing is available
+    QStringList commandLineArgs = QApplication::arguments();
+    int loadXML = commandLineArgs.indexOf("--loadXMLfile");
+    if (loadXML!=-1) {
+        qDebug() << "Loading custom MIDI mapping file:" << 
commandLineArgs.at(loadXML+1);
+        loadPreset(commandLineArgs.at(loadXML+1));
+    }
+    else loadPreset(BINDINGS_PATH);
     applyPreset();
     m_pMidi->disableMidiLearn();
 }
------------------------------------------------------------------------------
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to