Remove profile dependency 56/100156/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Thu, 24 Nov 2016 08:24:45 +0000 (17:24 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Thu, 24 Nov 2016 10:21:50 +0000 (19:21 +0900)
Change-Id: I7637ba97a14993911b553ca0e3dc55349a84575c
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
packaging/libscl-ui.spec
scl/sclcontext.cpp
scl/sclevents.cpp

index c77978f..162a7a9 100644 (file)
@@ -43,21 +43,6 @@ A devel package of libscl-ui library that helps developing S/W Keyboard
 rm -rf CMakeFiles
 rm -rf CMakeCache.txt
 
-%if "%{profile}" == "wearable"
-CFLAGS+=" -D_WEARABLE";
-CXXFLAGS+=" -D_WEARABLE";
-%endif
-
-%if "%{profile}" == "mobile"
-CFLAGS+=" -D_MOBILE";
-CXXFLAGS+=" -D_MOBILE";
-%endif
-
-%if "%{profile}" == "tv"
-CFLAGS+=" -D_TV";
-CXXFLAGS+=" -D_TV";
-%endif
-
 %if %{with wayland}
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -Dwith_wayland=TRUE
 %else
index 919bbb6..c18bea9 100644 (file)
@@ -71,11 +71,7 @@ CSCLContext::reset()
     m_sounce_enabled = TRUE;
     m_vibration_enabled = TRUE;
     m_shift_multi_touch_enabled = TRUE;
-#ifdef _TV
-    m_highlight_ui_enabled = TRUE;
-#else
     m_highlight_ui_enabled = FALSE;
-#endif
     m_highlight_ui_animation_enabled = FALSE;
 
     m_tts_enabled = FALSE;
index 8c221fe..12c8639 100644 (file)
@@ -117,9 +117,10 @@ CSCLEvents::get_touch_event_offset()
 sclboolean
 CSCLEvents::process_key_event(const char *key)
 {
-#ifndef _TV
-    return FALSE;
-#endif
+    CSCLContext *context = CSCLContext::get_instance();
+    if (context && context->get_highlight_ui_enabled())
+        return FALSE;
+
     const char *keyname = key;
     LOGD("=-=-=-=- key_pressed \n");
     CSCLController *controller = CSCLController::get_instance();