Fix TIVI-2144 : current version of elementary 1.7 define the popup class type as... 75/15175/1 accepted/tizen/generic/20140116.170345 accepted/tizen/ivi/20140116.221253 accepted/tizen/mobile/20140116.163440 submit/tizen/20140116.162235
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Thu, 16 Jan 2014 15:22:59 +0000 (16:22 +0100)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Thu, 16 Jan 2014 15:35:31 +0000 (16:35 +0100)
Add define to allow the compilation with elementary 1.7.8 & 1.8.X

Change-Id: I7acecc2495ff2d213e864b953b652763b788868d
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
src/view/common/view_logic_certificate_support.cpp
src/view/common/view_logic_security_origin_support.cpp
src/view/webkit/view_logic_usermedia_support.cpp

index dea29fb..fe08186 100644 (file)
 #include <widget_string.h>
 #include <common/view_logic_get_parent_window_util.h>
 
+#if (ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 7)
+#define POPUP_CLASSNAME "popup"
+#else
+//#if ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 8)
+#define POPUP_CLASSNAME "elm_popup"
+#endif
 namespace ViewModule {
 namespace {
 const double MAX_POPUP_HEIGHT = 0.80;
@@ -219,7 +225,7 @@ Evas_Object* CertificateSupportUtil::getPopup(Evas_Object* button)
     Assert(button);
 
     Evas_Object* popup = button;
-    while (strcmp(elm_object_widget_type_get(popup), "elm_popup")) {
+    while (strcmp(elm_object_widget_type_get(popup), POPUP_CLASSNAME)) {
         popup = elm_object_parent_widget_get(popup);
         if (!popup) {
             return NULL;
@@ -231,7 +237,7 @@ Evas_Object* CertificateSupportUtil::getPopup(Evas_Object* button)
 Evas_Object* CertificateSupportUtil::getCheck(Evas_Object* popup)
 {
     Assert(popup);
-    if (strcmp(elm_object_widget_type_get(popup), "elm_popup")) {
+    if (strcmp(elm_object_widget_type_get(popup), POPUP_CLASSNAME)) {
         return NULL;
     }
     Evas_Object* check = elm_object_part_content_get(
index baa4cde..e06115e 100644 (file)
 #include <widget_string.h>
 #include <common/view_logic_get_parent_window_util.h>
 
+
+#if (ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 7)
+#define POPUP_CLASSNAME "popup"
+#else
+//#if ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 8)
+#define POPUP_CLASSNAME "elm_popup"
+#endif
 namespace ViewModule {
 namespace {
 const double MAX_POPUP_HEIGHT = 0.80;
@@ -214,7 +221,7 @@ Evas_Object* SecurityOriginSupportUtil::getPopup(Evas_Object* button)
     Assert(button);
 
     Evas_Object* popup = button;
-    while (strcmp(elm_object_widget_type_get(popup), "elm_popup")) {
+    while (strcmp(elm_object_widget_type_get(popup), POPUP_CLASSNAME )) {
         popup = elm_object_parent_widget_get(popup);
         if (!popup) {
             return NULL;
@@ -226,7 +233,7 @@ Evas_Object* SecurityOriginSupportUtil::getPopup(Evas_Object* button)
 Evas_Object* SecurityOriginSupportUtil::getCheck(Evas_Object* popup)
 {
     Assert(popup);
-    if (strcmp(elm_object_widget_type_get(popup), "elm_popup")) {
+    if (strcmp(elm_object_widget_type_get(popup), POPUP_CLASSNAME )) {
         return NULL;
     }
     Evas_Object* check = elm_object_part_content_get(
index 7e1adde..cc5a76c 100755 (executable)
 #include <common/view_logic_security_origin_support.h>
 #include <common/view_logic_get_parent_window_util.h>
 
+#if (ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 7)
+#define POPUP_CLASSNAME "popup"
+#else
+//#if ELM_VERSION_MAJOR == 1 && ELM_VERSION_MINOR == 8)
+#define POPUP_CLASSNAME "elm_popup"
+#endif
+
 namespace ViewModule {
 using namespace SecurityOriginDB;
 using namespace ViewModule::SecurityOriginSupportUtil;
@@ -68,7 +75,7 @@ Evas_Object* getPopup(Evas_Object* button)
     Assert(button);
 
     Evas_Object* popup = button;
-    while (strcmp(elm_object_widget_type_get(popup), "elm_popup")) {
+    while (strcmp(elm_object_widget_type_get(popup), POPUP_CLASSNAME)) {
         popup = elm_object_parent_widget_get(popup);
         if (!popup) {
             return NULL;