Use same macro for hiding video record button and keybinding
authorMitchell Kember <mk12360@gmail.com>
Fri, 30 Nov 2012 15:29:09 -0500
changeset 8147 53190e590919
parent 8144 f3ba33d5d2b1
child 8149 237802cf4610
Use same macro for hiding video record button and keybinding Modified my previous patch to use the already-in-place VIDEOREC macro (used previously just for hiding the button on the main menu) instead of creating another one. https://google-melange.appspot.com/gci/task/view/google/gci2012/7948213
QTfrontend/CMakeLists.txt
QTfrontend/binds.cpp
QTfrontend/binds.h
--- a/QTfrontend/CMakeLists.txt	Thu Nov 29 19:44:18 2012 -0500
+++ b/QTfrontend/CMakeLists.txt	Fri Nov 30 15:29:09 2012 -0500
@@ -21,7 +21,7 @@
 if(NOT NOVIDEOREC)
     find_package(FFMPEG)
     if(${FFMPEG_FOUND})
-        add_definitions(-DUSE_VIDEO_RECORDING)
+        add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS)
     endif()
 endif()
 
@@ -69,10 +69,6 @@
 file(GLOB_RECURSE UIcpp ui/*.cpp)
 file(GLOB UtilCpp util/*.cpp)
 
-if(${FFMPEG_FOUND})
-    add_definitions(-DVIDEOREC -D__STDC_CONSTANT_MACROS)
-endif()
-
 set(hwfr_src
     ${ModelCpp}
     ${NetCpp}
--- a/QTfrontend/binds.cpp	Thu Nov 29 19:44:18 2012 -0500
+++ b/QTfrontend/binds.cpp	Fri Nov 30 15:29:09 2012 -0500
@@ -66,7 +66,7 @@
     {"fullscr",   "f12",        QT_TRANSLATE_NOOP("binds", "change mode"),     NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle fullscreen mode:")},
     {"capture",   "c",          QT_TRANSLATE_NOOP("binds", "capture"),         NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Take a screenshot:")},
     {"rotmask",   "delete",     QT_TRANSLATE_NOOP("binds", "hedgehogs\ninfo"), NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Toggle labels above hedgehogs:")},
-#ifdef USE_VIDEO_RECORDING
+#ifdef VIDEOREC
     {"record",    "r",          QT_TRANSLATE_NOOP("binds", "record"),          NULL, QT_TRANSLATE_NOOP("binds (descriptions)", "Record video:")}
 #endif
 };
--- a/QTfrontend/binds.h	Thu Nov 29 19:44:18 2012 -0500
+++ b/QTfrontend/binds.h	Fri Nov 30 15:29:09 2012 -0500
@@ -21,7 +21,7 @@
 
 #include <QString>
 
-#ifdef USE_VIDEO_RECORDING
+#ifdef VIDEOREC
 #define BINDS_NUMBER 46
 #else
 #define BINDS_NUMBER 45