--- qsampler/trunk/src/qsamplerMainForm.cpp 2008/05/14 15:24:22 1738
+++ qsampler/trunk/src/qsamplerMainForm.cpp 2009/04/28 09:06:43 1890
@@ -1,7 +1,7 @@
// qsamplerMainForm.cpp
//
/****************************************************************************
- Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved.
+ Copyright (C) 2004-2009, 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,8 +391,10 @@
#else
viewInstrumentsAction->setEnabled(false);
#endif
- // Setup appropriately...
- m_pMessages->setLogging(m_pOptions->bMessagesLog, m_pOptions->sMessagesLogPath);
+ // Setup messages logging appropriately...
+ m_pMessages->setLogging(
+ m_pOptions->bMessagesLog,
+ m_pOptions->sMessagesLogPath);
// Set message defaults...
updateMessagesFont();
updateMessagesLimit();
@@ -757,7 +759,8 @@
"\"%1\"\n\n"
"Do you want to replace it?")
.arg(sFilename),
- tr("Replace"), tr("Cancel")) > 0)
+ QMessageBox::Yes | QMessageBox::No)
+ == QMessageBox::No)
return false;
}
}
@@ -780,11 +783,13 @@
"\"%1\"\n\n"
"Do you want to save the changes?")
.arg(sessionName(m_sFilename)),
- tr("Save"), tr("Discard"), tr("Cancel"))) {
- case 0: // Save...
+ QMessageBox::Save |
+ QMessageBox::Discard |
+ QMessageBox::Cancel)) {
+ case QMessageBox::Save:
bClose = saveSession(false);
// Fall thru....
- case 1: // Discard
+ case QMessageBox::Discard:
break;
default: // Cancel.
bClose = false;
@@ -1305,7 +1310,8 @@
"Please note that this operation may cause\n"
"temporary MIDI and Audio disruption.\n\n"
"Do you want to reset the sampler engine now?"),
- tr("Reset"), tr("Cancel")) > 0)
+ QMessageBox::Ok | QMessageBox::Cancel)
+ == QMessageBox::Cancel)
return;
// Trye closing the current session, first...
@@ -1346,7 +1352,7 @@
"Please note that this operation may cause\n"
"temporary MIDI and Audio disruption.\n\n"
"Do you want to restart the connection now?"),
- tr("Restart"), tr("Cancel")) == 0);
+ QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok);
}
// Are we still for it?
@@ -1427,7 +1433,8 @@
"%1\n\n"
"Are you sure?")
.arg(pChannelStrip->windowTitle()),
- tr("OK"), tr("Cancel")) > 0)
+ QMessageBox::Ok | QMessageBox::Cancel)
+ == QMessageBox::Cancel)
return;
}
@@ -1618,7 +1625,7 @@
int iOldServerTimeout = m_pOptions->iServerTimeout;
bool bOldServerStart = m_pOptions->bServerStart;
QString sOldServerCmdLine = m_pOptions->sServerCmdLine;
- bool bOldMessagesLog = m_pOptions->bMessagesLog;
+ bool bOldMessagesLog = m_pOptions->bMessagesLog;
QString sOldMessagesLogPath = m_pOptions->sMessagesLogPath;
QString sOldDisplayFont = m_pOptions->sDisplayFont;
bool bOldDisplayEffect = m_pOptions->bDisplayEffect;
@@ -1631,6 +1638,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...
@@ -1639,11 +1647,12 @@
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"
- "next time you start this program."), tr("OK"));
+ "next time you start this program."));
updateMessagesCapture();
}
// Check wheather something immediate has changed.
@@ -1806,6 +1815,21 @@
sText += tr("Instrument editing support disabled.");
sText += "
";
#endif
+#ifndef CONFIG_EVENT_CHANNEL_MIDI
+ sText += "";
+ sText += tr("Channel MIDI event support disabled.");
+ sText += "
";
+#endif
+#ifndef CONFIG_EVENT_DEVICE_MIDI
+ sText += "";
+ sText += tr("Device MIDI event support disabled.");
+ sText += "
";
+#endif
+#ifndef CONFIG_MAX_VOICES
+ sText += "";
+ sText += tr("Runtime max. voices / disk streams support disabled.");
+ sText += "
";
+#endif
sText += "
\n";
sText += tr("Using") + ": ";
sText += ::lscp_client_package();
@@ -2209,7 +2233,7 @@
QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
QMessageBox::critical(this,
- QSAMPLER_TITLE ": " + tr("Error"), s, tr("Cancel"));
+ QSAMPLER_TITLE ": " + tr("Error"), s, QMessageBox::Cancel);
}
@@ -2497,17 +2521,13 @@
// Is the server process instance still here?
if (m_pServer) {
- switch (QMessageBox::warning(this,
+ if (QMessageBox::warning(this,
QSAMPLER_TITLE ": " + tr("Warning"),
tr("Could not start the LinuxSampler server.\n\n"
"Maybe it is already started."),
- tr("Stop"), tr("Kill"), tr("Cancel"))) {
- case 0:
+ QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) {
m_pServer->terminate();
- break;
- case 1:
m_pServer->kill();
- break;
}
return;
}
@@ -2581,9 +2601,8 @@
"running in the background. The sampler would continue to work\n"
"according to your current sampler session and you could alter the\n"
"sampler session at any time by relaunching QSampler.\n\n"
- "Do you want LinuxSampler to stop or to keep running in\n"
- "the background?"),
- tr("Stop"), tr("Keep Running")) == 1)
+ "Do you want LinuxSampler to stop?"),
+ QMessageBox::Yes | QMessageBox::No) == QMessageBox::No)
{
bForceServerStop = false;
}
@@ -2767,6 +2786,9 @@
}
}
+ // send the current / loaded fine tuning settings to the sampler
+ m_pOptions->sendFineTuningSettings();
+
// Make a new session
return newSession();
}