--- qsampler/trunk/src/qsamplerMainForm.cpp 2008/02/17 13:53:00 1702 +++ qsampler/trunk/src/qsamplerMainForm.cpp 2008/12/07 13:58:16 1803 @@ -1,7 +1,7 @@ // qsamplerMainForm.cpp // /**************************************************************************** - Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved. + Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved. Copyright (C) 2007, 2008 Christian Schoenebeck This program is free software; you can redistribute it and/or @@ -391,6 +391,10 @@ #else viewInstrumentsAction->setEnabled(false); #endif + // Setup messages logging appropriately... + m_pMessages->setLogging( + m_pOptions->bMessagesLog, + m_pOptions->sMessagesLogPath); // Set message defaults... updateMessagesFont(); updateMessagesLimit(); @@ -581,7 +585,7 @@ case LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO: if (m_pDeviceForm) m_pDeviceForm->refreshDevices(); break; -#if CONFIG_LSCP_CHANNEL_MIDI +#if CONFIG_EVENT_CHANNEL_MIDI case LSCP_EVENT_CHANNEL_MIDI: { const int iChannelID = pEvent->data().section(' ', 0, 0).toInt(); ChannelStrip *pChannelStrip = channelStrip(iChannelID); @@ -590,7 +594,7 @@ break; } #endif -#if CONFIG_LSCP_DEVICE_MIDI +#if CONFIG_EVENT_DEVICE_MIDI case LSCP_EVENT_DEVICE_MIDI: { const int iDeviceID = pEvent->data().section(' ', 0, 0).toInt(); const int iPortID = pEvent->data().section(' ', 1, 1).toInt(); @@ -1616,6 +1620,8 @@ int iOldServerTimeout = m_pOptions->iServerTimeout; bool bOldServerStart = m_pOptions->bServerStart; QString sOldServerCmdLine = m_pOptions->sServerCmdLine; + bool bOldMessagesLog = m_pOptions->bMessagesLog; + QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath; QString sOldDisplayFont = m_pOptions->sDisplayFont; bool bOldDisplayEffect = m_pOptions->bDisplayEffect; int iOldMaxVolume = m_pOptions->iMaxVolume; @@ -1627,6 +1633,7 @@ bool bOldCompletePath = m_pOptions->bCompletePath; bool bOldInstrumentNames = m_pOptions->bInstrumentNames; int iOldMaxRecentFiles = m_pOptions->iMaxRecentFiles; + int iOldBaseFontSize = m_pOptions->iBaseFontSize; // Load the current setup settings. pOptionsForm->setup(m_pOptions); // Show the setup dialog... @@ -1635,7 +1642,8 @@ if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) || (!bOldStdoutCapture && m_pOptions->bStdoutCapture) || ( bOldKeepOnTop && !m_pOptions->bKeepOnTop) || - (!bOldKeepOnTop && m_pOptions->bKeepOnTop)) { + (!bOldKeepOnTop && m_pOptions->bKeepOnTop) || + (iOldBaseFontSize != m_pOptions->iBaseFontSize)) { QMessageBox::information(this, QSAMPLER_TITLE ": " + tr("Information"), tr("Some settings may be only effective\n" @@ -1643,6 +1651,11 @@ updateMessagesCapture(); } // Check wheather something immediate has changed. + if (( bOldMessagesLog && !m_pOptions->bMessagesLog) || + (!bOldMessagesLog && m_pOptions->bMessagesLog) || + (sOldMessagesLogPath != m_pOptions->sMessagesLogPath)) + m_pMessages->setLogging( + m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath); if (( bOldCompletePath && !m_pOptions->bCompletePath) || (!bOldCompletePath && m_pOptions->bCompletePath) || (iOldMaxRecentFiles != m_pOptions->iMaxRecentFiles)) @@ -2721,13 +2734,13 @@ if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(AUDIO_OUTPUT_DEVICE_INFO)"); -#if CONFIG_LSCP_CHANNEL_MIDI +#if CONFIG_EVENT_CHANNEL_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(CHANNEL_MIDI)"); #endif -#if CONFIG_LSCP_DEVICE_MIDI +#if CONFIG_EVENT_DEVICE_MIDI // Subscribe to channel MIDI data notifications... if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI) != LSCP_OK) appendMessagesClient("lscp_client_subscribe(DEVICE_MIDI)"); @@ -2758,6 +2771,9 @@ } } + // send the current / loaded fine tuning settings to the sampler + m_pOptions->sendFineTuningSettings(); + // Make a new session return newSession(); } @@ -2785,10 +2801,10 @@ closeSession(false); // Close us as a client... -#if CONFIG_LSCP_DEVICE_MIDI +#if CONFIG_EVENT_DEVICE_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_DEVICE_MIDI); #endif -#if CONFIG_LSCP_CHANNEL_MIDI +#if CONFIG_EVENT_CHANNEL_MIDI ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_MIDI); #endif ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO);