]> git.sesse.net Git - kdenlive/commitdiff
jogshuttle: jogshuttle less build fixed
authorEd Rogalsky <ed.rogalsky@googlemail.com>
Thu, 6 Mar 2014 22:05:29 +0000 (23:05 +0100)
committerEd Rogalsky <ed.rogalsky@googlemail.com>
Thu, 6 Mar 2014 22:05:29 +0000 (23:05 +0100)
src/CMakeLists.txt
src/kdenlivesettingsdialog.cpp
src/lib/external/media_ctrl/CMakeLists.txt

index 5a0098fa9cda86157cb875a5efcfa9629ef07807..b74ca370779ca311af1f41a9622dfd43193bf370 100644 (file)
@@ -322,6 +322,12 @@ target_link_libraries(kdenlive
   ${CMAKE_THREAD_LIBS_INIT}
 )
 
+if(BUILD_JogShuttle)
+  target_link_libraries(kdenlive
+    ${CMAKE_SOURCE_DIR}/lib/libmedia_ctrl.a
+  )
+endif(BUILD_JogShuttle)
+
 if(Q_WS_X11)
   include_directories(${X11_Xlib_INCLUDE_PATH})
   target_link_libraries(kdenlive ${X11_LIBRARIES})
index cbcdbb032d93af147146488cf4d25338e54fc5f9..e64753b3b08b389254e2d617ac4943cffa3addaa 100644 (file)
@@ -341,6 +341,7 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(QString device)
         list1[i]->hide();
     }
 
+#ifdef USE_JOGSHUTTLE
     int keysCount = JogShuttle::keysCount(device);
 
     for (int i = 0; i < keysCount; i++) {
@@ -353,7 +354,22 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(QString device)
     // according to the user-selected language, so they do not appear in random order.
     QMap<QString, QString> mappable_actions(m_mappable_actions);
     QList<QString> action_names = mappable_actions.keys();
+    QList<QString>::Iterator iter = action_names.begin();
+    kDebug() << "::::::::::::::::";
+    while (iter != action_names.end()) {
+        kDebug() << *iter;
+        ++iter;
+    }
+
+    kDebug() << "::::::::::::::::";
+
     qSort(action_names);
+    iter = action_names.begin();
+    while (iter != action_names.end()) {
+        kDebug() << *iter;
+        ++iter;
+    }
+    kDebug() << "::::::::::::::::";
 
     // Here we need to compute the action_id -> index-in-action_names. We iterate over the
     // action_names, as the sorting may depend on the user-language.
@@ -377,7 +393,7 @@ void KdenliveSettingsDialog::setupJogshuttleBtns(QString device)
         if (i < actions_map.size())
             button->setCurrentIndex(action_pos[actions_map[i]]);
     }
-
+#endif
 }
 
 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
@@ -1217,7 +1233,7 @@ void KdenliveSettingsDialog::slotReloadShuttleDevices()
     KdenliveSettings::setShuttledevicepaths(devPathList);
     QTimer::singleShot(200, this, SLOT(slotUpdateShuttleDevice()));
 
-    kDebug() << "Devices reloded";
+    kDebug() << "Devices reloaded";
 
 #endif //USE_JOGSHUTTLE
 }
index dc2b28533f10f9d68b44edb62104dd8cbfa8b924..0fa60d1baf41e7abc59009ec9957e195e8ccf55d 100644 (file)
@@ -1,17 +1,10 @@
-set(kdenlive_SRCS
-  ${kdenlive_SRCS}
-  lib/external/media_ctrl/mediactrl.h
-  lib/external/media_ctrl/mediactrl.c
-  PARENT_SCOPE
-)
-
-
-# Create a static library from media_ctrl
-#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
-#include_directories(
-#  ${CMAKE_BINARY_DIR}
-#)
-#add_library(media_ctrl STATIC
-#  mediactrl.h
-#  mediactrl.c
-#)
+if(BUILD_JogShuttle)
+  # Create a static library media_ctrl
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --std=c99")
+  include_directories(
+    ${CMAKE_BINARY_DIR}
+  )
+  add_library(media_ctrl STATIC
+    mediactrl.c
+  )
+endif(BUILD_JogShuttle)