summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Rogalsky <ed.rogalsky@googlemail.com>2014-03-06 22:05:29 (GMT)
committerEd Rogalsky <ed.rogalsky@googlemail.com>2014-03-06 22:05:29 (GMT)
commitaec01436823fc842d7bf7158e79bac84c1521552 (patch)
tree5aa7b83e01160f9cd52b3e3351dba1b239cfe770
parentf5977736d9ff8860798eaaf9de79ef1cfff0bf83 (diff)
jogshuttle: jogshuttle less build fixed
-rw-r--r--src/CMakeLists.txt6
-rw-r--r--src/kdenlivesettingsdialog.cpp20
-rw-r--r--src/lib/external/media_ctrl/CMakeLists.txt27
3 files changed, 34 insertions, 19 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5a0098f..b74ca37 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -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})
diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp
index cbcdbb0..e64753b 100644
--- a/src/kdenlivesettingsdialog.cpp
+++ b/src/kdenlivesettingsdialog.cpp
@@ -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
}
diff --git a/src/lib/external/media_ctrl/CMakeLists.txt b/src/lib/external/media_ctrl/CMakeLists.txt
index dc2b285..0fa60d1 100644
--- a/src/lib/external/media_ctrl/CMakeLists.txt
+++ b/src/lib/external/media_ctrl/CMakeLists.txt
@@ -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)