diff main/MainWindow.cpp @ 220:474ddd0f4bb4

* Remove sharpen button as well, when using RubberBand (because it isn't connected up anyway)
author Chris Cannam
date Thu, 29 Nov 2007 10:50:13 +0000
parents 0f635e16881d
children 0ebfc1e392f1
line wrap: on
line diff
--- a/main/MainWindow.cpp	Wed Nov 28 17:45:37 2007 +0000
+++ b/main/MainWindow.cpp	Thu Nov 29 10:50:13 2007 +0000
@@ -219,6 +219,7 @@
 
     IconLoader il;
 
+#ifndef HAVE_RUBBERBAND
     m_playSharpen = new NotifyingPushButton(frame);
     m_playSharpen->setToolTip(tr("Sharpen percussive transients"));
     m_playSharpen->setFixedSize(20, 20);
@@ -230,7 +231,6 @@
     connect(m_playSharpen, SIGNAL(mouseEntered()), this, SLOT(mouseEnteredWidget()));
     connect(m_playSharpen, SIGNAL(mouseLeft()), this, SLOT(mouseLeftWidget()));
 
-#ifndef HAVE_RUBBERBAND
     m_playMono = new NotifyingPushButton(frame);
     m_playMono->setToolTip(tr("Run time stretcher in mono only"));
     m_playMono->setFixedSize(20, 20);
@@ -245,8 +245,8 @@
 
     QSettings settings;
     settings.beginGroup("MainWindow");
+#ifndef HAVE_RUBBERBAND
     m_playSharpen->setChecked(settings.value("playsharpen", true).toBool());
-#ifndef HAVE_RUBBERBAND
     m_playMono->setChecked(settings.value("playmono", false).toBool());
 #endif
     settings.endGroup();
@@ -256,14 +256,15 @@
     layout->addWidget(m_overview, 1, 0);
     layout->addWidget(m_fader, 1, 1);
     layout->addWidget(m_playSpeed, 1, 2);
+#ifndef HAVE_RUBBERBAND
     layout->addWidget(m_playSharpen, 1, 3);
-#ifndef HAVE_RUBBERBAND
     layout->addWidget(m_playMono, 1, 4);
 #endif
 
     m_paneStack->setPropertyStackMinWidth
-        (m_fader->width() + m_playSpeed->width() + m_playSharpen->width()
+        (m_fader->width() + m_playSpeed->width()
 #ifndef HAVE_RUBBERBAND
+         + m_playSharpen->width()
          + m_playMono->width()
 #endif
          + layout->spacing() * 4);
@@ -3019,12 +3020,12 @@
                            .arg(pc));
     }
 
+#ifdef HAVE_RUBBERBAND
+    bool mono = false;
+    bool sharpen = true;
+#else
     m_playSharpen->setEnabled(something);
     bool sharpen = (something && m_playSharpen->isChecked());
-
-#ifdef HAVE_RUBBERBAND
-    bool mono = false;
-#else
     m_playMono->setEnabled(something);
     bool mono = (something && m_playMono->isChecked());
 #endif
@@ -3034,6 +3035,7 @@
     updateMenuStates();
 }
 
+#ifndef HAVE_RUBBERBAND
 void
 MainWindow::playSharpenToggled()
 {
@@ -3045,7 +3047,6 @@
     playSpeedChanged(m_playSpeed->value());
 }
 
-#ifndef HAVE_RUBBERBAND
 void
 MainWindow::playMonoToggled()
 {
@@ -3313,9 +3314,9 @@
         contextHelpChanged(tr("Adjust the master playback level"));
     } else if (w == m_playSpeed) {
         contextHelpChanged(tr("Adjust the master playback speed"));
+#ifndef HAVE_RUBBERBAND
     } else if (w == m_playSharpen && w->isEnabled()) {
         contextHelpChanged(tr("Toggle transient sharpening for playback time scaling"));
-#ifndef HAVE_RUBBERBAND
     } else if (w == m_playMono && w->isEnabled()) {
         contextHelpChanged(tr("Toggle mono mode for playback time scaling"));
 #endif