summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwang.an <jinwang.an@samsung.com>2018-09-19 13:38:29 +0900
committerjinwang.an <jinwang.an@samsung.com>2018-09-19 14:12:17 +0900
commit1b80c388cbbc20f764872d295f74be3053bbe598 (patch)
tree5be6572f094212bbb6a5167b99fa7ea66140ac12
parentace1c102f2968075a0f9ff1e24efdaab37bd9b4c (diff)
downloadwatch-setting-1b80c388cbbc20f764872d295f74be3053bbe598.tar.gz
watch-setting-1b80c388cbbc20f764872d295f74be3053bbe598.tar.bz2
watch-setting-1b80c388cbbc20f764872d295f74be3053bbe598.zip
Change-Id: I0cf55d93b8e6504339fbc75b5aa959c13072db9a Signed-off-by: jinwang.an <jinwang.an@samsung.com>
-rw-r--r--src/setting-clock.c3
-rw-r--r--src/setting-connection.c79
-rw-r--r--src/setting-device.c78
-rw-r--r--src/setting-info.c96
-rw-r--r--src/setting-sound.c5
5 files changed, 253 insertions, 8 deletions
diff --git a/src/setting-clock.c b/src/setting-clock.c
index 4dae869..57298b6 100644
--- a/src/setting-clock.c
+++ b/src/setting-clock.c
@@ -1867,8 +1867,7 @@ static void _clock_gl_watch_always_on_cb(void *data, Evas_Object *obj, void *eve
DBG("Cancel watch always on!", ambient_mode);
vconf_set_bool(VCONFKEY_SETAPPL_AMBIENT_MODE_BOOL, !ambient_mode);
-
- /* elm_check_state_set(check, EINA_FALSE); */
+ elm_check_state_set(check, EINA_FALSE);
}
}
diff --git a/src/setting-connection.c b/src/setting-connection.c
index 45564cf..0cf10df 100644
--- a/src/setting-connection.c
+++ b/src/setting-connection.c
@@ -61,6 +61,7 @@ static void wifi_status_changed_cb(wifi_manager_device_state_e state, void *user
static void nfc_status_changed_cb(bool activated, void *user_data);
static void location_status_changed_cb(location_method_e method, bool enable, void *user_data);
+static Evas_Object *g_flight_mode_check = NULL;
static struct _connection_menu_item connection_menu_its[] = {
{ "IDS_ST_BODY_BLUETOOTH", SETTING_CONNECTION_BLUETOOTH, _bluetooth_cb },
@@ -357,6 +358,7 @@ Evas_Object *_gl_connection_check_get(void *data, Evas_Object *obj, const char *
/* evas_object_event_callback_add(check, EVAS_CALLBACK_MOUSE_DOWN, _bt_alerts_chk_changed_cb, (void *)check); */
/* break; */
case SETTING_CONNECTION_FLIGHT_MODE:
+ g_flight_mode_check = check;
vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &is_value);
evas_object_event_callback_add(check, EVAS_CALLBACK_MOUSE_DOWN, _flight_mode_check_cb, (void *)check);
break;
@@ -523,6 +525,83 @@ void _flight_mode_cb(void *data, Evas_Object *obj, void *event_info)
DBG("_flight_mode_cb is called!!!!!!!");
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+ appdata *ad = g_app_context;
+ Evas_Object *check = (Evas_Object *)g_flight_mode_check;
+ int is_flight_mode = 0;
+
+ if (ad == NULL) {
+ DBG("%s", "_flight_mode_check_cb - appdata or check is null");
+ return;
+ }
+
+ DBG("_flight_mode_check_cb is called!!!!!!!");
+
+ vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &is_flight_mode);
+ DBG("is_flight_mode:%d ", is_flight_mode);
+
+ if (!is_flight_mode) {
+ Evas_Object *popup = NULL;
+ Evas_Object *btn1 = NULL;
+ Evas_Object *btn2 = NULL;
+ Evas_Object *icon;
+
+ popup = elm_popup_add(ad->nf);
+ elm_object_style_set(popup, "circle");
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(ad->nf, popup);
+
+ ad->popup = popup;
+
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+
+ char *font_setting = "<text_class=tizen><align=center>%s</align></text_class>";
+ snprintf(buf, sizeof(buf) - 1, font_setting, _("WDS_ST_TPOP_FLIGHT_MODE_DISABLES_CALLS_MESSAGING_AND_ALL_CONNECTIONS_TO_USE_WI_FI_AND_BLUETOOTH_GO_TO_SETTINGS"));
+
+ Evas_Object *layout;
+ layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
+
+ elm_object_text_set(layout, buf);
+ elm_object_content_set(popup, layout);
+
+ btn1 = elm_button_add(popup);
+ elm_object_style_set(btn1, "popup/circle/left");
+ evas_object_size_hint_weight_set(btn1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button1", btn1);
+ evas_object_smart_callback_add(btn1, "clicked", _set_flight_mode_cancel_cb, check);
+
+ icon = elm_image_add(btn1);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_delete.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn1, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ btn2 = elm_button_add(popup);
+ elm_object_style_set(btn2, "popup/circle/right");
+ evas_object_size_hint_weight_set(btn2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button2", btn2);
+ evas_object_smart_callback_add(btn2, "clicked", _set_flight_mode_ok_clicked_cb, check);
+
+ icon = elm_image_add(btn2);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_check.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn2, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ evas_object_show(popup);
+ back_button_cb_push(&back_key_flight_mode_popup_cb, check, NULL, g_connection_genlist, "g_connection_genlist");
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _hw_back_key_cb, NULL);
+
+ } else {
+ /* disable Flight mode off with out popup */
+ int flight_mode = 0;
+ DBG("Cancel Flight mode!");
+ if (_set_flight_mode_tel(flight_mode))
+ vconf_set_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, flight_mode);
+
+ }
+
+
}
char *_gl_connection_title_get(void *data, Evas_Object *obj, const char *part)
diff --git a/src/setting-device.c b/src/setting-device.c
index d23b4fd..c483880 100644
--- a/src/setting-device.c
+++ b/src/setting-device.c
@@ -34,6 +34,7 @@
#define AUDIO_RESOURCE_EXTENSION ".ogg"
+static Evas_Object *g_auto_open_apps_check = NULL;
static void change_language_enabling(keynode_t *key, void *data);
static void change_language_cb(keynode_t *key, void *data);
static void _double_press_home_key_set_radio_cb(void *data, Evas_Object *obj, void *event_info);
@@ -280,6 +281,7 @@ Evas_Object *_gl_device_action_check_get(void *data, Evas_Object *obj, const cha
if (!strcmp(part, "elm.icon")) {
check = elm_check_add(obj);
+ g_auto_open_apps_check = check;
if (vconf_get_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, &is_auto_open_apps) < 0) {
is_auto_open_apps = 0;
@@ -395,6 +397,82 @@ void _auto_open_apps_cb(void *data, Evas_Object *obj, void *event_info)
{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+ appdata *ad = g_app_context;
+ Evas_Object *check = (Evas_Object *)g_auto_open_apps_check;
+
+ if (ad == NULL) {
+ DBG("%s", "_auto_open_apps_check_cb - appdata or check is null");
+ return;
+ }
+
+ DBG("_auto_open_apps_check_changed_cb is called!!!!!!!");
+
+ int is_auto_open = 0;
+ vconf_get_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, &is_auto_open);
+
+
+ if (!is_auto_open) {
+ Evas_Object *popup = NULL;
+ Evas_Object *btn1 = NULL;
+ Evas_Object *btn2 = NULL;
+ Evas_Object *icon;
+
+ popup = elm_popup_add(ad->nf);
+ elm_object_style_set(popup, "circle");
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(ad->nf, popup);
+
+ ad->popup = popup;
+
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+
+ char *font_setting = "<text_class=tizen><align=center>%s</align></text_class>";
+ snprintf(buf, sizeof(buf) - 1, font_setting, _("WDS_HS_TPOP_FOCUSING_ON_ICON_IN_APPS_SCREEN_WILL_OPEN_APP_AUTOMATICALLY"));
+
+ Evas_Object *layout;
+ layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
+
+ elm_object_text_set(layout, buf);
+ elm_object_content_set(popup, layout);
+
+
+ btn1 = elm_button_add(popup);
+ elm_object_style_set(btn1, "popup/circle/left");
+ evas_object_size_hint_weight_set(btn1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button1", btn1);
+ evas_object_smart_callback_add(btn1, "clicked", _set_auto_open_apps_cancel_cb, check);
+
+ icon = elm_image_add(btn1);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_delete.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn1, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ btn2 = elm_button_add(popup);
+ elm_object_style_set(btn2, "popup/circle/right");
+ evas_object_size_hint_weight_set(btn2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button2", btn2);
+ evas_object_smart_callback_add(btn2, "clicked", _set_auto_open_apps_ok_clicked_cb, check);
+
+ icon = elm_image_add(btn2);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_check.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn2, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ evas_object_show(popup);
+ back_button_cb_push(&back_key_auto_open_app_popup_cb, check, NULL, g_device_action_genlist, "device_action_genlist");
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _hw_back_key_cb, NULL);
+
+ } else {
+ bool is_auto_open = 0;
+ vconf_set_bool(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, is_auto_open);
+ elm_check_state_set(check, EINA_FALSE);
+
+ }
+
+
}
char *_gl_device_action_title_get(void *data, Evas_Object *obj, const char *part)
diff --git a/src/setting-info.c b/src/setting-info.c
index 9be21e9..0c9876a 100644
--- a/src/setting-info.c
+++ b/src/setting-info.c
@@ -1,5 +1,4 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
+/* * Copyright (c) 2010 Samsung Electronics, Inc.
* All rights reserved.
*
* This software is a confidential and proprietary information
@@ -33,8 +32,11 @@ static struct _info_menu_item info_menu_its[] = {
/*#endif */
};
+static Evas_Object *g_usb_debugging_check = NULL;
+static Evas_Object *g_developer_options_check = NULL;
+void _gl_developer_options_cb(void *data, Evas_Object *obj, void *event_info);
static struct _info_menu_item developer_options_menu_its[] = {
- { "WDS_ST_MBODY_ON_PIXEL_RATIO", 0, NULL},
+ { "WDS_ST_MBODY_ON_PIXEL_RATIO", 0, _gl_developer_options_cb},
};
static struct _info_menu_item _info_detail_menu_list[] = {
@@ -57,6 +59,7 @@ static struct _info_menu_item _info_detail_menu_list[] = {
static void _usb_debug_cancel_cb(void *data, Evas_Object *obj, void *event_info);
static void _usb_debug_ok_cb(void *data, Evas_Object *obj, void *event_info);
static Eina_Bool _get_imei_serial_info(char *pszBuf, int bufSize);
+static void back_key_usb_debug_popup_cb(void *data, Evas_Object *obj, void *event_info);
static Evas_Object *g_info_genlist = NULL;
static Evas_Object *g_about_genlist = NULL;
@@ -233,7 +236,77 @@ void set_enable_USB_debugging(int is_enable)
void _gl_usb_debug_cb(void *data, Evas_Object *obj, void *event_info)
{
+ DBG("_gl_usb_debug_cb is called!!!!!!!");
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+ appdata *ad = g_app_context;
+ Evas_Object *check = (Evas_Object *)g_usb_debugging_check;
+
+ if (ad == NULL) {
+ DBG("%s", "_usb_debug_chk_changed_cb - appdata or check is null");
+ return;
+ }
+
+ if (!get_enable_USB_debugging()) {
+
+ Evas_Object *popup = NULL;
+ Evas_Object *btn1 = NULL;
+ Evas_Object *btn2 = NULL;
+ Evas_Object *icon;
+
+ popup = elm_popup_add(ad->nf);
+ elm_object_style_set(popup, "circle");
+ evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(ad->nf, popup);
+
+ ad->popup = popup;
+
+ char buf[__SETTING_BUF_SIZE__] = {0,};
+
+ char *font_size_frame = "<text_class=tizen><align=center>%s</align></text_class>";
+ snprintf(buf, sizeof(buf) - 1, font_size_frame, _("WDS_ST_POP_ALLOW_GEAR_TO_READ_LOG_DATA_COPY_FILES_TO_AND_FROM_YOUR_PC_AND_INSTALL_APPS_WITHOUT_NOTIFICATION_HDEVELOPMENT_ONLY"));
+
+ Evas_Object *layout;
+ layout = elm_layout_add(popup);
+ elm_layout_theme_set(layout, "layout", "popup", "content/circle/buttons2");
+
+ char *txt = strdup(buf);
+ elm_object_text_set(layout, txt);
+ elm_object_content_set(popup, layout);
+
+ FREE(txt);
+
+ btn1 = elm_button_add(popup);
+ elm_object_style_set(btn1, "popup/circle/left");
+ evas_object_size_hint_weight_set(btn1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button1", btn1);
+ evas_object_smart_callback_add(btn1, "clicked", _usb_debug_cancel_cb, check);
+
+ icon = elm_image_add(btn1);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_delete.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn1, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ btn2 = elm_button_add(popup);
+ elm_object_style_set(btn2, "popup/circle/right");
+ evas_object_size_hint_weight_set(btn2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(popup, "button2", btn2);
+ evas_object_smart_callback_add(btn2, "clicked", _usb_debug_ok_cb, check);
+
+ icon = elm_image_add(btn2);
+ elm_image_file_set(icon, IMG_DIR"tw_ic_popup_btn_check.png", NULL);
+ evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_part_content_set(btn2, "elm.swallow.content", icon);
+ evas_object_show(icon);
+
+ evas_object_show(popup);
+ back_button_cb_push(&back_key_usb_debug_popup_cb, check, NULL, g_info_genlist, "g_info_genlist");
+ eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, _hw_back_key_cb, NULL);
+
+ } else {
+ set_enable_USB_debugging(0);
+ elm_check_state_set(check, EINA_FALSE);
+ }
}
@@ -354,6 +427,7 @@ Evas_Object *_gl_info_check_get(void *data, Evas_Object *obj, const char *part)
if (!strcmp(part, "elm.icon") && index == (ITEM_COUNT - 1)) {
check = elm_check_add(obj);
+ g_usb_debugging_check = check;
elm_object_style_set(check, "on&off");
is_enable_usb_debug = get_enable_USB_debugging();
elm_check_state_set(check, (is_enable_usb_debug) ? EINA_TRUE : EINA_FALSE);
@@ -918,6 +992,21 @@ void _AOD_OPR_chk_changed_cb(void *data, Evas_Object *obj, void *event_info)
vconf_set_bool(VCONFKEY_SETAPPL_AOD_ON_PIXEL_RATIO, wrote_val);
}
+void _gl_developer_options_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ DBG("Setting - _gl_developer_options_cb");
+
+ int wrote_val = 0;
+
+ Evas_Object *check = g_developer_options_check;
+ vconf_get_bool(VCONFKEY_SETAPPL_AOD_ON_PIXEL_RATIO, &wrote_val);
+
+ wrote_val = !wrote_val;
+
+ vconf_set_bool(VCONFKEY_SETAPPL_AOD_ON_PIXEL_RATIO, wrote_val);
+ elm_check_state_set(check, wrote_val ? EINA_TRUE : EINA_FALSE);
+}
+
Evas_Object *_gl_AOD_OPR_check_get(void *data, Evas_Object *obj, const char *part)
{
Evas_Object *check = NULL;
@@ -929,6 +1018,7 @@ Evas_Object *_gl_AOD_OPR_check_get(void *data, Evas_Object *obj, const char *par
if (!strcmp(part, "elm.icon")) {
int wrote_val = 0;
check = elm_check_add(obj);
+ g_developer_options_check = check;
elm_object_style_set(check, "on&off");
vconf_get_bool(VCONFKEY_SETAPPL_AOD_ON_PIXEL_RATIO, &wrote_val);
diff --git a/src/setting-sound.c b/src/setting-sound.c
index 49bf5fa..a6f0855 100644
--- a/src/setting-sound.c
+++ b/src/setting-sound.c
@@ -356,16 +356,15 @@ void _touch_sound_cb(void *data, Evas_Object *obj, void *event_info)
int ret = 0;
Elm_Object_Item *it = (Elm_Object_Item *)event_info;
appdata *ad = data;
+ DBG("_touch_sound_cb is called!!!!!!!");
if (ad == NULL) {
DBG("%s", "_touch_sound_cb - appdata or check is null");
return;
}
ad->is_enable_touch_sound = ad->is_enable_touch_sound ? 0 : 1;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_SOUND_TOUCH, ad->is_enable_touch_sound);
- if (ret != SYSTEM_SETTINGS_ERROR_NONE)
- DBG("failed! set SYSTEM_SETTINGS_KEY_SOUND_TOUCH");
+ vconf_set_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, ad->is_enable_touch_sound);
vconf_set_bool(VCONFKEY_SETAPPL_BUTTON_SOUNDS_BOOL, ad->is_enable_touch_sound);
elm_genlist_item_selected_set(it, EINA_FALSE);