]> git.sesse.net Git - kdenlive/commitdiff
Add cmake option -DNO_JOGSHUTTLE=1 to disable compilation of jogshuttle stuff, patch...
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 23 Oct 2008 18:27:27 +0000 (18:27 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 23 Oct 2008 18:27:27 +0000 (18:27 +0000)
svn path=/branches/KDE4/; revision=2547

src/CMakeLists.txt
src/kdenlivesettingsdialog.cpp
src/kdenlivesettingsdialog.h
src/mainwindow.cpp
src/mainwindow.h
src/widgets/configjogshuttle_ui.ui

index 22ed37b63f6d9f9182722434583be5875cb0ea1e..98a7fc47b3e749e00e7e9f558ba405eed37ed839 100644 (file)
@@ -109,7 +109,6 @@ set(kdenlive_SRCS
   abstractclipitem.cpp
   transitionsettings.cpp
   recmonitor.cpp
-  jogshuttle.cpp
   addtransitioncommand.cpp
   edittransitioncommand.cpp
   addfoldercommand.cpp
@@ -134,6 +133,12 @@ set(kdenlive_SRCS
   editclipcommand.cpp
 )
 
+if(NO_JOGSHUTTLE)
+  add_definitions(-DNO_JOGSHUTTLE)
+else(NO_JOGSHUTTLE)
+  set(kdenlive_SRCS jogshuttle.cpp ${kdenlive_SRCS})
+endif(NO_JOGSHUTTLE)
+
 kde4_add_kcfg_files(kdenlive_SRCS GENERATE_MOC kdenlivesettings.kcfgc )
 
 kde4_add_executable(kdenlive ${kdenlive_SRCS} ${kdenlive_UI})
index 29977181d5a5ff3fb8255bd1d6302d75b7346258..73b07d20de6bf802b3cbbad0701e0001b0ff2e8e 100644 (file)
@@ -28,7 +28,9 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
+#ifndef NO_JOGSHUTTLE
 #include <linux/input.h>
+#endif /* NO_JOGSHUTTLE */
 
 #include "profilesdialog.h"
 #include "kdenlivesettings.h"
@@ -62,9 +64,15 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
 
     QWidget *p5 = new QWidget;
     m_configShuttle.setupUi(p5);
+#ifndef NO_JOGSHUTTLE
     connect(m_configShuttle.kcfg_enableshuttle, SIGNAL(stateChanged(int)), this, SLOT(slotCheckShuttle(int)));
     connect(m_configShuttle.shuttledevicelist, SIGNAL(activated(int)), this, SLOT(slotUpdateShuttleDevice(int)));
     slotCheckShuttle(KdenliveSettings::enableshuttle());
+    m_configShuttle.shuttledisabled->hide();
+#else
+    m_configShuttle.kcfg_enableshuttle->hide();
+    m_configShuttle.kcfg_enableshuttle->setDisabled(true);
+#endif /* NO_JOGSHUTTLE */
     page5 = addPage(p5, i18n("JogShuttle"), "input-mouse");
 
     QWidget *p6 = new QWidget;
@@ -241,6 +249,7 @@ void KdenliveSettingsDialog::slotEditImageApplication() {
     m_configEnv.kcfg_defaultimageapp->setText(service->exec());
 }
 
+#ifndef NO_JOGSHUTTLE
 void KdenliveSettingsDialog::slotCheckShuttle(int state) {
     m_configShuttle.config_group->setEnabled(state);
     if (m_configShuttle.shuttledevicelist->count() == 0) {
@@ -267,6 +276,7 @@ void KdenliveSettingsDialog::slotUpdateShuttleDevice(int ix) {
     //KdenliveSettings::setShuttledevice(device);
     m_configShuttle.kcfg_shuttledevice->setText(device);
 }
+#endif /* NO_JOGSHUTTLE */
 
 void KdenliveSettingsDialog::rebuildVideo4Commands() {
     QString captureCommand;
index 7fad4d6e18b44595c8142ac5972fb4407ef771d6..fa513b7229e6c8bb0477ef7c85a1f2c705a69870 100644 (file)
@@ -48,8 +48,10 @@ public:
 private slots:
     void slotUpdateDisplay();
     void rebuildVideo4Commands();
+#ifndef NO_JOGSHUTTLE
     void slotCheckShuttle(int state = 0);
     void slotUpdateShuttleDevice(int ix = 0);
+#endif /* NO_JOGSHUTTLE */
     void slotEditImageApplication();
     void slotEditAudioApplication();
     void slotEditVideoApplication();
index b684b9497ae3bdf892ff47b26fc9b43fc9ec2f72..e7d04b83387d82fc1730d920208f5fa82d004377 100644 (file)
@@ -74,7 +74,9 @@
 #include "transitionsettings.h"
 #include "renderwidget.h"
 #include "renderer.h"
+#ifndef NO_JOGSHUTTLE
 #include "jogshuttle.h"
+#endif /* NO_JOGSHUTTLE */
 #include "clipproperties.h"
 #include "wizard.h"
 #include "editclipcommand.h"
@@ -98,7 +100,11 @@ EffectsList MainWindow::transitions;
 
 MainWindow::MainWindow(const QString &MltPath, QWidget *parent)
         : KXmlGuiWindow(parent),
-        m_activeDocument(NULL), m_activeTimeline(NULL), m_renderWidget(NULL), m_jogProcess(NULL), m_findActivated(false), m_initialized(false) {
+        m_activeDocument(NULL), m_activeTimeline(NULL), m_renderWidget(NULL),
+#ifndef NO_JOGSHUTTLE
+       m_jogProcess(NULL),
+#endif /* NO_JOGSHUTTLE */
+       m_findActivated(false), m_initialized(false) {
     setlocale(LC_NUMERIC, "POSIX");
     setFont(KGlobalSettings::toolBarFont());
     parseProfiles(MltPath);
@@ -329,7 +335,9 @@ MainWindow::MainWindow(const QString &MltPath, QWidget *parent)
         newFile(false);
     }
 
+#ifndef NO_JOGSHUTTLE
     activateShuttleDevice();
+#endif /* NO_JOGSHUTTLE */
     projectListDock->raise();
 }
 
@@ -385,6 +393,7 @@ void MainWindow::slotReloadEffects() {
     m_effectList->reloadEffectList();
 }
 
+#ifndef NO_JOGSHUTTLE
 void MainWindow::activateShuttleDevice() {
     if (m_jogProcess) delete m_jogProcess;
     m_jogProcess = NULL;
@@ -430,6 +439,7 @@ void MainWindow::slotShuttleAction(int code) {
         break;
     }
 }
+#endif /* NO_JOGSHUTTLE */
 
 void MainWindow::configureNotifications() {
     KNotifyConfigWidget::configure(this);
@@ -1355,7 +1365,9 @@ void MainWindow::updateConfiguration() {
     }
     m_buttonAudioThumbs->setChecked(KdenliveSettings::audiothumbnails());
     m_buttonVideoThumbs->setChecked(KdenliveSettings::videothumbnails());
+#ifndef NO_JOGSHUTTLE
     activateShuttleDevice();
+#endif /* NO_JOGSHUTTLE */
 
 }
 
index ed672aaa13f4c51fb4f75955999a8fbeca85283f..477c155663a1741befe1ac2716d44e077068c416 100644 (file)
@@ -53,7 +53,9 @@ class Monitor;
 class RecMonitor;
 class CustomTrackView;
 class RenderWidget;
+#ifndef NO_JOGSHUTTLE
 class JogShuttle;
+#endif /* NO_JOGSHUTTLE */
 class DocClipBase;
 class Render;
 
@@ -132,7 +134,9 @@ private:
 
     RenderWidget *m_renderWidget;
 
+#ifndef NO_JOGSHUTTLE
     JogShuttle *m_jogProcess;
+#endif /* NO_JOGSHUTTLE */
 
     KRecentFilesAction *m_fileOpenRecent;
     KAction *m_projectSearch;
@@ -158,8 +162,10 @@ private:
 
     void readOptions();
     void saveOptions();
+#ifndef NO_JOGSHUTTLE
     void activateShuttleDevice();
     void slotShuttleAction(int code);
+#endif /* NO_JOGSHUTTLE */
     void connectDocumentInfo(KdenliveDoc *doc);
     void findAhead();
     void doOpenFile(const KUrl &url, KAutoSaveFile *stale);
@@ -212,7 +218,9 @@ private slots:
     void slotAddCustomEffect(QAction *result);
     void slotAddTransition(QAction *result);
     void slotAddProjectClip(KUrl url);
+#ifndef NO_JOGSHUTTLE
     void slotShuttleButton(int code);
+#endif /* NO_JOGSHUTTLE */
     void slotShowClipProperties(DocClipBase *clip);
     void slotActivateEffectStackView();
     void slotActivateTransitionView();
index 9abb022f395f59a34b05fa485e32549ef8f9dec0..d3f6c111a11b18a54982e2990e74ff56eba004d2 100644 (file)
     </widget>
    </item>
    <item row="1" column="0" >
+    <widget class="QLabel" name="shuttledisabled" >
+     <property name="text" >
+      <string>Jog Shuttle device disabled.</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
     <widget class="QGroupBox" name="config_group" >
      <property name="enabled" >
       <bool>false</bool>
      </layout>
     </widget>
    </item>
-   <item row="2" column="0" >
+   <item row="3" column="0" >
     <spacer name="verticalSpacer" >
      <property name="orientation" >
       <enum>Qt::Vertical</enum>