Resolve efl-theme 6.0 genlist issue 92/236392/4 accepted/tizen/unified/20200622.134504 submit/tizen/20200619.124757
authorAmritanshu <a.pandia1@samsung.com>
Tue, 16 Jun 2020 18:04:09 +0000 (23:34 +0530)
committerAmritanshu <a.pandia1@samsung.com>
Fri, 19 Jun 2020 12:24:40 +0000 (17:54 +0530)
Change-Id: I808d74f161880928e96bf43b9d79d13c5a03c262
Signed-off-by: Amritanshu <a.pandia1@samsung.com>
inc/worldclock_util.h
packaging/worldclock-efl.spec
src/CMakeLists.txt
src/worldclock_add_view.c [changed mode: 0644->0755]
src/worldclock_util.c

index 40f3dac..f88f813 100644 (file)
 #include <Elementary.h>
 #include <unicode/umachine.h>
 #include "worldclock.h"
+#include <system_info.h>
+
+typedef enum {
+       TIZEN_PROFILE_UNKNOWN = 0,
+       TIZEN_PROFILE_MOBILE = 0x1,
+       TIZEN_PROFILE_WEARABLE = 0x2,
+       TIZEN_PROFILE_TV = 0x4,
+       TIZEN_PROFILE_IVI = 0x8,
+       TIZEN_PROFILE_COMMON = 0x10,
+} tizen_profile_t;
+
+extern tizen_profile_t _get_tizen_profile();
+#define _MOBILE (_get_tizen_profile() == TIZEN_PROFILE_MOBILE)
+#define _COMMON (_get_tizen_profile() == TIZEN_PROFILE_COMMON)
 
 /**
  * Compare the city name of two cities
index 65a0a04..68de199 100644 (file)
@@ -25,6 +25,7 @@ BuildRequires:  pkgconfig(tapi)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-system-info)
 
 %description
 This is application for configuration time zone of device
index e4f5dba..807b9d7 100644 (file)
@@ -23,6 +23,7 @@ pkg_check_modules(pkgs REQUIRED
        notification
        libtzplatform-config
        capi-appfw-application
+       capi-system-info
 )
 
 FOREACH(flag ${pkgs_CFLAGS})
old mode 100644 (file)
new mode 100755 (executable)
index 9b13937..30668e6
@@ -143,6 +143,7 @@ static Elm_Genlist_Item_Class itc_sort = {
        .func.state_get = NULL,
        .func.del = NULL,
 };
+
 #endif
 
 static Elm_Genlist_Item_Class g_ts = {
@@ -153,7 +154,6 @@ static Elm_Genlist_Item_Class g_ts = {
        .func.del = NULL,
 };
 
-
 static void _ugview_clear_data(void *data)
 {
        CLK_FUN_BEG();
@@ -596,6 +596,9 @@ Eina_Bool _ugview_genlist_update(void *data)
                        }
                        if (match) {
                                /* append data to genlist */
+                               if(_COMMON)
+                                       g_ts.item_style = "1line";
+
                                gli = elm_genlist_item_append(ad->add_genlist, &g_ts, cs,       /* item data */
                                                NULL,   /* parent */
                                                ELM_GENLIST_ITEM_NONE, _gl_item_selected_cb,    /* func */
@@ -1432,6 +1435,8 @@ static void __ctx_popup_sort_clicked_cb(void *data, Evas_Object *obj, void *even
        Wcl_Addlist_Sort_Type index = WCL_SORT_BY_NAME;
 
        for (index = WCL_SORT_BY_NAME; index < WCL_UNKNOW_SORT_TYPE; index++) {
+               if(_COMMON)
+                       itc_sort.item_style = "1line";
                elm_genlist_item_append(genlist, &itc_sort, (void *)index, NULL,
                                ELM_GENLIST_ITEM_NONE, _sort_gl_clicked_cb, (void *)ad);
        }
index 7d0e34f..e427ef1 100644 (file)
 static char *_edgePath = NULL;
 static char *_localePath = NULL;
 
+tizen_profile_t _get_tizen_profile()
+{
+       static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
+       if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
+               return profile;
+
+       char *profileName;
+       system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+       switch (*profileName) {
+       case 'm':
+       case 'M':
+               profile = TIZEN_PROFILE_MOBILE;
+               break;
+       case 'w':
+       case 'W':
+               profile = TIZEN_PROFILE_WEARABLE;
+               break;
+       case 't':
+       case 'T':
+               profile = TIZEN_PROFILE_TV;
+               break;
+       case 'i':
+       case 'I':
+               profile = TIZEN_PROFILE_IVI;
+               break;
+       default: // common or unknown ==> ALL ARE COMMON.
+               profile = TIZEN_PROFILE_COMMON;
+       }
+
+       free(profileName);
+       return profile;
+}
+
 /**
  * Compare the city name of two cities
  *