--- qsampler/trunk/src/qsamplerMainForm.ui.h 2004/11/19 10:18:59 303 +++ qsampler/trunk/src/qsamplerMainForm.ui.h 2005/01/18 11:29:01 341 @@ -2,7 +2,7 @@ // // ui.h extension file, included from the uic-generated form implementation. /**************************************************************************** - Copyright (C) 2004, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License @@ -44,6 +44,9 @@ #include "config.h" +#ifdef HAVE_SIGNAL_H +#include +#endif // Timer constant stuff. #define QSAMPLER_TIMER_MSECS 200 @@ -116,6 +119,11 @@ m_iTimerSlot = 0; +#ifdef HAVE_SIGNAL_H + // Set to ignore any fatal "Broken pipe" signals. + ::signal(SIGPIPE, SIG_IGN); +#endif + // Make it an MDI workspace. m_pWorkspace = new QWorkspace(this); m_pWorkspace->setScrollBarsEnabled(true); @@ -197,6 +205,9 @@ // We got options? m_pOptions = pOptions; + // Set initial instrument name display mode. + qsamplerChannel::setInstrumentNames(m_pOptions->bInstrumentNames); + // Some child forms are to be created right now. m_pMessages = new qsamplerMessages(this); // Set message defaults... @@ -614,10 +625,10 @@ ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannelID << " " << pChannel->midiDriver() << endl; ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl; ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " "; - if (pChannel->midiChannel() > 0) - ts << pChannel->midiChannel(); - else + if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL) ts << "ALL"; + else + ts << pChannel->midiChannel(); ts << endl; ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannelID << endl; ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannelID << endl; @@ -952,6 +963,7 @@ int iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines; bool bOldCompletePath = m_pOptions->bCompletePath; int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; + bool bOldInstrumentNames = m_pOptions->bInstrumentNames; // Load the current setup settings. pOptionsForm->setup(m_pOptions); // Show the setup dialog... @@ -965,6 +977,9 @@ updateMessagesCapture(); } // Check wheather something immediate has changed. + if (( bOldInstrumentNames && !m_pOptions->bInstrumentNames) || + (!bOldInstrumentNames && m_pOptions->bInstrumentNames)) + qsamplerChannel::setInstrumentNames(m_pOptions->bInstrumentNames); if (( bOldCompletePath && !m_pOptions->bCompletePath) || (!bOldCompletePath && m_pOptions->bCompletePath) || (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles))