Added status of Tizen connect at Connection menu. 78/103678/1
authorjinwang.an <jinwang.an@samsung.com>
Fri, 9 Dec 2016 06:22:05 +0000 (15:22 +0900)
committerjinwang.an <jinwang.an@samsung.com>
Fri, 9 Dec 2016 06:22:05 +0000 (15:22 +0900)
Change-Id: I5bc3307309c7232cbbcc352147e5d13d394bc00c
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
CMakeLists.txt
packaging/org.tizen.watch-setting.spec
src/setting-connection.c

index 76a79e235f35021e7adb57b59a8c64ebb1606b98..0fc054f378506ee9729d10894d7e08dc5d2897d2 100755 (executable)
@@ -93,6 +93,7 @@ pkg_check_modules(pkgs REQUIRED elementary ecore-imf appcore-common appcore-efl
                                capi-network-wifi
                                storage
                                capi-base-utils-i18n
+                               d2d-conv-manager
 )
 
 #??
index a8fd6de093d5ea618cc17850c8e5e403289ecbde..2a7ec89d8decb32c8751e982c9ee607a213a1808 100644 (file)
@@ -59,6 +59,7 @@ BuildRequires: pkgconfig(efl-extension)
 BuildRequires: pkgconfig(capi-network-wifi)
 BuildRequires: pkgconfig(storage)
 BuildRequires: pkgconfig(capi-base-utils-i18n)
+BuildRequires: pkgconfig(d2d-conv-manager)
 
 
 %description
index c3f3fe0b16157c6bf3f8950b9105c1d1b200c140..d3054e6c768a234358a2394481234f5ac62bf87c 100644 (file)
@@ -27,6 +27,8 @@
 #include "setting-volume.h"
 
 #include <app_control.h>
+#include <d2d_conv_internal.h>
+
 int app_control_set_package(app_control_h app_control, const char *package);
 static Evas_Object *g_connection_genlist = NULL;
 
@@ -418,6 +420,7 @@ char *_gl_connection_title_get(void *data, Evas_Object *obj, const char *part)
        Item_Data *id = data;
        int index = id->index;
        int val = 0;
+       int ret = 0;
 
        if (!strcmp(part, "elm.text")) {
                snprintf(buf, sizeof(buf) - 1, "%s", _(connection_menu_its[index % CONNECT_TOP_MENU_SIZE].name));
@@ -439,6 +442,13 @@ char *_gl_connection_title_get(void *data, Evas_Object *obj, const char *part)
                        /*              case SETTING_CONNECTION_BT_ALERTS: */
                        /*                      snprintf(buf, sizeof(buf) - 1, "Receive BT disconnection alerts."); */
                        /*                      break; */
+               case SETTING_CONNECTION_TIZEN_CONNECT:
+                       ret = conv_internal_get_activation_state(&val);
+                       if (ret != CONV_ERROR_NONE) {
+                               ERR("get_convergence_power_state() error. ret = %d", ret);
+                       }
+                       snprintf(buf, sizeof(buf) - 1, text_color, val ? _("IDS_COM_BODY_ON_ABB") : _("IDS_COM_BODY_OFF_ABB_M_STATUS"));
+                       break;
                }
        }
        ERR("_gl_connection_title_get part: %s, %s get status : %d", part, buf, val);
@@ -474,11 +484,6 @@ Evas_Object *_create_connection_list(void *data)
        itc->func.text_get = _gl_connection_title_get;
        itc->func.del = _connection_gl_del;
 
-       Elm_Genlist_Item_Class *itc_1text = elm_genlist_item_class_new();
-       itc_1text->item_style = "1text";
-       itc_1text->func.text_get = _gl_connection_title_get;
-       itc_1text->func.del = _connection_gl_del;
-
        Elm_Genlist_Item_Class *text_icon = elm_genlist_item_class_new();
        text_icon->item_style = "1text.1icon.1";
        text_icon->func.text_get = _gl_connection_title_get;
@@ -515,10 +520,8 @@ Evas_Object *_create_connection_list(void *data)
                case SETTING_CONNECTION_BLUETOOTH:
                case SETTING_CONNECTION_WIFI:
                case SETTING_CONNECTION_NFC:
-                       itc_tmp = itc;
-                       break;
                case SETTING_CONNECTION_TIZEN_CONNECT:
-                       itc_tmp = itc_1text;
+                       itc_tmp = itc;
                        break;
                /*              case SETTING_CONNECTION_BT_ALERTS: */
                /*                      itc_tmp = text2_icon; */