/[svn]/qsampler/trunk/src/qsamplerMainForm.ui.h
ViewVC logotype

Diff of /qsampler/trunk/src/qsamplerMainForm.ui.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 404 by capela, Wed Feb 23 13:47:47 2005 UTC revision 1013 by capela, Mon Jan 8 16:52:48 2007 UTC
# Line 2  Line 2 
2  //  //
3  // ui.h extension file, included from the uic-generated form implementation.  // ui.h extension file, included from the uic-generated form implementation.
4  /****************************************************************************  /****************************************************************************
5     Copyright (C) 2004-2005, rncbc aka Rui Nuno Capela. All rights reserved.     Copyright (C) 2004-2007, rncbc aka Rui Nuno Capela. All rights reserved.
6    
7     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License     modify it under the terms of the GNU General Public License
# Line 14  Line 14 
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.     GNU General Public License for more details.
16    
17     You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License along
18     along with this program; if not, write to the Free Software     with this program; if not, write to the Free Software Foundation, Inc.,
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20    
21  *****************************************************************************/  *****************************************************************************/
22    
# Line 41  Line 41 
41  #include "qsamplerMessages.h"  #include "qsamplerMessages.h"
42    
43  #include "qsamplerChannelStrip.h"  #include "qsamplerChannelStrip.h"
44  #include "qsamplerOptionsForm.h"  #include "qsamplerInstrumentList.h"
45    
46  #include "config.h"  #include "qsamplerInstrumentListForm.h"
47    #include "qsamplerDeviceForm.h"
48    #include "qsamplerOptionsForm.h"
49    
50  #ifdef HAVE_SIGNAL_H  #ifdef HAVE_SIGNAL_H
51  #include <signal.h>  #include <signal.h>
52  #endif  #endif
53    
54    #ifdef CONFIG_LIBGIG
55    #include <gig.h>
56    #endif
57    
58  // Timer constant stuff.  // Timer constant stuff.
59  #define QSAMPLER_TIMER_MSECS    200  #define QSAMPLER_TIMER_MSECS    200
60    
# Line 98  private: Line 104  private:
104  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
105  // qsamplerMainForm -- Main window form implementation.  // qsamplerMainForm -- Main window form implementation.
106    
107    // Kind of singleton reference.
108    qsamplerMainForm *qsamplerMainForm::g_pMainForm = NULL;
109    
110    
111  // Kind of constructor.  // Kind of constructor.
112  void qsamplerMainForm::init (void)  void qsamplerMainForm::init (void)
113  {  {
114            // Pseudo-singleton reference setup.
115            g_pMainForm = this;
116    
117      // Initialize some pointer references.      // Initialize some pointer references.
118      m_pOptions = NULL;      m_pOptions = NULL;
119    
120      // All child forms are to be created later, not earlier than setup.      // All child forms are to be created later, not earlier than setup.
121      m_pMessages = NULL;      m_pMessages = NULL;
122        m_pInstrumentListForm = NULL;
123        m_pDeviceForm = NULL;
124    
125      // We'll start clean.      // We'll start clean.
126      m_iUntitled   = 0;      m_iUntitled   = 0;
# Line 138  void qsamplerMainForm::init (void) Line 153  void qsamplerMainForm::init (void)
153      pLabel = new QLabel(tr("Connected"), this);      pLabel = new QLabel(tr("Connected"), this);
154      pLabel->setAlignment(Qt::AlignLeft);      pLabel->setAlignment(Qt::AlignLeft);
155      pLabel->setMinimumSize(pLabel->sizeHint());      pLabel->setMinimumSize(pLabel->sizeHint());
156      m_status[QSAMPLER_STATUS_CLIENT] = pLabel;      m_statusItem[QSAMPLER_STATUS_CLIENT] = pLabel;
157      statusBar()->addWidget(pLabel);      statusBar()->addWidget(pLabel);
158      // Server address.      // Server address.
159      pLabel = new QLabel(this);      pLabel = new QLabel(this);
160      pLabel->setAlignment(Qt::AlignLeft);      pLabel->setAlignment(Qt::AlignLeft);
161      m_status[QSAMPLER_STATUS_SERVER] = pLabel;      m_statusItem[QSAMPLER_STATUS_SERVER] = pLabel;
162      statusBar()->addWidget(pLabel, 1);      statusBar()->addWidget(pLabel, 1);
163      // Channel title.      // Channel title.
164      pLabel = new QLabel(this);      pLabel = new QLabel(this);
165      pLabel->setAlignment(Qt::AlignLeft);      pLabel->setAlignment(Qt::AlignLeft);
166      m_status[QSAMPLER_STATUS_CHANNEL] = pLabel;      m_statusItem[QSAMPLER_STATUS_CHANNEL] = pLabel;
167      statusBar()->addWidget(pLabel, 2);      statusBar()->addWidget(pLabel, 2);
168      // Session modification status.      // Session modification status.
169      pLabel = new QLabel(tr("MOD"), this);      pLabel = new QLabel(tr("MOD"), this);
170      pLabel->setAlignment(Qt::AlignHCenter);      pLabel->setAlignment(Qt::AlignHCenter);
171      pLabel->setMinimumSize(pLabel->sizeHint());      pLabel->setMinimumSize(pLabel->sizeHint());
172      m_status[QSAMPLER_STATUS_SESSION] = pLabel;      m_statusItem[QSAMPLER_STATUS_SESSION] = pLabel;
173      statusBar()->addWidget(pLabel);      statusBar()->addWidget(pLabel);
174    
175      // Create the recent files sub-menu.      // Create the recent files sub-menu.
# Line 173  void qsamplerMainForm::destroy (void) Line 188  void qsamplerMainForm::destroy (void)
188  {  {
189      // Do final processing anyway.      // Do final processing anyway.
190      processServerExit();      processServerExit();
191        
192      // Delete recentfiles menu.  #if defined(WIN32)
193      if (m_pRecentFilesMenu)      WSACleanup();
194          delete m_pRecentFilesMenu;  #endif
     // Delete status item labels one by one.  
     if (m_status[QSAMPLER_STATUS_CLIENT])  
         delete m_status[QSAMPLER_STATUS_CLIENT];  
     if (m_status[QSAMPLER_STATUS_SERVER])  
         delete m_status[QSAMPLER_STATUS_SERVER];  
     if (m_status[QSAMPLER_STATUS_CHANNEL])  
         delete m_status[QSAMPLER_STATUS_CHANNEL];  
     if (m_status[QSAMPLER_STATUS_SESSION])  
         delete m_status[QSAMPLER_STATUS_SESSION];  
195    
196      // Finally drop any widgets around...      // Finally drop any widgets around...
197        if (m_pDeviceForm)
198            delete m_pDeviceForm;
199        if (m_pInstrumentListForm)
200            delete m_pInstrumentListForm;
201      if (m_pMessages)      if (m_pMessages)
202          delete m_pMessages;          delete m_pMessages;
203      if (m_pWorkspace)      if (m_pWorkspace)
204          delete m_pWorkspace;          delete m_pWorkspace;
205    
206  #if defined(WIN32)      // Delete status item labels one by one.
207      WSACleanup();      if (m_statusItem[QSAMPLER_STATUS_CLIENT])
208  #endif          delete m_statusItem[QSAMPLER_STATUS_CLIENT];
209        if (m_statusItem[QSAMPLER_STATUS_SERVER])
210            delete m_statusItem[QSAMPLER_STATUS_SERVER];
211        if (m_statusItem[QSAMPLER_STATUS_CHANNEL])
212            delete m_statusItem[QSAMPLER_STATUS_CHANNEL];
213        if (m_statusItem[QSAMPLER_STATUS_SESSION])
214            delete m_statusItem[QSAMPLER_STATUS_SESSION];
215    
216        // Delete recentfiles menu.
217        if (m_pRecentFilesMenu)
218            delete m_pRecentFilesMenu;
219    
220            // Pseudo-singleton reference shut-down.
221            g_pMainForm = NULL;
222  }  }
223    
224    
# Line 205  void qsamplerMainForm::setup ( qsamplerO Line 228  void qsamplerMainForm::setup ( qsamplerO
228      // We got options?      // We got options?
229      m_pOptions = pOptions;      m_pOptions = pOptions;
230    
231        // What style do we create these forms?
232            Qt::WFlags wflags = Qt::WStyle_Customize
233                    | Qt::WStyle_NormalBorder
234                    | Qt::WStyle_Title
235                    | Qt::WStyle_SysMenu
236                    | Qt::WStyle_MinMax
237                    | Qt::WType_TopLevel;
238        if (m_pOptions->bKeepOnTop)
239            wflags |= Qt::WStyle_Tool;
240      // Some child forms are to be created right now.      // Some child forms are to be created right now.
241      m_pMessages = new qsamplerMessages(this);      m_pMessages = new qsamplerMessages(this);
242        m_pDeviceForm = new qsamplerDeviceForm(this, 0, wflags);
243    #ifdef CONFIG_MIDI_INSTRUMENT
244        m_pInstrumentListForm = new qsamplerInstrumentListForm(this, 0, wflags);
245            QObject::connect(m_pInstrumentListForm->InstrumentList,
246                    SIGNAL(instrumentsChanged()),
247                    SLOT(sessionDirty()));
248    #else
249            viewInstrumentsAction->setEnabled(false);
250    #endif
251      // Set message defaults...      // Set message defaults...
252      updateMessagesFont();      updateMessagesFont();
253      updateMessagesLimit();      updateMessagesLimit();
254      updateMessagesCapture();      updateMessagesCapture();
255      // Set the visibility signal.      // Set the visibility signal.
256      QObject::connect(m_pMessages, SIGNAL(visibilityChanged(bool)), this, SLOT(stabilizeForm()));      QObject::connect(m_pMessages,
257                    SIGNAL(visibilityChanged(bool)),
258                    SLOT(stabilizeForm()));
259    
260      // Initial decorations toggle state.      // Initial decorations toggle state.
261      viewMenubarAction->setOn(m_pOptions->bMenubar);      viewMenubarAction->setOn(m_pOptions->bMenubar);
# Line 235  void qsamplerMainForm::setup ( qsamplerO Line 278  void qsamplerMainForm::setup ( qsamplerO
278          QTextIStream istr(&sDockables);          QTextIStream istr(&sDockables);
279          istr >> *this;          istr >> *this;
280      }      }
281      // Try to restore old window positioning.      // Try to restore old window positioning and initial visibility.
282      m_pOptions->loadWidgetGeometry(this);      m_pOptions->loadWidgetGeometry(this);
283        m_pOptions->loadWidgetGeometry(m_pInstrumentListForm);
284        m_pOptions->loadWidgetGeometry(m_pDeviceForm);
285    
286      // Final startup stabilization...      // Final startup stabilization...
287      updateRecentFilesMenu();      updateRecentFilesMenu();
# Line 274  bool qsamplerMainForm::queryClose (void) Line 319  bool qsamplerMainForm::queryClose (void)
319              QTextOStream ostr(&sDockables);              QTextOStream ostr(&sDockables);
320              ostr << *this;              ostr << *this;
321              m_pOptions->settings().writeEntry("/Layout/DockWindows", sDockables);              m_pOptions->settings().writeEntry("/Layout/DockWindows", sDockables);
322              // And the main windows state.              // And the children, and the main windows state,.
323              m_pOptions->saveWidgetGeometry(this);                          m_pOptions->saveWidgetGeometry(m_pDeviceForm);
324                            m_pOptions->saveWidgetGeometry(m_pInstrumentListForm);
325                            m_pOptions->saveWidgetGeometry(this);
326                            // Close popup widgets.
327                            if (m_pInstrumentListForm)
328                                    m_pInstrumentListForm->close();
329                            if (m_pDeviceForm)
330                                    m_pDeviceForm->close();
331              // Stop client and/or server, gracefully.              // Stop client and/or server, gracefully.
332              stopServer();              stopServer();
333          }          }
# Line 305  bool qsamplerMainForm::decodeDragFiles ( Line 357  bool qsamplerMainForm::decodeDragFiles (
357          if (bDecode) {          if (bDecode) {
358              files = QStringList::split('\n', sText);              files = QStringList::split('\n', sText);
359              for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++)              for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++)
360                  *iter = (*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null);                  *iter = QUrl((*iter).stripWhiteSpace().replace(QRegExp("^file:"), QString::null)).path();
361          }          }
362      }      }
363    
# Line 328  void qsamplerMainForm::dropEvent ( QDrop Line 380  void qsamplerMainForm::dropEvent ( QDrop
380      if (!decodeDragFiles(pDropEvent, files))      if (!decodeDragFiles(pDropEvent, files))
381          return;          return;
382    
383      for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) {          for (QStringList::Iterator iter = files.begin(); iter != files.end(); iter++) {
384                  const QString& sPath = QUrl(*iter).path();                  const QString& sPath = *iter;
385                  if (qsamplerChannel::isInstrumentFile(sPath)) {                  if (qsamplerChannel::isInstrumentFile(sPath)) {
386                          // Try to create a new channel from instrument file...                          // Try to create a new channel from instrument file...
387                      qsamplerChannel *pChannel = new qsamplerChannel(this);                          qsamplerChannel *pChannel = new qsamplerChannel();
388                      if (pChannel == NULL)                          if (pChannel == NULL)
389                          return;                                  return;
390                          // Start setting the instrument filename...                          // Start setting the instrument filename...
391                          pChannel->setInstrument(sPath, 0);                          pChannel->setInstrument(sPath, 0);
392                      // Before we show it up, may be we'll                          // Before we show it up, may be we'll
393                      // better ask for some initial values?                          // better ask for some initial values?
394                      if (!pChannel->channelSetup(this)) {                          if (!pChannel->channelSetup(this)) {
395                          delete pChannel;                                  delete pChannel;
396                          return;                                  return;
397                      }                          }
398                      // Finally, give it to a new channel strip...                          // Finally, give it to a new channel strip...
399                          if (!createChannelStrip(pChannel)) {                          if (!createChannelStrip(pChannel)) {
400                          delete pChannel;                                  delete pChannel;
401                          return;                                  return;
402                          }                          }
403                      // Make that an overall update.                          // Make that an overall update.
404                      m_iDirtyCount++;                          m_iDirtyCount++;
405                      stabilizeForm();                          stabilizeForm();
406                  }   // Otherwise, load an usual session file (LSCP script)...                  }   // Otherwise, load an usual session file (LSCP script)...
407                  else if (closeSession(true))                  else if (closeSession(true)) {
408                          loadSessionFile(sPath);                          loadSessionFile(sPath);
409                            break;
410                    }
411                  // Make it look responsive...:)                  // Make it look responsive...:)
412                  QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);                  QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
413          }          }
# Line 366  void qsamplerMainForm::customEvent ( QCu Line 420  void qsamplerMainForm::customEvent ( QCu
420      // For the time being, just pump it to messages.      // For the time being, just pump it to messages.
421      if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) {      if (pCustomEvent->type() == QSAMPLER_CUSTOM_EVENT) {
422          qsamplerCustomEvent *pEvent = (qsamplerCustomEvent *) pCustomEvent;          qsamplerCustomEvent *pEvent = (qsamplerCustomEvent *) pCustomEvent;
423          appendMessagesColor(tr("Notify event: %1 data: %2")                  if (pEvent->event() == LSCP_EVENT_CHANNEL_INFO) {
424              .arg(::lscp_event_to_text(pEvent->event()))                          int iChannelID = pEvent->data().toInt();
425              .arg(pEvent->data()), "#996699");                          qsamplerChannelStrip *pChannelStrip = channelStrip(iChannelID);
426                            if (pChannelStrip)
427                                    channelStripChanged(pChannelStrip);
428                    } else {
429                            appendMessagesColor(tr("Notify event: %1 data: %2")
430                                    .arg(::lscp_event_to_text(pEvent->event()))
431                                    .arg(pEvent->data()), "#996699");
432                    }
433      }      }
434  }  }
435    
# Line 377  void qsamplerMainForm::customEvent ( QCu Line 438  void qsamplerMainForm::customEvent ( QCu
438  void qsamplerMainForm::contextMenuEvent( QContextMenuEvent *pEvent )  void qsamplerMainForm::contextMenuEvent( QContextMenuEvent *pEvent )
439  {  {
440      stabilizeForm();      stabilizeForm();
441        
442      editMenu->exec(pEvent->globalPos());      editMenu->exec(pEvent->globalPos());
443  }  }
444    
# Line 391  qsamplerOptions *qsamplerMainForm::optio Line 452  qsamplerOptions *qsamplerMainForm::optio
452      return m_pOptions;      return m_pOptions;
453  }  }
454    
455    
456  // The LSCP client descriptor property.  // The LSCP client descriptor property.
457  lscp_client_t *qsamplerMainForm::client (void)  lscp_client_t *qsamplerMainForm::client (void)
458  {  {
# Line 398  lscp_client_t *qsamplerMainForm::client Line 460  lscp_client_t *qsamplerMainForm::client
460  }  }
461    
462    
463    // The pseudo-singleton instance accessor.
464    qsamplerMainForm *qsamplerMainForm::getInstance (void)
465    {
466            return g_pMainForm;
467    }
468    
469    
470  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
471  // qsamplerMainForm -- Session file stuff.  // qsamplerMainForm -- Session file stuff.
472    
# Line 445  bool qsamplerMainForm::openSession (void Line 514  bool qsamplerMainForm::openSession (void
514    
515      // Ask for the filename to open...      // Ask for the filename to open...
516      QString sFilename = QFileDialog::getOpenFileName(      QString sFilename = QFileDialog::getOpenFileName(
517              m_pOptions->sSessionDir,                // Start here.                  m_pOptions->sSessionDir,                // Start here.
518              tr("LSCP Session files") + " (*.lscp)", // Filter (LSCP files)                  tr("LSCP Session files") + " (*.lscp)", // Filter (LSCP files)
519              this, 0,                                // Parent and name (none)                  this, 0,                                // Parent and name (none)
520              tr("Open Session")                      // Caption.                  QSAMPLER_TITLE ": " + tr("Open Session")        // Caption.
521      );      );
522    
523      // Have we cancelled?      // Have we cancelled?
# Line 479  bool qsamplerMainForm::saveSession ( boo Line 548  bool qsamplerMainForm::saveSession ( boo
548              sFilename = m_pOptions->sSessionDir;              sFilename = m_pOptions->sSessionDir;
549          // Prompt the guy...          // Prompt the guy...
550          sFilename = QFileDialog::getSaveFileName(          sFilename = QFileDialog::getSaveFileName(
551                  sFilename,                              // Start here.                          sFilename,                              // Start here.
552                  tr("LSCP Session files") + " (*.lscp)", // Filter (LSCP files)                          tr("LSCP Session files") + " (*.lscp)", // Filter (LSCP files)
553                  this, 0,                                // Parent and name (none)                          this, 0,                                // Parent and name (none)
554                  tr("Save Session")                      // Caption.                          QSAMPLER_TITLE ": " + tr("Save Session")        // Caption.
555          );          );
556          // Have we cancelled it?          // Have we cancelled it?
557          if (sFilename.isEmpty())          if (sFilename.isEmpty())
# Line 492  bool qsamplerMainForm::saveSession ( boo Line 561  bool qsamplerMainForm::saveSession ( boo
561              sFilename += ".lscp";              sFilename += ".lscp";
562          // Check if already exists...          // Check if already exists...
563          if (sFilename != m_sFilename && QFileInfo(sFilename).exists()) {          if (sFilename != m_sFilename && QFileInfo(sFilename).exists()) {
564              if (QMessageBox::warning(this, tr("Warning"),              if (QMessageBox::warning(this,
565                                    QSAMPLER_TITLE ": " + tr("Warning"),
566                  tr("The file already exists:\n\n"                  tr("The file already exists:\n\n"
567                     "\"%1\"\n\n"                     "\"%1\"\n\n"
568                     "Do you want to replace it?")                     "Do you want to replace it?")
# Line 514  bool qsamplerMainForm::closeSession ( bo Line 584  bool qsamplerMainForm::closeSession ( bo
584    
585      // Are we dirty enough to prompt it?      // Are we dirty enough to prompt it?
586      if (m_iDirtyCount > 0) {      if (m_iDirtyCount > 0) {
587          switch (QMessageBox::warning(this, tr("Warning"),          switch (QMessageBox::warning(this,
588                            QSAMPLER_TITLE ": " + tr("Warning"),
589              tr("The current session has been changed:\n\n"              tr("The current session has been changed:\n\n"
590              "\"%1\"\n\n"              "\"%1\"\n\n"
591              "Do you want to save the changes?")              "Do you want to save the changes?")
# Line 567  bool qsamplerMainForm::loadSessionFile ( Line 638  bool qsamplerMainForm::loadSessionFile (
638          return false;          return false;
639      }      }
640    
641            // Tell the world we'll take some time...
642            QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
643    
644      // Read the file.      // Read the file.
645            int iLine = 0;
646      int iErrors = 0;      int iErrors = 0;
647      QTextStream ts(&file);      QTextStream ts(&file);
648      while (!ts.atEnd()) {      while (!ts.atEnd()) {
649          // Read the line.          // Read the line.
650          QString sCommand = ts.readLine().simplifyWhiteSpace();          QString sCommand = ts.readLine().stripWhiteSpace();
651                    iLine++;
652          // If not empty, nor a comment, call the server...          // If not empty, nor a comment, call the server...
653          if (!sCommand.isEmpty() && sCommand[0] != '#') {          if (!sCommand.isEmpty() && sCommand[0] != '#') {
654              appendMessagesColor(sCommand, "#996633");                          // Remember that, no matter what,
655              // Remember that, no matter what,                          // all LSCP commands are CR/LF terminated.
656              // all LSCP commands are CR/LF terminated.                          sCommand += "\r\n";
657              sCommand += "\r\n";                          if (::lscp_client_query(m_pClient, sCommand.latin1()) != LSCP_OK) {
658              if (::lscp_client_query(m_pClient, sCommand.latin1()) != LSCP_OK) {                                  appendMessagesColor(QString("%1(%2): %3")
659                  appendMessagesClient("lscp_client_query");                                          .arg(QFileInfo(sFilename).fileName()).arg(iLine)
660                  iErrors++;                                          .arg(sCommand.simplifyWhiteSpace()), "#996633");
661                  break;                                  appendMessagesClient("lscp_client_query");
662              }                                  iErrors++;
663                            }
664          }          }
665          // Try to make it snappy :)          // Try to make it snappy :)
666          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);          QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
# Line 592  bool qsamplerMainForm::loadSessionFile ( Line 669  bool qsamplerMainForm::loadSessionFile (
669      // Ok. we've read it.      // Ok. we've read it.
670      file.close();      file.close();
671    
     // Have we any errors?  
     if (iErrors > 0)  
         appendMessagesError(tr("Session could not be loaded\nfrom \"%1\".\n\nSorry.").arg(sFilename));  
   
672          // Now we'll try to create (update) the whole GUI session.          // Now we'll try to create (update) the whole GUI session.
673          updateSession();          updateSession();
674    
675            // We're fornerly done.
676            QApplication::restoreOverrideCursor();
677    
678            // Have we any errors?
679            if (iErrors > 0)
680                    appendMessagesError(tr("Session loaded with errors\nfrom \"%1\".\n\nSorry.").arg(sFilename));
681    
682      // Save as default session directory.      // Save as default session directory.
683      if (m_pOptions)      if (m_pOptions)
684          m_pOptions->sSessionDir = QFileInfo(sFilename).dirPath(true);          m_pOptions->sSessionDir = QFileInfo(sFilename).dirPath(true);
685      // We're not dirty anymore.          // We're not dirty anymore, if loaded without errors,
686      m_iDirtyCount = 0;          m_iDirtyCount = iErrors;
687      // Stabilize form...      // Stabilize form...
688      m_sFilename = sFilename;      m_sFilename = sFilename;
689      updateRecentFiles(sFilename);      updateRecentFiles(sFilename);
690      appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename)));      appendMessages(tr("Open session: \"%1\".").arg(sessionName(m_sFilename)));
691        
692      // Make that an overall update.      // Make that an overall update.
693      stabilizeForm();      stabilizeForm();
694      return true;      return true;
# Line 618  bool qsamplerMainForm::loadSessionFile ( Line 698  bool qsamplerMainForm::loadSessionFile (
698  // Save current session to specific file path.  // Save current session to specific file path.
699  bool qsamplerMainForm::saveSessionFile ( const QString& sFilename )  bool qsamplerMainForm::saveSessionFile ( const QString& sFilename )
700  {  {
701            if (m_pClient == NULL)
702                    return false;
703    
704            // Check whether server is apparently OK...
705            if (::lscp_get_channels(m_pClient) < 0) {
706                    appendMessagesClient("lscp_get_channels");
707                    return false;
708            }
709    
710      // Open and write into real file.      // Open and write into real file.
711      QFile file(sFilename);      QFile file(sFilename);
712      if (!file.open(IO_WriteOnly | IO_Truncate)) {      if (!file.open(IO_WriteOnly | IO_Truncate)) {
# Line 625  bool qsamplerMainForm::saveSessionFile ( Line 714  bool qsamplerMainForm::saveSessionFile (
714          return false;          return false;
715      }      }
716    
717            // Tell the world we'll take some time...
718            QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
719    
720      // Write the file.      // Write the file.
721      int iErrors = 0;      int  iErrors = 0;
722      QTextStream ts(&file);      QTextStream ts(&file);
723      ts << "# " << QSAMPLER_TITLE " - " << tr(QSAMPLER_SUBTITLE) << endl;      ts << "# " << QSAMPLER_TITLE " - " << tr(QSAMPLER_SUBTITLE) << endl;
724      ts << "# " << tr("Version")      ts << "# " << tr("Version")
# Line 637  bool qsamplerMainForm::saveSessionFile ( Line 729  bool qsamplerMainForm::saveSessionFile (
729      ts << "# " << tr("File")      ts << "# " << tr("File")
730         << ": " << QFileInfo(sFilename).fileName() << endl;         << ": " << QFileInfo(sFilename).fileName() << endl;
731      ts << "# " << tr("Date")      ts << "# " << tr("Date")
732         << ": " << QDate::currentDate().toString("MMMM dd yyyy")         << ": " << QDate::currentDate().toString("MMM dd yyyy")
733         << " "  << QTime::currentTime().toString("hh:mm:ss") << endl;         << " "  << QTime::currentTime().toString("hh:mm:ss") << endl;
734      ts << "#"  << endl;      ts << "#"  << endl;
735      ts << endl;      ts << endl;
736    
737            // It is assumed that this new kind of device+session file
738            // will be loaded from a complete initialized server...
739            int *piDeviceIDs;
740            int  iDevice;
741            ts << "RESET" << endl;
742    
743            // Audio device mapping.
744            QMap<int, int> audioDeviceMap;
745            piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Audio);
746            for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) {
747                    ts << endl;
748                    qsamplerDevice device(qsamplerDevice::Audio, piDeviceIDs[iDevice]);
749                    // Audio device specification...
750                    ts << "# " << device.deviceTypeName() << " " << device.driverName()
751                            << " " << tr("Device") << " " << iDevice << endl;
752                    ts << "CREATE AUDIO_OUTPUT_DEVICE " << device.driverName();
753                    qsamplerDeviceParamMap::ConstIterator deviceParam;
754                    for (deviceParam = device.params().begin();
755                                    deviceParam != device.params().end();
756                                            ++deviceParam) {
757                            const qsamplerDeviceParam& param = deviceParam.data();
758                            if (param.value.isEmpty()) ts << "# ";
759                            ts << " " << deviceParam.key() << "='" << param.value << "'";
760                    }
761                    ts << endl;
762                    // Audio channel parameters...
763                    int iPort = 0;
764                    for (qsamplerDevicePort *pPort = device.ports().first();
765                                    pPort;
766                                            pPort = device.ports().next(), ++iPort) {
767                            qsamplerDeviceParamMap::ConstIterator portParam;
768                            for (portParam = pPort->params().begin();
769                                            portParam != pPort->params().end();
770                                                    ++portParam) {
771                                    const qsamplerDeviceParam& param = portParam.data();
772                                    if (param.fix || param.value.isEmpty()) ts << "# ";
773                                    ts << "SET AUDIO_OUTPUT_CHANNEL_PARAMETER " << iDevice
774                                            << " " << iPort << " " << portParam.key()
775                                            << "='" << param.value << "'" << endl;
776                            }
777                    }
778                    // Audio device index/id mapping.
779                    audioDeviceMap[device.deviceID()] = iDevice;
780                    // Try to keep it snappy :)
781                    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
782            }
783    
784            // MIDI device mapping.
785            QMap<int, int> midiDeviceMap;
786            piDeviceIDs = qsamplerDevice::getDevices(m_pClient, qsamplerDevice::Midi);
787            for (iDevice = 0; piDeviceIDs && piDeviceIDs[iDevice] >= 0; iDevice++) {
788                    ts << endl;
789                    qsamplerDevice device(qsamplerDevice::Midi, piDeviceIDs[iDevice]);
790                    // MIDI device specification...
791                    ts << "# " << device.deviceTypeName() << " " << device.driverName()
792                            << " " << tr("Device") << " " << iDevice << endl;
793                    ts << "CREATE MIDI_INPUT_DEVICE " << device.driverName();
794                    qsamplerDeviceParamMap::ConstIterator deviceParam;
795                    for (deviceParam = device.params().begin();
796                                    deviceParam != device.params().end();
797                                            ++deviceParam) {
798                            const qsamplerDeviceParam& param = deviceParam.data();
799                            if (param.value.isEmpty()) ts << "# ";
800                            ts << " " << deviceParam.key() << "='" << param.value << "'";
801                    }
802                    ts << endl;
803                    // MIDI port parameters...
804                    int iPort = 0;
805                    for (qsamplerDevicePort *pPort = device.ports().first();
806                                    pPort;
807                                            pPort = device.ports().next(), ++iPort) {
808                            qsamplerDeviceParamMap::ConstIterator portParam;
809                            for (portParam = pPort->params().begin();
810                                            portParam != pPort->params().end();
811                                                    ++portParam) {
812                                    const qsamplerDeviceParam& param = portParam.data();
813                                    if (param.fix || param.value.isEmpty()) ts << "# ";
814                                    ts << "SET MIDI_INPUT_PORT_PARAMETER " << iDevice
815                                       << " " << iPort << " " << portParam.key()
816                                       << "='" << param.value << "'" << endl;
817                            }
818                    }
819                    // MIDI device index/id mapping.
820                    midiDeviceMap[device.deviceID()] = iDevice;
821                    // Try to keep it snappy :)
822                    QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
823            }
824            ts << endl;
825    
826    #ifdef CONFIG_MIDI_INSTRUMENT
827            // MIDI instrument mapping...
828            QMap<int, int> midiInstrumentMap;
829            int *piMaps = ::lscp_list_midi_instrument_maps(m_pClient);
830            for (int iMap = 0; piMaps && piMaps[iMap] >= 0; iMap++) {
831                    int iMidiMap = piMaps[iMap];
832                    const char *pszMapName
833                            = ::lscp_get_midi_instrument_map_name(m_pClient, iMidiMap);
834                    ts << "# " << tr("MIDI instrument map") << " " << iMap;
835                    if (pszMapName)
836                            ts << " - " << pszMapName;
837                    ts << endl;
838                    ts << "ADD MIDI_INSTRUMENT_MAP";
839                    if (pszMapName)
840                            ts << " '" << pszMapName << "'";
841                    ts << endl;
842                    // MIDI instrument mapping...
843                    lscp_midi_instrument_t *pInstrs
844                            = ::lscp_list_midi_instruments(m_pClient, iMidiMap);
845                    for (int iInstr = 0; pInstrs && pInstrs[iInstr].map >= 0; iInstr++) {
846                            lscp_midi_instrument_info_t *pInstrInfo
847                                    = ::lscp_get_midi_instrument_info(m_pClient, &pInstrs[iInstr]);
848                            if (pInstrInfo) {
849                                    ts << "MAP MIDI_INSTRUMENT "
850                                            << iMap                        << " "
851                                            << pInstrs[iInstr].bank        << " "
852                                            << pInstrs[iInstr].prog        << " "
853                                            << pInstrInfo->engine_name     << " '"
854                                            << pInstrInfo->instrument_file << "' "
855                                            << pInstrInfo->instrument_nr   << " "
856                                            << pInstrInfo->volume          << " ";
857                                    switch (pInstrInfo->load_mode) {
858                                            case LSCP_LOAD_PERSISTENT:
859                                                    ts << "PERSISTENT";
860                                                    break;
861                                            case LSCP_LOAD_ON_DEMAND_HOLD:
862                                                    ts << "ON_DEMAND_HOLD";
863                                                    break;
864                                            case LSCP_LOAD_ON_DEMAND:
865                                            case LSCP_LOAD_DEFAULT:
866                                            default:
867                                                    ts << "ON_DEMAND";
868                                                    break;
869                                    }
870                                    if (pInstrInfo->name)
871                                            ts << " '" << pInstrInfo->name << "'";
872                                    ts << endl;
873                            }       // Check for errors...
874                            else if (::lscp_client_get_errno(m_pClient)) {
875                                    appendMessagesClient("lscp_get_midi_instrument_info");
876                                    iErrors++;
877                            }
878                            // Try to keep it snappy :)
879                            QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
880                    }
881                    ts << endl;
882                    // Check for errors...
883                    if (pInstrs == NULL && ::lscp_client_get_errno(m_pClient)) {
884                            appendMessagesClient("lscp_list_midi_instruments");
885                            iErrors++;
886                    }
887                    // MIDI strument index/id mapping.
888                    midiInstrumentMap[iMidiMap] = iMap;
889            }
890            // Check for errors...
891            if (piMaps == NULL && ::lscp_client_get_errno(m_pClient)) {
892                    appendMessagesClient("lscp_list_midi_instrument_maps");
893                    iErrors++;
894            }
895    #endif  // CONFIG_MIDI_INSTRUMENT
896    
897            // Sampler channel mapping.
898      QWidgetList wlist = m_pWorkspace->windowList();      QWidgetList wlist = m_pWorkspace->windowList();
899      for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {      for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
900          qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);          qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
901          if (pChannelStrip) {          if (pChannelStrip) {
902              qsamplerChannel *pChannel = pChannelStrip->channel();              qsamplerChannel *pChannel = pChannelStrip->channel();
903              if (pChannel) {              if (pChannel) {
904                  int iChannelID = pChannel->channelID();                  ts << "# " << tr("Channel") << " " << iChannel << endl;
                 ts << "# " << pChannelStrip->caption() << endl;  
905                  ts << "ADD CHANNEL" << endl;                  ts << "ADD CHANNEL" << endl;
906                  ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannelID << " " << pChannel->audioDriver() << endl;                                  if (audioDeviceMap.isEmpty()) {
907                  ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannelID << " " << pChannel->midiDriver() << endl;                                          ts << "SET CHANNEL AUDIO_OUTPUT_TYPE " << iChannel
908                  ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannelID << " " << pChannel->midiPort() << endl;                                                  << " " << pChannel->audioDriver() << endl;
909                  ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannelID << " ";                                  } else {
910                                            ts << "SET CHANNEL AUDIO_OUTPUT_DEVICE " << iChannel
911                                                    << " " << audioDeviceMap[pChannel->audioDevice()] << endl;
912                                    }
913                                    if (midiDeviceMap.isEmpty()) {
914                                            ts << "SET CHANNEL MIDI_INPUT_TYPE " << iChannel
915                                                    << " " << pChannel->midiDriver() << endl;
916                                    } else {
917                                            ts << "SET CHANNEL MIDI_INPUT_DEVICE " << iChannel
918                                                    << " " << midiDeviceMap[pChannel->midiDevice()] << endl;
919                                    }
920                                    ts << "SET CHANNEL MIDI_INPUT_PORT " << iChannel
921                                            << " " << pChannel->midiPort() << endl;
922                    ts << "SET CHANNEL MIDI_INPUT_CHANNEL " << iChannel << " ";
923                  if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)                  if (pChannel->midiChannel() == LSCP_MIDI_CHANNEL_ALL)
924                      ts << "ALL";                      ts << "ALL";
925                  else                  else
926                      ts << pChannel->midiChannel();                      ts << pChannel->midiChannel();
927                  ts << endl;                  ts << endl;
928                  ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannelID << endl;                  ts << "LOAD ENGINE " << pChannel->engineName() << " " << iChannel << endl;
929                  ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' " << pChannel->instrumentNr() << " " << iChannelID << endl;                                  if (pChannel->instrumentStatus() < 100) ts << "# ";
930                  ts << "SET CHANNEL VOLUME " << iChannelID << " " << pChannel->volume() << endl;                                  ts << "LOAD INSTRUMENT NON_MODAL '" << pChannel->instrumentFile() << "' "
931                                            << pChannel->instrumentNr() << " " << iChannel << endl;
932                                    qsamplerChannelRoutingMap::ConstIterator audioRoute;
933                                    for (audioRoute = pChannel->audioRouting().begin();
934                                                    audioRoute != pChannel->audioRouting().end();
935                                                            ++audioRoute) {
936                                            ts << "SET CHANNEL AUDIO_OUTPUT_CHANNEL " << iChannel
937                                                    << " " << audioRoute.key()
938                                                    << " " << audioRoute.data() << endl;
939                                    }
940                                    ts << "SET CHANNEL VOLUME " << iChannel
941                                            << " " << pChannel->volume() << endl;
942                                    if (pChannel->channelMute())
943                                            ts << "SET CHANNEL MUTE " << iChannel << " 1" << endl;
944                                    if (pChannel->channelSolo())
945                                            ts << "SET CHANNEL SOLO " << iChannel << " 1" << endl;
946    #ifdef CONFIG_MIDI_INSTRUMENT
947                                    if (pChannel->midiMap() >= 0) {
948                                            ts << "SET CHANNEL MIDI_INSTRUMENT_MAP " << iChannel
949                                                    << " " << midiInstrumentMap[pChannel->midiMap()] << endl;
950                                    }
951    #endif
952                  ts << endl;                  ts << endl;
953              }              }
954          }          }
# Line 672  bool qsamplerMainForm::saveSessionFile ( Line 959  bool qsamplerMainForm::saveSessionFile (
959      // Ok. we've wrote it.      // Ok. we've wrote it.
960      file.close();      file.close();
961    
962            // We're fornerly done.
963            QApplication::restoreOverrideCursor();
964    
965      // Have we any errors?      // Have we any errors?
966      if (iErrors > 0)      if (iErrors > 0)
967          appendMessagesError(tr("Some settings could not be saved\nto \"%1\" session file.\n\nSorry.").arg(sFilename));          appendMessagesError(tr("Some settings could not be saved\nto \"%1\" session file.\n\nSorry.").arg(sFilename));
# Line 690  bool qsamplerMainForm::saveSessionFile ( Line 980  bool qsamplerMainForm::saveSessionFile (
980  }  }
981    
982    
983    // Session change receiver slot.
984    void qsamplerMainForm::sessionDirty (void)
985    {
986        // Just mark the dirty form.
987        m_iDirtyCount++;
988        // and update the form status...
989        stabilizeForm();
990    }
991    
992    
993  //-------------------------------------------------------------------------  //-------------------------------------------------------------------------
994  // qsamplerMainForm -- File Action slots.  // qsamplerMainForm -- File Action slots.
995    
# Line 743  void qsamplerMainForm::fileReset (void) Line 1043  void qsamplerMainForm::fileReset (void)
1043          return;          return;
1044    
1045      // Ask user whether he/she want's an internal sampler reset...      // Ask user whether he/she want's an internal sampler reset...
1046      if (QMessageBox::warning(this, tr("Warning"),      if (QMessageBox::warning(this,
1047                    QSAMPLER_TITLE ": " + tr("Warning"),
1048          tr("Resetting the sampler instance will close\n"          tr("Resetting the sampler instance will close\n"
1049             "all device and channel configurations.\n\n"             "all device and channel configurations.\n\n"
1050             "Please note that this operation may cause\n"             "Please note that this operation may cause\n"
1051             "temporary MIDI and Audio disruption\n\n"             "temporary MIDI and Audio disruption.\n\n"
1052             "Do you want to reset the sampler engine now?"),             "Do you want to reset the sampler engine now?"),
1053          tr("Reset"), tr("Cancel")) > 0)          tr("Reset"), tr("Cancel")) > 0)
1054          return;          return;
1055    
1056            // Trye closing the current session, first...
1057            if (!closeSession(true))
1058                    return;
1059    
1060      // Just do the reset, after closing down current session...      // Just do the reset, after closing down current session...
1061      if (closeSession(true) && ::lscp_reset_sampler(m_pClient) != LSCP_OK) {          // Do the actual sampler reset...
1062          appendMessagesClient("lscp_reset_sampler");          if (::lscp_reset_sampler(m_pClient) != LSCP_OK) {
1063          appendMessagesError(tr("Could not reset sampler instance.\n\nSorry."));                  appendMessagesClient("lscp_reset_sampler");
1064          return;                  appendMessagesError(tr("Could not reset sampler instance.\n\nSorry."));
1065      }                  return;
1066            }
1067    
1068      // Log this.      // Log this.
1069      appendMessages(tr("Sampler reset."));      appendMessages(tr("Sampler reset."));
# Line 772  void qsamplerMainForm::fileRestart (void Line 1078  void qsamplerMainForm::fileRestart (void
1078  {  {
1079      if (m_pOptions == NULL)      if (m_pOptions == NULL)
1080          return;          return;
1081            
1082      bool bRestart = true;      bool bRestart = true;
1083        
1084      // Ask user whether he/she want's a complete restart...      // Ask user whether he/she want's a complete restart...
1085      // (if we're currently up and running)      // (if we're currently up and running)
1086      if (bRestart && m_pClient) {      if (bRestart && m_pClient) {
1087          bRestart = (QMessageBox::warning(this, tr("Warning"),          bRestart = (QMessageBox::warning(this,
1088                            QSAMPLER_TITLE ": " + tr("Warning"),
1089              tr("New settings will be effective after\n"              tr("New settings will be effective after\n"
1090                 "restarting the client/server connection.\n\n"                 "restarting the client/server connection.\n\n"
1091                 "Please note that this operation may cause\n"                 "Please note that this operation may cause\n"
1092                 "temporary MIDI and Audio disruption\n\n"                 "temporary MIDI and Audio disruption.\n\n"
1093                 "Do you want to restart the connection now?"),                 "Do you want to restart the connection now?"),
1094              tr("Restart"), tr("Cancel")) == 0);              tr("Restart"), tr("Cancel")) == 0);
1095      }      }
# Line 815  void qsamplerMainForm::editAddChannel (v Line 1122  void qsamplerMainForm::editAddChannel (v
1122          return;          return;
1123    
1124      // Just create the channel instance...      // Just create the channel instance...
1125      qsamplerChannel *pChannel = new qsamplerChannel(this);      qsamplerChannel *pChannel = new qsamplerChannel();
1126      if (pChannel == NULL)      if (pChannel == NULL)
1127          return;          return;
1128    
# Line 825  void qsamplerMainForm::editAddChannel (v Line 1132  void qsamplerMainForm::editAddChannel (v
1132          delete pChannel;          delete pChannel;
1133          return;          return;
1134      }      }
1135        
1136      // And give it to the strip (will own the channel instance, if successful).      // And give it to the strip (will own the channel instance, if successful).
1137      if (!createChannelStrip(pChannel)) {      if (!createChannelStrip(pChannel)) {
1138          delete pChannel;          delete pChannel;
# Line 847  void qsamplerMainForm::editRemoveChannel Line 1154  void qsamplerMainForm::editRemoveChannel
1154      qsamplerChannelStrip *pChannelStrip = activeChannelStrip();      qsamplerChannelStrip *pChannelStrip = activeChannelStrip();
1155      if (pChannelStrip == NULL)      if (pChannelStrip == NULL)
1156          return;          return;
1157            
1158      qsamplerChannel *pChannel = pChannelStrip->channel();      qsamplerChannel *pChannel = pChannelStrip->channel();
1159      if (pChannel == NULL)      if (pChannel == NULL)
1160          return;          return;
1161    
1162      // Prompt user if he/she's sure about this...      // Prompt user if he/she's sure about this...
1163      if (m_pOptions && m_pOptions->bConfirmRemove) {      if (m_pOptions && m_pOptions->bConfirmRemove) {
1164          if (QMessageBox::warning(this, tr("Warning"),          if (QMessageBox::warning(this,
1165                            QSAMPLER_TITLE ": " + tr("Warning"),
1166              tr("About to remove channel:\n\n"              tr("About to remove channel:\n\n"
1167                 "%1\n\n"                 "%1\n\n"
1168                 "Are you sure?")                 "Are you sure?")
# Line 869  void qsamplerMainForm::editRemoveChannel Line 1177  void qsamplerMainForm::editRemoveChannel
1177    
1178      // Just delete the channel strip.      // Just delete the channel strip.
1179      delete pChannelStrip;      delete pChannelStrip;
1180        
1181      // Do we auto-arrange?      // Do we auto-arrange?
1182      if (m_pOptions && m_pOptions->bAutoArrange)      if (m_pOptions && m_pOptions->bAutoArrange)
1183          channelsArrange();          channelsArrange();
# Line 913  void qsamplerMainForm::editResetChannel Line 1221  void qsamplerMainForm::editResetChannel
1221  // Reset all sampler channels.  // Reset all sampler channels.
1222  void qsamplerMainForm::editResetAllChannels (void)  void qsamplerMainForm::editResetAllChannels (void)
1223  {  {
1224      if (m_pClient == NULL)          if (m_pClient == NULL)
1225          return;                  return;
1226    
1227      // Invoque the channel strip procedure,          // Invoque the channel strip procedure,
1228          // for all channels out there...          // for all channels out there...
1229      m_pWorkspace->setUpdatesEnabled(false);          m_pWorkspace->setUpdatesEnabled(false);
1230      QWidgetList wlist = m_pWorkspace->windowList();          QWidgetList wlist = m_pWorkspace->windowList();
1231      for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {          for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
1232          qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
1233          if (pChannelStrip)                  if (pChannelStrip)
1234                  pChannelStrip->channelReset();                          pChannelStrip->channelReset();
1235      }          }
1236      m_pWorkspace->setUpdatesEnabled(true);          m_pWorkspace->setUpdatesEnabled(true);
1237  }  }
1238    
1239    
# Line 977  void qsamplerMainForm::viewMessages ( bo Line 1285  void qsamplerMainForm::viewMessages ( bo
1285  }  }
1286    
1287    
1288    // Show/hide the MIDI instrument list-view form.
1289    void qsamplerMainForm::viewInstruments (void)
1290    {
1291            if (m_pOptions == NULL)
1292                    return;
1293    
1294            if (m_pInstrumentListForm) {
1295                    m_pOptions->saveWidgetGeometry(m_pInstrumentListForm);
1296                    if (m_pInstrumentListForm->isVisible()) {
1297                            m_pInstrumentListForm->hide();
1298                    } else {
1299                            m_pInstrumentListForm->show();
1300                            m_pInstrumentListForm->raise();
1301                            m_pInstrumentListForm->setActiveWindow();
1302                    }
1303            }
1304    }
1305    
1306    
1307    // Show/hide the device configurator form.
1308    void qsamplerMainForm::viewDevices (void)
1309    {
1310            if (m_pOptions == NULL)
1311                    return;
1312    
1313            if (m_pDeviceForm) {
1314                    m_pOptions->saveWidgetGeometry(m_pDeviceForm);
1315                    if (m_pDeviceForm->isVisible()) {
1316                            m_pDeviceForm->hide();
1317                    } else {
1318                            m_pDeviceForm->show();
1319                            m_pDeviceForm->raise();
1320                            m_pDeviceForm->setActiveWindow();
1321                    }
1322            }
1323    }
1324    
1325    
1326  // Show options dialog.  // Show options dialog.
1327  void qsamplerMainForm::viewOptions (void)  void qsamplerMainForm::viewOptions (void)
1328  {  {
# Line 1001  void qsamplerMainForm::viewOptions (void Line 1347  void qsamplerMainForm::viewOptions (void
1347          bool    bOldDisplayEffect   = m_pOptions->bDisplayEffect;          bool    bOldDisplayEffect   = m_pOptions->bDisplayEffect;
1348          int     iOldMaxVolume       = m_pOptions->iMaxVolume;          int     iOldMaxVolume       = m_pOptions->iMaxVolume;
1349          QString sOldMessagesFont    = m_pOptions->sMessagesFont;          QString sOldMessagesFont    = m_pOptions->sMessagesFont;
1350            bool    bOldKeepOnTop       = m_pOptions->bKeepOnTop;
1351          bool    bOldStdoutCapture   = m_pOptions->bStdoutCapture;          bool    bOldStdoutCapture   = m_pOptions->bStdoutCapture;
1352          int     bOldMessagesLimit   = m_pOptions->bMessagesLimit;          int     bOldMessagesLimit   = m_pOptions->bMessagesLimit;
1353          int     iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines;          int     iOldMessagesLimitLines = m_pOptions->iMessagesLimitLines;
# Line 1013  void qsamplerMainForm::viewOptions (void Line 1360  void qsamplerMainForm::viewOptions (void
1360          if (pOptionsForm->exec()) {          if (pOptionsForm->exec()) {
1361              // Warn if something will be only effective on next run.              // Warn if something will be only effective on next run.
1362              if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) ||              if (( bOldStdoutCapture && !m_pOptions->bStdoutCapture) ||
1363                  (!bOldStdoutCapture &&  m_pOptions->bStdoutCapture)) {                  (!bOldStdoutCapture &&  m_pOptions->bStdoutCapture) ||
1364                  QMessageBox::information(this, tr("Information"),                  ( bOldKeepOnTop     && !m_pOptions->bKeepOnTop)     ||
1365                    (!bOldKeepOnTop     &&  m_pOptions->bKeepOnTop)) {
1366                    QMessageBox::information(this,
1367                                            QSAMPLER_TITLE ": " + tr("Information"),
1368                      tr("Some settings may be only effective\n"                      tr("Some settings may be only effective\n"
1369                         "next time you start this program."), tr("OK"));                         "next time you start this program."), tr("OK"));
1370                  updateMessagesCapture();                  updateMessagesCapture();
# Line 1088  void qsamplerMainForm::channelsArrange ( Line 1438  void qsamplerMainForm::channelsArrange (
1438          y += iHeight;          y += iHeight;
1439      }      }
1440      m_pWorkspace->setUpdatesEnabled(true);      m_pWorkspace->setUpdatesEnabled(true);
1441        
1442      stabilizeForm();      stabilizeForm();
1443  }  }
1444    
# Line 1142  void qsamplerMainForm::helpAbout (void) Line 1492  void qsamplerMainForm::helpAbout (void)
1492      sText += tr("LSCP (liblscp) instrument_name support disabled.");      sText += tr("LSCP (liblscp) instrument_name support disabled.");
1493      sText += "</font></small><br />";      sText += "</font></small><br />";
1494  #endif  #endif
1495    #ifndef CONFIG_MUTE_SOLO
1496        sText += "<small><font color=\"red\">";
1497        sText += tr("Sampler channel Mute/Solo support disabled.");
1498        sText += "</font></small><br />";
1499    #endif
1500    #ifndef CONFIG_MIDI_INSTRUMENT
1501        sText += "<small><font color=\"red\">";
1502        sText += tr("MIDI instrument mapping support disabled.");
1503        sText += "</font></small><br />";
1504    #endif
1505      sText += "<br />\n";      sText += "<br />\n";
1506      sText += tr("Using") + ": ";      sText += tr("Using") + ": ";
1507      sText += ::lscp_client_package();      sText += ::lscp_client_package();
1508      sText += " ";      sText += " ";
1509      sText += ::lscp_client_version();      sText += ::lscp_client_version();
1510    #ifdef CONFIG_LIBGIG
1511        sText += ", ";
1512        sText += gig::libraryName().c_str();
1513        sText += " ";
1514        sText += gig::libraryVersion().c_str();
1515    #endif
1516      sText += "<br />\n";      sText += "<br />\n";
1517      sText += "<br />\n";      sText += "<br />\n";
1518      sText += tr("Website") + ": <a href=\"" QSAMPLER_WEBSITE "\">" QSAMPLER_WEBSITE "</a><br />\n";      sText += tr("Website") + ": <a href=\"" QSAMPLER_WEBSITE "\">" QSAMPLER_WEBSITE "</a><br />\n";
# Line 1169  void qsamplerMainForm::helpAbout (void) Line 1535  void qsamplerMainForm::helpAbout (void)
1535  void qsamplerMainForm::stabilizeForm (void)  void qsamplerMainForm::stabilizeForm (void)
1536  {  {
1537      // Update the main application caption...      // Update the main application caption...
1538      QString sSessioName = sessionName(m_sFilename);      QString sSessionName = sessionName(m_sFilename);
1539      if (m_iDirtyCount > 0)      if (m_iDirtyCount > 0)
1540          sSessioName += '*';          sSessionName += " *";
1541      setCaption(tr(QSAMPLER_TITLE " - [%1]").arg(sSessioName));      setCaption(tr(QSAMPLER_TITLE " - [%1]").arg(sSessionName));
1542    
1543      // Update the main menu state...      // Update the main menu state...
1544      qsamplerChannelStrip *pChannelStrip = activeChannelStrip();      qsamplerChannelStrip *pChannelStrip = activeChannelStrip();
# Line 1189  void qsamplerMainForm::stabilizeForm (vo Line 1555  void qsamplerMainForm::stabilizeForm (vo
1555      editSetupChannelAction->setEnabled(bHasChannel);      editSetupChannelAction->setEnabled(bHasChannel);
1556      editResetChannelAction->setEnabled(bHasChannel);      editResetChannelAction->setEnabled(bHasChannel);
1557      editResetAllChannelsAction->setEnabled(bHasChannel);      editResetAllChannelsAction->setEnabled(bHasChannel);
     channelsArrangeAction->setEnabled(bHasChannel);  
1558      viewMessagesAction->setOn(m_pMessages && m_pMessages->isVisible());      viewMessagesAction->setOn(m_pMessages && m_pMessages->isVisible());
1559    #ifdef CONFIG_MIDI_INSTRUMENT
1560            viewInstrumentsAction->setOn(m_pInstrumentListForm
1561                    && m_pInstrumentListForm->isVisible());
1562            viewInstrumentsAction->setEnabled(bHasClient);
1563    #endif
1564            viewDevicesAction->setOn(m_pDeviceForm
1565                    && m_pDeviceForm->isVisible());
1566        viewDevicesAction->setEnabled(bHasClient);
1567        channelsArrangeAction->setEnabled(bHasChannel);
1568    
1569      // Client/Server status...      // Client/Server status...
1570      if (bHasClient) {      if (bHasClient) {
1571          m_status[QSAMPLER_STATUS_CLIENT]->setText(tr("Connected"));          m_statusItem[QSAMPLER_STATUS_CLIENT]->setText(tr("Connected"));
1572          m_status[QSAMPLER_STATUS_SERVER]->setText(m_pOptions->sServerHost + ":" + QString::number(m_pOptions->iServerPort));          m_statusItem[QSAMPLER_STATUS_SERVER]->setText(m_pOptions->sServerHost + ":" + QString::number(m_pOptions->iServerPort));
1573      } else {      } else {
1574          m_status[QSAMPLER_STATUS_CLIENT]->clear();          m_statusItem[QSAMPLER_STATUS_CLIENT]->clear();
1575          m_status[QSAMPLER_STATUS_SERVER]->clear();          m_statusItem[QSAMPLER_STATUS_SERVER]->clear();
1576      }      }
1577      // Channel status...      // Channel status...
1578      if (bHasChannel)      if (bHasChannel)
1579          m_status[QSAMPLER_STATUS_CHANNEL]->setText(pChannelStrip->caption());          m_statusItem[QSAMPLER_STATUS_CHANNEL]->setText(pChannelStrip->caption());
1580      else      else
1581          m_status[QSAMPLER_STATUS_CHANNEL]->clear();          m_statusItem[QSAMPLER_STATUS_CHANNEL]->clear();
1582      // Session status...      // Session status...
1583      if (m_iDirtyCount > 0)      if (m_iDirtyCount > 0)
1584          m_status[QSAMPLER_STATUS_SESSION]->setText(tr("MOD"));          m_statusItem[QSAMPLER_STATUS_SESSION]->setText(tr("MOD"));
1585      else      else
1586          m_status[QSAMPLER_STATUS_SESSION]->clear();          m_statusItem[QSAMPLER_STATUS_SESSION]->clear();
1587    
1588      // Recent files menu.      // Recent files menu.
1589      m_pRecentFilesMenu->setEnabled(bHasClient && m_pOptions->recentFiles.count() > 0);      m_pRecentFilesMenu->setEnabled(bHasClient && m_pOptions->recentFiles.count() > 0);
# Line 1224  void qsamplerMainForm::stabilizeForm (vo Line 1598  void qsamplerMainForm::stabilizeForm (vo
1598  void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip *pChannelStrip )  void qsamplerMainForm::channelStripChanged( qsamplerChannelStrip *pChannelStrip )
1599  {  {
1600          // Add this strip to the changed list...          // Add this strip to the changed list...
1601          if (m_changedStrips.containsRef(pChannelStrip) == 0)          if (m_changedStrips.containsRef(pChannelStrip) == 0) {
1602                  m_changedStrips.append(pChannelStrip);                  m_changedStrips.append(pChannelStrip);
1603                    pChannelStrip->resetErrorCount();
1604            }
1605    
1606      // Just mark the dirty form.      // Just mark the dirty form.
1607      m_iDirtyCount++;      m_iDirtyCount++;
# Line 1237  void qsamplerMainForm::channelStripChang Line 1613  void qsamplerMainForm::channelStripChang
1613  // Grab and restore current sampler channels session.  // Grab and restore current sampler channels session.
1614  void qsamplerMainForm::updateSession (void)  void qsamplerMainForm::updateSession (void)
1615  {  {
1616    #ifdef CONFIG_MIDI_INSTRUMENT
1617            // FIXME: Make some room for default instrument maps...
1618            int iMaps = ::lscp_get_midi_instrument_maps(m_pClient);
1619            if (iMaps < 0)
1620                    appendMessagesClient("lscp_get_midi_instrument_maps");
1621            else if (iMaps < 1) {
1622                    ::lscp_add_midi_instrument_map(m_pClient, tr("Chromatic").latin1());
1623                    ::lscp_add_midi_instrument_map(m_pClient, tr("Drum Kits").latin1());
1624            }
1625    #endif
1626    
1627          // Retrieve the current channel list.          // Retrieve the current channel list.
1628          int *piChannelIDs = ::lscp_list_channels(m_pClient);          int *piChannelIDs = ::lscp_list_channels(m_pClient);
1629          if (piChannelIDs == NULL) {          if (piChannelIDs == NULL) {
# Line 1244  void qsamplerMainForm::updateSession (vo Line 1631  void qsamplerMainForm::updateSession (vo
1631                          appendMessagesClient("lscp_list_channels");                          appendMessagesClient("lscp_list_channels");
1632                          appendMessagesError(tr("Could not get current list of channels.\n\nSorry."));                          appendMessagesError(tr("Could not get current list of channels.\n\nSorry."));
1633                  }                  }
1634                  return;          } else {
1635                    // Try to (re)create each channel.
1636                    m_pWorkspace->setUpdatesEnabled(false);
1637                    for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) {
1638                            // Check if theres already a channel strip for this one...
1639                            if (!channelStrip(piChannelIDs[iChannel]))
1640                                    createChannelStrip(new qsamplerChannel(piChannelIDs[iChannel]));
1641                    }
1642                    m_pWorkspace->setUpdatesEnabled(true);
1643          }          }
1644    
1645          // Try to (re)create each channel.      // Do we auto-arrange?
1646          m_pWorkspace->setUpdatesEnabled(false);      if (m_pOptions && m_pOptions->bAutoArrange)
1647          for (int iChannel = 0; piChannelIDs[iChannel] >= 0; iChannel++) {          channelsArrange();
1648                  // Check if theres already a channel strip for this one...  
1649                  if (!channelStrip(piChannelIDs[iChannel]))          // Remember to refresh devices and instruments...
1650                          createChannelStrip(new qsamplerChannel(this, piChannelIDs[iChannel]));          if (m_pInstrumentListForm)
1651                  // Make it visibly responsive...              m_pInstrumentListForm->refreshInstruments();
1652                  QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);          if (m_pDeviceForm)
1653          }              m_pDeviceForm->refreshDevices();
         m_pWorkspace->setUpdatesEnabled(true);  
1654  }  }
1655    
1656    
# Line 1427  void qsamplerMainForm::appendMessagesErr Line 1821  void qsamplerMainForm::appendMessagesErr
1821    
1822      appendMessagesColor(s.simplifyWhiteSpace(), "#ff0000");      appendMessagesColor(s.simplifyWhiteSpace(), "#ff0000");
1823    
1824      QMessageBox::critical(this, tr("Error"), s, tr("Cancel"));          // Make it look responsive...:)
1825            QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
1826    
1827        QMessageBox::critical(this,
1828                    QSAMPLER_TITLE ": " + tr("Error"), s, tr("Cancel"));
1829  }  }
1830    
1831    
# Line 1440  void qsamplerMainForm::appendMessagesCli Line 1838  void qsamplerMainForm::appendMessagesCli
1838      appendMessagesColor(s + QString(": %1 (errno=%2)")      appendMessagesColor(s + QString(": %1 (errno=%2)")
1839          .arg(::lscp_client_get_result(m_pClient))          .arg(::lscp_client_get_result(m_pClient))
1840          .arg(::lscp_client_get_errno(m_pClient)), "#996666");          .arg(::lscp_client_get_errno(m_pClient)), "#996666");
1841    
1842            // Make it look responsive...:)
1843            QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
1844  }  }
1845    
1846    
# Line 1467  void qsamplerMainForm::updateMessagesLim Line 1868  void qsamplerMainForm::updateMessagesLim
1868          if (m_pOptions->bMessagesLimit)          if (m_pOptions->bMessagesLimit)
1869              m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines);              m_pMessages->setMessagesLimit(m_pOptions->iMessagesLimitLines);
1870          else          else
1871              m_pMessages->setMessagesLimit(0);              m_pMessages->setMessagesLimit(-1);
1872      }      }
1873  }  }
1874    
# Line 1511  qsamplerChannelStrip *qsamplerMainForm:: Line 1912  qsamplerChannelStrip *qsamplerMainForm::
1912      pChannelStrip = new qsamplerChannelStrip(m_pWorkspace, 0, wflags);      pChannelStrip = new qsamplerChannelStrip(m_pWorkspace, 0, wflags);
1913      if (pChannelStrip == NULL)      if (pChannelStrip == NULL)
1914          return NULL;          return NULL;
1915            
1916      // Actual channel strip setup...      // Actual channel strip setup...
1917      pChannelStrip->setup(pChannel);      pChannelStrip->setup(pChannel);
1918      QObject::connect(pChannelStrip, SIGNAL(channelChanged(qsamplerChannelStrip *)), this, SLOT(channelStripChanged(qsamplerChannelStrip *)));      QObject::connect(pChannelStrip, SIGNAL(channelChanged(qsamplerChannelStrip *)), this, SLOT(channelStripChanged(qsamplerChannelStrip *)));
# Line 1569  qsamplerChannelStrip *qsamplerMainForm:: Line 1970  qsamplerChannelStrip *qsamplerMainForm::
1970          QWidgetList wlist = m_pWorkspace->windowList();          QWidgetList wlist = m_pWorkspace->windowList();
1971          if (wlist.isEmpty())          if (wlist.isEmpty())
1972                  return NULL;                  return NULL;
1973            
1974          for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {          for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {
1975                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);
1976                  if (pChannelStrip) {                  if (pChannelStrip) {
# Line 1650  void qsamplerMainForm::timerSlot (void) Line 2051  void qsamplerMainForm::timerSlot (void)
2051              }              }
2052          }          }
2053      }      }
2054        
2055          // Refresh each channel usage, on each period...          if (m_pClient) {
2056      if (m_pClient && (m_changedStrips.count() > 0 || m_pOptions->bAutoRefresh)) {                  // Update the channel information for each pending strip...
2057          m_iTimerSlot += QSAMPLER_TIMER_MSECS;                  if (m_changedStrips.count() > 0) {
2058          if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime && m_pWorkspace->isUpdatesEnabled())  {                          for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first();
2059              m_iTimerSlot = 0;                                          pChannelStrip; pChannelStrip = m_changedStrips.next()) {
             // Update the channel information for each pending strip...  
             for (qsamplerChannelStrip *pChannelStrip = m_changedStrips.first();  
                     pChannelStrip;  
                                                 pChannelStrip = m_changedStrips.next()) {  
2060                                  // If successfull, remove from pending list...                                  // If successfull, remove from pending list...
2061                                  if (pChannelStrip->updateChannelInfo())                                  if (pChannelStrip->updateChannelInfo())
2062                      m_changedStrips.remove(pChannelStrip);                                          m_changedStrips.remove(pChannelStrip);
2063                          }                          }
2064              // Update the channel stream usage for each strip...                  }
2065              QWidgetList wlist = m_pWorkspace->windowList();                  // Refresh each channel usage, on each period...
2066              for (int iChannel = 0; iChannel < (int) wlist.count(); iChannel++) {                  if (m_pOptions->bAutoRefresh) {
2067                  qsamplerChannelStrip *pChannelStrip = (qsamplerChannelStrip *) wlist.at(iChannel);                          m_iTimerSlot += QSAMPLER_TIMER_MSECS;
2068                  if (pChannelStrip && pChannelStrip->isVisible())                          if (m_iTimerSlot >= m_pOptions->iAutoRefreshTime)  {
2069                      pChannelStrip->updateChannelUsage();                                  m_iTimerSlot = 0;
2070              }                                  // Update the channel stream usage for each strip...
2071          }                                  QWidgetList wlist = m_pWorkspace->windowList();
2072      }                                  for (int iChannel = 0;
2073                                                    iChannel < (int) wlist.count(); iChannel++) {
2074                                            qsamplerChannelStrip *pChannelStrip
2075                                                    = (qsamplerChannelStrip *) wlist.at(iChannel);
2076                                            if (pChannelStrip && pChannelStrip->isVisible())
2077                                                    pChannelStrip->updateChannelUsage();
2078                                    }
2079                            }
2080                    }
2081            }
2082    
2083      // Register the next timer slot.      // Register the next timer slot.
2084      QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot()));      QTimer::singleShot(QSAMPLER_TIMER_MSECS, this, SLOT(timerSlot()));
# Line 1694  void qsamplerMainForm::startServer (void Line 2100  void qsamplerMainForm::startServer (void
2100    
2101      // Is the server process instance still here?      // Is the server process instance still here?
2102      if (m_pServer) {      if (m_pServer) {
2103          switch (QMessageBox::warning(this, tr("Warning"),          switch (QMessageBox::warning(this,
2104                            QSAMPLER_TITLE ": " + tr("Warning"),
2105              tr("Could not start the LinuxSampler server.\n\n"              tr("Could not start the LinuxSampler server.\n\n"
2106                 "Maybe it ss already started."),                 "Maybe it ss already started."),
2107              tr("Stop"), tr("Kill"), tr("Cancel"))) {              tr("Stop"), tr("Kill"), tr("Cancel"))) {
# Line 1853  bool qsamplerMainForm::startClient (void Line 2260  bool qsamplerMainForm::startClient (void
2260      ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout);      ::lscp_client_set_timeout(m_pClient, m_pOptions->iServerTimeout);
2261      appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient)));      appendMessages(tr("Client receive timeout is set to %1 msec.").arg(::lscp_client_get_timeout(m_pClient)));
2262    
2263            // Subscribe to channel info change notifications...
2264            if (::lscp_client_subscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO) != LSCP_OK)
2265                    appendMessagesClient("lscp_client_subscribe");
2266    
2267      // We may stop scheduling around.      // We may stop scheduling around.
2268      stopSchedule();      stopSchedule();
2269    
# Line 1862  bool qsamplerMainForm::startClient (void Line 2273  bool qsamplerMainForm::startClient (void
2273      // Log success here.      // Log success here.
2274      appendMessages(tr("Client connected."));      appendMessages(tr("Client connected."));
2275    
2276            // Hard-notify instrumnet and device configuration forms,
2277            // if visible, that we're ready...
2278            if (m_pInstrumentListForm)
2279                m_pInstrumentListForm->refreshInstruments();
2280            if (m_pDeviceForm)
2281                m_pDeviceForm->refreshDevices();
2282    
2283      // Is any session pending to be loaded?      // Is any session pending to be loaded?
2284      if (!m_pOptions->sSessionFile.isEmpty()) {      if (!m_pOptions->sSessionFile.isEmpty()) {
2285          // Just load the prabably startup session...          // Just load the prabably startup session...
# Line 1896  void qsamplerMainForm::stopClient (void) Line 2314  void qsamplerMainForm::stopClient (void)
2314      // channels from the back-end server.      // channels from the back-end server.
2315      m_iDirtyCount = 0;      m_iDirtyCount = 0;
2316      closeSession(false);      closeSession(false);
2317        
2318      // Close us as a client...      // Close us as a client...
2319      lscp_client_destroy(m_pClient);          ::lscp_client_unsubscribe(m_pClient, LSCP_EVENT_CHANNEL_INFO);
2320        ::lscp_client_destroy(m_pClient);
2321      m_pClient = NULL;      m_pClient = NULL;
2322    
2323            // Hard-notify instrumnet and device configuration forms,
2324            // if visible, that we're running out...
2325            if (m_pInstrumentListForm)
2326                m_pInstrumentListForm->refreshInstruments();
2327            if (m_pDeviceForm)
2328                m_pDeviceForm->refreshDevices();
2329    
2330      // Log final here.      // Log final here.
2331      appendMessages(tr("Client disconnected."));      appendMessages(tr("Client disconnected."));
2332    

Legend:
Removed from v.404  
changed lines
  Added in v.1013

  ViewVC Help
Powered by ViewVC