From: Ed Rogalsky Date: Thu, 6 Mar 2014 22:05:29 +0000 (+0100) Subject: jogshuttle: jogshuttle less build fixed X-Git-Url: https://git.sesse.net/?p=kdenlive;a=commitdiff_plain;h=aec01436823fc842d7bf7158e79bac84c1521552 jogshuttle: jogshuttle less build fixed --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5a0098fa..b74ca370 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 cbcdbb03..e64753b3 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 mappable_actions(m_mappable_actions); QList action_names = mappable_actions.keys(); + QList::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 dc2b2853..0fa60d1b 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)