--- qsampler/trunk/src/qsamplerChannel.cpp 2007/10/01 18:26:06 1366 +++ qsampler/trunk/src/qsamplerChannel.cpp 2007/10/12 00:03:27 1402 @@ -19,6 +19,7 @@ *****************************************************************************/ +#include "qsamplerUtilities.h" #include "qsamplerAbout.h" #include "qsamplerChannel.h" @@ -202,7 +203,13 @@ if (m_iInstrumentStatus == 100 && m_sInstrumentFile == sInstrumentFile && m_iInstrumentNr == iInstrumentNr) return true; - if (::lscp_load_instrument_non_modal(pMainForm->client(), sInstrumentFile.latin1(), iInstrumentNr, m_iChannelID) != LSCP_OK) { + if ( + ::lscp_load_instrument_non_modal( + pMainForm->client(), + qsamplerUtilities::lscpEscapePath(sInstrumentFile).latin1(), + iInstrumentNr, m_iChannelID + ) != LSCP_OK + ) { appendMessagesClient("lscp_load_instrument"); return false; } @@ -580,9 +587,11 @@ #ifdef CONFIG_INSTRUMENT_NAME // We got all actual instrument datum... - m_sInstrumentFile = pChannelInfo->instrument_file; + m_sInstrumentFile = + qsamplerUtilities::lscpEscapedPathToPosix(pChannelInfo->instrument_file); m_iInstrumentNr = pChannelInfo->instrument_nr; - m_sInstrumentName = pChannelInfo->instrument_name; + m_sInstrumentName = + qsamplerUtilities::lscpEscapedTextToRaw(pChannelInfo->instrument_name); #else // First, check if intrument name has changed, // taking care that instrument name lookup might be expensive, @@ -677,6 +686,7 @@ bool qsamplerChannel::editChannel (void) { #ifdef CONFIG_EDIT_INSTRUMENT + qsamplerMainForm *pMainForm = qsamplerMainForm::getInstance(); if (pMainForm == NULL) return false; @@ -685,11 +695,13 @@ if (::lscp_edit_instrument(pMainForm->client(), m_iChannelID) != LSCP_OK) { appendMessagesClient("lscp_edit_instrument"); - appendMessagesError( - "Could not launch an appropriate instrument editor for the\n" - "given instrument! Make sure you have an appropriate\n" - "instrument editor like 'gigedit' installed and that it placed\n" - "its mandatory DLL file into the sampler's plugin directory." + appendMessagesError(QObject::tr( + "Could not launch an appropriate instrument editor " + "for the given instrument!\n" + "Make sure you have an appropriate " + "instrument editor like 'gigedit' installed\n" + "and that it placed its mandatory DLL file " + "into the sampler's plugin directory.") ); return false; } @@ -697,13 +709,17 @@ appendMessages(QObject::tr("edit instrument.")); return true; + #else - appendMessagesError( - "Sorry, QSampler was compiled for a version of liblscp which lacks\n" - "this feature. You may want to update liblscp and recompile\n" - "QSampler afterwards." + + appendMessagesError(QObject::tr( + "Sorry, QSampler was compiled for a version of liblscp " + "which lacks this feature.\n" + "You may want to update liblscp and recompile QSampler afterwards.") ); + return false; + #endif }