summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinwang.an <jinwang.an@samsung.com>2018-07-27 15:28:18 +0900
committerjinwang.an <jinwang.an@samsung.com>2018-07-31 18:04:40 +0900
commit00b59c3f6085eefbc804b17e424d5103c14c4d08 (patch)
treed09193e2535053b422022a735625b5f14a5e9818
parent8518aa77d8ee52829567efeb55e56b6355914d05 (diff)
downloadwatch-setting-00b59c3f6085eefbc804b17e424d5103c14c4d08.tar.gz
watch-setting-00b59c3f6085eefbc804b17e424d5103c14c4d08.tar.bz2
watch-setting-00b59c3f6085eefbc804b17e424d5103c14c4d08.zip
Deleted unused header files and source code.
Change-Id: I38106598fda0a8c4cdc71eee6dc9a254b63fc11a Signed-off-by: jinwang.an <jinwang.an@samsung.com>
-rwxr-xr-xCMakeLists.txt4
-rw-r--r--include/setting-battery.h62
-rw-r--r--include/setting-bluetooth.h72
-rw-r--r--include/setting-double.h41
-rw-r--r--include/setting-homescreen.h85
-rw-r--r--include/setting-motion.h72
-rw-r--r--include/setting-notification.h54
-rw-r--r--include/setting-privacy.h37
-rw-r--r--include/setting-profile.h27
-rw-r--r--include/setting-reset.h31
-rw-r--r--include/setting-safety.h69
-rw-r--r--include/setting-theme.h46
-rw-r--r--include/setting_control_bt.h21
-rw-r--r--include/setting_indicator_util.h23
-rw-r--r--src/setting-clock.c524
-rw-r--r--src/setting-connection.c1
-rw-r--r--src/setting-display.c2
-rw-r--r--src/setting-info.c1
-rw-r--r--src/setting-privacy.c407
-rw-r--r--src/setting-profile.c33
-rw-r--r--src/setting-safety.c774
-rw-r--r--src/setting-sound.c27
-rw-r--r--src/setting.c70
-rw-r--r--src/setting_indicator_util.c147
24 files changed, 1 insertions, 2629 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56a2928..a6acae6 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,16 +11,12 @@ SET(SRCS
src/setting-info.c
src/setting-device.c
src/setting-display.c
- src/setting-privacy.c
src/setting-language.c
- src/setting-safety.c
src/setting-common-sound.c
src/util.c
src/setting_data_vconf.c
src/setting_control_haptic.c
src/setting_view_toast.c
- src/setting-profile.c
- src/setting_indicator_util.c
)
SET(VENDOR "samsung")
diff --git a/include/setting-battery.h b/include/setting-battery.h
deleted file mode 100644
index 2aeae45..0000000
--- a/include/setting-battery.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-battery.h
- *
- * Created on: Oct 12, 2013
- * Author: min-hoyun
- */
-
-#ifndef SETTING_BATTERY_H_
-#define SETTING_BATTERY_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-#include <device/battery.h>
-
-struct _battery_menu_item {
- char *name;
- int is_enable;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-enum {
- CHARGING_NONE,
- CHARGING_AC,
- CHARGING_USB
-};
-
-enum {
- BATT_MENU_STATUS,
- /*BATT_MENU_PERCENT, */
- BATT_MENU_POWER_SAVING
-};
-
-struct _battery_info {
- int percent;
- int is_charging;
-};
-
-
-/* ----------------method----------------------// */
-
-Evas_Object *_create_battery_list(void *data);
-
-void _battery_status_cb_gen_item(void *data, Evas_Object *obj, void *event_info);
-Evas_Object *_battery_status_cb(void *data);
-void _clear_battery_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
-Eina_Bool _clear_battery_list_cb(void *data, Elm_Object_Item *it);
-void _start_timer_for_update(Evas_Object *obj);
-
-void _initialize_battery();
-
-#endif /* SETTING_BATTERY_H_ */
diff --git a/include/setting-bluetooth.h b/include/setting-bluetooth.h
deleted file mode 100644
index 88b4e09..0000000
--- a/include/setting-bluetooth.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-bluetooth.h
- *
- * Created on: Oct 9, 2013
- * Author: min-hoyun
- */
-
-#ifndef SETTING_BLUETOOTH_H_
-#define SETTING_BLUETOOTH_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-#include <bluetooth-api.h>
-#include <bluetooth-audio-api.h>
-#include <bluetooth.h>
-#include <vconf.h>
-
-#define VISIBILITY_TIMEOUT 120
-#define BT_LIST_ITEM_COUNT 3
-
-
-enum {
- BT_NON_OPERATING,
- BT_OPERATING
-};
-
-enum {
- BT_MENU_TYPE_BT_ON_OFF,
- BT_MENU_TYPE_BT_HEADSET,
- BT_MENU_TYPE_VISIBLE_ON_OFF
-};
-
-struct _bt_menu_item {
- char *name;
- int is_enable;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-typedef struct Bt_Item_Data {
- int index;
- Elm_Object_Item *item;
- Evas_Object *check;
- Evas_Object *state_label;
-} Bt_Item_Data;
-
-Evas_Object *_create_bt_list(void *data);
-
-
-void initialize_bt();
-void clear_bt_resource();
-Eina_Bool _clear_bluetooth_cb(void *data, Elm_Object_Item *it);
-void _update_visibility_item_view(int is_hf_connected);
-
-
-
-/*Added for bluetooth internal API*/
-int bt_adapter_enable(void);
-int bt_adapter_disable(void);
-int bt_adapter_set_visibility(bt_adapter_visibility_mode_e discoverable_mode, int duration);
-
-#endif /* SETTING_BLUETOOTH_H_ */
diff --git a/include/setting-double.h b/include/setting-double.h
deleted file mode 100644
index 8714288..0000000
--- a/include/setting-double.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-double.h
- *
- * Created on: Jan 8, 2014
- * Author: Sunyeop Hwang
- */
-
-#ifndef SETTING_DOUBLE_H_
-#define SETTING_DOUBLE_H_
-
-#include <Elementary.h>
-
-struct _double_menu_item {
- int index;
- char *appid;
- char *pkgid;
- char *name;
-};
-
-typedef struct Double_Item_Data {
- struct _double_menu_item *pitem;
- Elm_Object_Item *item;
- Evas_Object *check;
-} Double_Item_Data;
-
-void init_double_pressing(void *data);
-Evas_Object *create_double_app_list(void *data);
-Evas_Object *create_double_list(void *data);
-Eina_Bool clear_double_app_cb(void *data, Elm_Object_Item *it);
-char *_get_selected_app_name();
-#endif /* SETTING_DOUBLE_H_ */
diff --git a/include/setting-homescreen.h b/include/setting-homescreen.h
deleted file mode 100644
index adea86e..0000000
--- a/include/setting-homescreen.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-display.h
- *
- * Created on: Oct 9, 2013
- * Author: min-hoyun
- */
-
-#ifndef SETTING_HOMESCREEN_H_
-#define SETTING_HOMESCREEN_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-
-#define HOME_MENU_COUNT 3
-#define VIEWTYPE_COUNT 2
-#define BG_COLOR_COUNT 12
-#define HOME_BG_LIST_COUNT 3
-#define NUM_MAX_THUMB_IN_PAGES 2
-#define NUM_DEFAULT_THUMB_BUTTON 2
-#define DEFAULT_WALLPAPER_COUNT 6
-#define WALLPAPER_CNT_PER_PAGE 4
-#define SETTING_DEFAULT_WALLPAPER_PATH TZ_SYS_GLOBALUSER_DATA_D"/settings/Wallpapers"
-#define CROPPED_GALLERY_DEFAULT_WALLPAPER_PATH TZ_USER_CONTENT_D"/.bgwallpaper.jpg"
-
-struct _homescreen_menu_item {
- char *name;
- int is_check_type;
- int state;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-struct _homebg_menu_item {
- char *name;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-typedef struct _Homescreen_Item_Data {
- int index;
- Elm_Object_Item *item;
-} Homescreen_Item_Data;
-
-typedef struct _page_data page_data;
-struct _page_data {
- Evas_Object *mapbuf[BG_COLOR_COUNT / 2];
-};
-
-struct _color {
- int r;
- int g;
- int b;
- char *hex;
-};
-
-typedef struct _wallpaper_page_data wallpaper_page_data;
-struct _wallpaper_page_data {
- Evas_Object *mapbuf[DEFAULT_WALLPAPER_COUNT / NUM_MAX_THUMB_IN_PAGES];
-};
-
-char *_get_homeview_type_subtitle();
-char *_gl_homescreen_title_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_gl_homescreen_check_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_create_homescreen_list(void *data);
-void _homescreen_gl_viewtype_cb(void *data, Evas_Object *obj, void *event_info);
-void _homescreen_gl_homebg_cb(void *data, Evas_Object *obj, void *event_info);
-void _homescreen_gl_edit_home_cb(void *data, Evas_Object *obj, void *event_info);
-void _homescreen_gl_edit_apps_cb(void *data, Evas_Object *obj, void *event_info);
-void _show_bg_slide_cb(void *data, Evas_Object *obj, void *event_info);
-void _wallpaper_gl_cb(void *data, Evas_Object *obj, void *event_info);
-void _gallery_gl_cb(void *data, Evas_Object *obj, void *event_info);
-void _clear_homescreen_cb(void *data , Evas *e, Evas_Object *obj, void *event_info);
-
-Evas_Object *create_wallpaper_list(void *data);
-
-#endif /* SETTING_HOMESCREEN_H_ */
diff --git a/include/setting-motion.h b/include/setting-motion.h
deleted file mode 100644
index 8093d08..0000000
--- a/include/setting-motion.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-motion.h
- *
- * Created on: Oct 9, 2013
- * Author: min-hoyun
- */
-
-#ifndef SETTING_MOTION_H_
-#define SETTING_MOTION_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-
-#include "setting_data_vconf.h"
-#include "util.h"
-
-
-#define MOTION_ITEM_COUNT 2
-#define MOTION_WAKE_UP_ITEM_COUNT 3
-
-struct _motion_menu_item {
- char *name;
- int state;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-struct _motion_wake_up_guesture_item {
- char *title;
- int value;
-};
-
-typedef struct Motion_Item_Data {
- int index;
- Elm_Object_Item *item;
-} Motion_Item_Data;
-
-
-typedef struct _motion_data {
- int is_enable_smart_relay;
- int is_enable_wake_up_gesture;
- int wake_up_gesture_type;
-
- Evas_Object *g_motion_genlist;
-
-} Motion_Data;
-
-
-char *_gl_motion_title_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_gl_motion_check_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_create_motion_list(void *data);
-void _motion_chk_changed_cb(void *data, Evas_Object *obj, void *event_info);
-void _motion_gl_smart_relay_cb(void *data, Evas_Object *obj, void *event_info);
-void _motion_gl_wake_up_cb(void *data, Evas_Object *obj, void *event_info);
-char *_get_wake_up_gesture_sub_title();
-
-void _initialize_motion();
-Eina_Bool _clear_motion_cb(void *data, Elm_Object_Item *it);
-
-void motion_vconf_changed_cb(keynode_t *key, void *data);
-
-#endif /* SETTING_MOTION_H_ */
diff --git a/include/setting-notification.h b/include/setting-notification.h
deleted file mode 100644
index 9590da6..0000000
--- a/include/setting-notification.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * setting-notification.h
- *
- * Created on: Feb 14, 2014
- * Author: min-hoyun
- */
-
-#ifndef SETTING_NOTIFICATION_H_
-#define SETTING_NOTIFICATION_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-
-#include "setting_data_vconf.h"
-#include "util.h"
-
-#define NOTIFICATION_ITEM_COUNT 1
-
-#define VCONF_WMS_NOTIFICATION_KEY "db/wms/noti_onoff_support"
-
-struct _noti_menu_item {
- char *name;
- int state;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-typedef struct Noti_Item_Data {
- int index;
- Elm_Object_Item *item;
-} Noti_Item_Data;
-
-
-typedef struct _noti_data {
- int is_enable_noti;
-
- appdata *app_context;
-
- Evas_Object *g_noti_genlist;
-
-} Noti_Data;
-
-
-void _initialize_noti();
-Eina_Bool _clear_noti_cb(void *data, Elm_Object_Item *it);
-
-char *_gl_noti_title_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_gl_noti_check_get(void *data, Evas_Object *obj, const char *part);
-Evas_Object *_create_noti_list(void *data);
-
-void noti_enabling_vconf_changed_cb(keynode_t *key, void *data);
-void _noti_gl_enabling_noti_cb(void *data, Evas_Object *obj, void *event_info);
-
-#endif /* SETTING_NOTIFICATION_H_ */
diff --git a/include/setting-privacy.h b/include/setting-privacy.h
deleted file mode 100644
index f4ce236..0000000
--- a/include/setting-privacy.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-privacy.h
- *
- * Created on: Jan 7, 2014
- * Author: Sunyeop Hwang
- */
-
-#ifndef SETTING_PRIVACY_H_
-#define SETTING_PRIVACY_H_
-
-#include <Elementary.h>
-
-struct _privacy_menu_item {
- char *name;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-typedef struct Privacy_Item_Data {
- int index;
- Elm_Object_Item *item;
- Evas_Object *check;
-} Privacy_Item_Data;
-
-Evas_Object *create_privacy_list(void *data);
-Eina_Bool clear_privacy_cb(void *data, Elm_Object_Item *it);
-
-#endif /* SETTING_PRIVACY_H_ */
diff --git a/include/setting-profile.h b/include/setting-profile.h
deleted file mode 100644
index 3c98574..0000000
--- a/include/setting-profile.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- *
- * setting-profile.h (s-health)
- *
- */
-
-#ifndef SETTING_PROFILE_H_
-#define SETTING_PROFILE_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-
-#define PROFILE_APP_ID "org.tizen.shealth.userprofile"
-#define PROFILE_OP_ID "http://tizen.org/appcontrol/operation/launch_profile_setting"
-
-void _create_profile(void *data, Evas_Object *obj, void *event_info);
-
-#endif /* SETTING_PROFILE_H_ */
diff --git a/include/setting-reset.h b/include/setting-reset.h
deleted file mode 100644
index 5f0590c..0000000
--- a/include/setting-reset.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-reset.h
- *
- * Created on: Oct 10, 2013
- * Author: min-hoyun
- */
-
-#ifndef SETTING_RESET_H_
-#define SETTING_RESET_H_
-
-#include <Elementary.h>
-#include <libintl.h>
-#include <string.h>
-#include <dd-deviced.h>
-
-#define PREDEF_FACTORY_RESET "launchfr"
-
-void _reset_popup_cb(void *data, Evas_Object *obj, void *event_info);
-
-
-#endif /* SETTING_RESET_H_ */
diff --git a/include/setting-safety.h b/include/setting-safety.h
deleted file mode 100644
index 4d0a95d..0000000
--- a/include/setting-safety.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-safety.h
- *
- * Created on: Jan 14, 2014
- * Author: min-hoyun
- */
-
-#ifndef SETTING_SAFETY_H_
-#define SETTING_SAFETY_H_
-
-#include <Elementary.h>
-#include "util.h"
-
-#define SAFETY_MENU_ITEM_COUNT 5
-
-struct _safety_menu_item {
- char *name;
- char *sub_name;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-struct _set_interval_menu_item {
- char *title;
- char *sub_title;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
-};
-
-typedef struct safety_Item_Data {
- int index;
- Elm_Object_Item *item;
-} Safety_Item_Data;
-
-struct _interval_trauma_menu_item {
- char *str;
- char *time;
-};
-
-typedef struct _safety_data {
- int is_support_emergency;
- int is_enable_emergency_mode;
- int is_enable_trauma;
- int is_enable_no_activity;
- int interval_trauma;
- int interval_no_activity;
-
- appdata *app_context;
-
- Evas_Object *g_safety_genlist;
- Evas_Object *g_interval_genlist;
-
-} Safety_Data;
-
-Evas_Object *create_safety_list(void *data);
-Eina_Bool clear_safety_cb(void *data, Elm_Object_Item *it);
-
-void _help_popup_cb(void *data, Evas_Object *obj, void *event_info);
-void _disable_emergency_popup_cb(void *data, Evas_Object *obj, void *event_info);
-
-#endif /* SETTING_SAFETY_H_ */
diff --git a/include/setting-theme.h b/include/setting-theme.h
deleted file mode 100644
index 8ac8629..0000000
--- a/include/setting-theme.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * setting-theme.h
- *
- * Created on: Aug 7, 2014
- * Author: min-hoyun
- */
-
-#ifndef SETTING_THEME_H_
-#define SETTING_THEME_H_
-
-#include <Elementary.h>
-
-#include "util.h"
-
-#define COLOR_THEME_COUNT 2
-
-typedef struct _theme_data {
- appdata *ad;
-
- Evas_Object *theme_layout;
- Evas_Object *mapbuf[COLOR_THEME_COUNT];
- Evas_Object *scroller;
- Evas_Object *index;
-
- Elm_Object_Item *last_it;
- Elm_Object_Item *new_it;
-
- Elm_Object_Item *it[COLOR_THEME_COUNT];
-
- int curr_theme_id;
- int curr_page;
- int min_page;
- int max_page;
- int curr_theme_type;
-} Theme_Data;
-
-typedef struct _thumbnail_data {
- int id;
- int theme_type;
- int prev_img_path;
-} Thumbnail_Data;
-
-
-void setting_theme_show_thumbnail(void *data, Evas_Object *obj, void *event_info);
-
-#endif /* SETTING_THEME_H_ */
diff --git a/include/setting_control_bt.h b/include/setting_control_bt.h
deleted file mode 100644
index 32d2daf..0000000
--- a/include/setting_control_bt.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-
-#ifndef _SETTING_CONTROL_BT_H_
-#define _SETTING_CONTROL_BT_H_
-
-#include <bluetooth-api.h>
-
-
-int hf_is_connected();
-
-
-#endif
diff --git a/include/setting_indicator_util.h b/include/setting_indicator_util.h
deleted file mode 100644
index 78415bc..0000000
--- a/include/setting_indicator_util.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-#ifndef _SETTING_INDICATOR_UTIL_H_
-#define _SETTING_INDICATOR_UTIL_H_
-
-#include <Elementary.h>
-#include "setting_debug.h"
-#include "util.h"
-
-void indicator_set_vconf_changed_cb(void *data);
-void indicator_unset_vconf_changed_cb();
-
-void indicator_view_update(Evas_Object *layout);
-
-#endif
diff --git a/src/setting-clock.c b/src/setting-clock.c
index 7348765..7abf4e9 100644
--- a/src/setting-clock.c
+++ b/src/setting-clock.c
@@ -19,6 +19,7 @@
#include <system_settings.h>
#include <fontconfig/fontconfig.h>
#include <app_control.h>
+#include <watch_control.h>
#include "setting-clock.h"
#include "util.h"
@@ -1437,529 +1438,6 @@ char *_get_time_str()
return _get_str_from_icu(time_fmt[is_hour24]);
}
-//char *_gl_date_and_time_title_get(void *data, Evas_Object *obj, const char *part)
-//{
-// char buf[__SETTING_BUF_SIZE__] = {0,};
-// Item_Data *id = data;
-// int index = id->index;
-//
-// char expression[32];
-// int auto_update = 0;
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &auto_update);
-//
-// if (!strcmp(part, "elm.text.1")) {
-// if (index == 0) {
-// snprintf(buf, sizeof(buf) - 1, "%s", _(dt_menu_its[index % 3].name));
-// } else {
-// if (auto_update) {
-// strncpy(expression, "<font color=#515151>%s</font>", sizeof(expression)-1);
-// } else {
-// strncpy(expression, "%s", sizeof(expression)-1);
-// }
-// snprintf(buf, sizeof(buf) - 1, expression, _(dt_menu_its[index % 3].name));
-// }
-// } else if (!strcmp(part, "elm.text.2")) {
-// if (index == 0) {
-// snprintf(buf, sizeof(buf) - 1, "%s", _(dt_menu_its[index % 3].date_or_time));
-// } else {
-// if (auto_update) {
-// strncpy(expression, "<font color=#515151>%s</font>", sizeof(expression)-1);
-// } else {
-// strncpy(expression, "%s", sizeof(expression)-1);
-// }
-//
-// if (index == 1) { /* Date */
-// char *date_buf = NULL;
-// date_buf = _get_date_str();
-// snprintf(buf, sizeof(buf) - 1, expression, date_buf);
-// FREE(date_buf);
-// } else if (index == 2) { /* Time */
-// char *time_buf = NULL;
-// time_buf = _get_time_str();
-// snprintf(buf, sizeof(buf) - 1, expression, time_buf);
-// FREE(time_buf);
-// }
-// }
-// index++;
-// }
-// return strdup(buf);
-//}
-
-//static Evas_Object *_gl_dt_auto_sync_check_get(void *data, Evas_Object *obj, const char *part)
-//{
-// Evas_Object *check = NULL;
-// int is_auto_update = 0;
-//
-// DT_Item_Data *id = data;
-// int index = id->index;
-//
-// if (!strcmp(part, "elm.icon")) {
-// if (index == 0) {
-// check = elm_check_add(obj);
-// if (vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &is_auto_update) < 0) {
-// DBG("Setting - auto time update's vconf get fail");
-// }
-// elm_check_state_set(check, (is_auto_update) ? EINA_TRUE : EINA_FALSE);
-// evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
-// evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// auto_sync_check = check;
-// }
-// index++;
-// }
-//
-// return check;
-//}
-
-//static void _dt_gl_del(void *data, Evas_Object *obj)
-//{
-// DT_Item_Data *id = data;
-// FREE(id);
-//
-// auto_sync_check = NULL;
-// auto_sync_item = NULL;
-// date_item = NULL;
-// time_item = NULL;
-//}
-
-//static void change_datetime_format_cb(keynode_t *key, void *data)
-//{
-// int ret = 0;
-// int time_val = 0;
-// ret = vconf_get_int(VCONFKEY_REGIONFORMAT_TIME1224, &time_val);
-// if (ret < 0)
-// return;
-//
-// DBG("Setting - time_format : %d", time_val);
-// ICU_set_timezone(get_timezone_str());
-//
-// int is_auto_sync = 0;
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &is_auto_sync);
-//
-// if (date_item) {
-// elm_genlist_item_update(date_item);
-// /*elm_object_item_disabled_set(date_item, (is_auto_sync) ? EINA_TRUE : EINA_FALSE ); */
-// }
-// if (time_item) {
-// elm_genlist_item_update(time_item);
-// /*elm_object_item_disabled_set(time_item, (is_auto_sync) ? EINA_TRUE : EINA_FALSE ); */
-// }
-//}
-
-//static Eina_Bool _clear_datetime_changed_cb(void *data, Elm_Object_Item *it)
-//{
-// unregister_vconf_changing(VCONFKEY_REGIONFORMAT_TIME1224, change_datetime_format_cb);
-// unregister_vconf_changing(VCONFKEY_SETAPPL_DATE_FORMAT_INT, change_datetime_format_cb);
-// unregister_vconf_changing(VCONFKEY_SYSTEM_TIME_CHANGED, change_datetime_format_cb);
-//
-// return EINA_TRUE;
-//}
-
-//void _show_date_and_time_list(void *data)
-//{
-// appdata *ad = data;
-// if (ad == NULL) {
-// DBG("%s", "_create_dt_list - appdata is null");
-// return;
-// }
-// Evas_Object *genlist = NULL;
-// Evas_Object *layout = NULL;
-// Elm_Object_Item *nf_it = NULL;
-// struct _dt_menu_item *menu_its = NULL;
-// int idx = 0;
-// int auto_sync = 0;
-//
-// ICU_set_timezone(get_timezone_str());
-//
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &auto_sync);
-//
-// Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
-// itc->item_style = "2text.1icon.1";
-// itc->func.text_get = _gl_date_and_time_title_get;
-// itc->func.content_get = _gl_dt_auto_sync_check_get;
-// itc->func.del = _dt_gl_del;
-//
-// layout = elm_layout_add(ad->nf);
-// elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
-// evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// genlist = elm_genlist_add(layout);
-// elm_genlist_block_count_set(genlist, 14);
-// elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
-// evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// connect_to_wheel_with_genlist(genlist, ad);
-// menu_its = dt_menu_its;
-//
-// for (idx = 0; idx < CLOCK_DATE_AND_TIME_COUNT; idx++) {
-// DT_Item_Data *id = calloc(sizeof(DT_Item_Data), 1);
-// if (id) {
-// id->index = idx;
-// id->item = elm_genlist_item_append(
-// genlist, /* genlist object */
-// itc, /* item class */
-// id, /* data */
-// NULL,
-// ELM_GENLIST_ITEM_NONE,
-// menu_its[idx].func, /* call back */
-// ad);
-//
-// switch (idx) {
-// case 0:
-// auto_sync_item = id->item;
-// break;
-// case 1:
-// date_item = id->item;
-// break;
-// case 2:
-// time_item = id->item;
-// break;
-// }
-// }
-// }
-// elm_genlist_item_class_free(itc);
-//
-// g_date_time_genlist = genlist;
-//
-// elm_object_part_content_set(layout, "elm.genlist", genlist);
-//
-// nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout, NULL);
-// elm_naviframe_item_pop_cb_set(nf_it, _clear_datetime_changed_cb, ad);
-// elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-//
-// /* time format changing cb */
-// register_vconf_changing(VCONFKEY_REGIONFORMAT_TIME1224, change_datetime_format_cb, NULL);
-// register_vconf_changing(VCONFKEY_SETAPPL_DATE_FORMAT_INT, change_datetime_format_cb, NULL);
-// register_vconf_changing(VCONFKEY_SYSTEM_TIME_CHANGED, change_datetime_format_cb, NULL);
-//}
-
-//static void _set_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// if (!data || !obj) return;
-//
-// appdata *ad = data;
-// struct tm currtime;
-//
-// elm_datetime_value_get(ad->datetime, &currtime);
-//
-// currtime.tm_isdst = -1;
-// currtime.tm_sec = 0;
-//
-// time_t t = mktime(&currtime);
-//
-// int ret = alarmmgr_set_systime(t);
-// DBG("ret = %d", ret);
-//
-// elm_naviframe_item_pop(ad->nf);
-//
-// /* automatic freed!! */
-// Toast_Data *toast = _create_toast(ad, _("IDS_ST_TPOP_CHANGING_TIME_AND_DATE_SETTINGS_MAY_AFFECT_SOME_FUNCTIONS"));
-// if (toast) {
-// _show_toast(ad, toast);
-// }
-//
-// if (g_date_time_genlist) {
-// elm_genlist_realized_items_update(g_date_time_genlist);
-// }
-//}
-
-//static void _cancle_clicked_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// appdata *ad = data;
-//
-// if (!ad)
-// return;
-//
-// elm_naviframe_item_pop(ad->nf);
-//
-// if (ad->dt_genlist_item_of_time != NULL) {
-// elm_genlist_item_update(ad->dt_genlist_item_of_time);
-// }
-//
-// if (ad->dt_genlist_item_of_date != NULL) {
-// elm_genlist_item_update(ad->dt_genlist_item_of_date);
-// }
-//}
-
-//static void _datetime_auto_sync_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-//
-// int is_auto_sync = 0;
-//
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &is_auto_sync);
-//
-// is_auto_sync = !is_auto_sync;
-//
-// vconf_set_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, is_auto_sync);
-//
-// DBG("Setting - Auto sync : %s", is_auto_sync ? "TRUE" : "FALSE");
-//
-// if (auto_sync_check) {
-// elm_check_state_set(auto_sync_check, (is_auto_sync) ? EINA_TRUE : EINA_FALSE);
-// }
-//
-// if (date_item) {
-// elm_genlist_item_update(date_item);
-// /*elm_object_item_disabled_set(date_item, (is_auto_sync) ? EINA_TRUE : EINA_FALSE ); */
-// }
-// if (time_item) {
-// elm_genlist_item_update(time_item);
-// /*elm_object_item_disabled_set(time_item, (is_auto_sync) ? EINA_TRUE : EINA_FALSE ); */
-// }
-//}
-
-//static void _datetime_date_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-//
-// int is_auto_sync = 0;
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &is_auto_sync);
-// if (is_auto_sync) {
-// return;
-// }
-//
-// Evas_Object *scroller;
-// Evas_Object *layout, *btn;
-// Evas_Object *datetime;
-// Elm_Object_Item *it;
-// char *dt_fmt;
-// appdata *ad = (appdata *)data;
-//
-// if (!ad || !obj)
-// return;
-//
-// ad->dt_genlist_item_of_date = (Elm_Object_Item *)event_info;
-//
-// scroller = _create_scroller(ad->nf);
-// evas_object_data_set(scroller, "appdata", ad);
-//
-// layout = elm_layout_add(scroller);
-// elm_layout_file_set(layout, EDJE_PATH, "setting-test/datetime");
-// evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// datetime = elm_datetime_add(layout);
-// elm_object_style_set(datetime, "datepicker_layout");
-// elm_object_part_content_set(layout, "content", datetime);
-//
-// ad->datetime = datetime;
-//
-//#ifndef DESKTOP
-// dt_fmt = _date_format_get();
-// elm_datetime_format_set(datetime, dt_fmt);
-// FREE(dt_fmt);
-// register_vconf_changing(VCONFKEY_SETAPPL_DATE_FORMAT_INT, _vconf_date_format_changed_cb, datetime);
-// register_vconf_changing(VCONFKEY_SYSTEM_TIME_CHANGED, _vconf_date_format_changed_cb, datetime);
-//#endif
-//
-// btn = elm_button_add(layout);
-// elm_object_text_set(btn, _("IDS_ST_BUTTON_CANCEL_ABB2"));
-// evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// elm_object_part_content_set(layout, "btn1", btn);
-// evas_object_smart_callback_add(btn, "clicked", _cancle_clicked_cb, ad);
-//
-// btn = elm_button_add(layout);
-// elm_object_text_set(btn, _("IDS_COM_SK_SET_ABB"));
-// evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// elm_object_part_content_set(layout, "btn2", btn);
-// evas_object_smart_callback_add(btn, "clicked", _set_clicked_cb, ad);
-//
-// elm_object_content_set(scroller, layout);
-//
-// it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, scroller, NULL);
-// elm_naviframe_item_pop_cb_set(it, _clear_date_changed_cb, ad);
-// elm_naviframe_item_title_enabled_set(it, EINA_FALSE, EINA_FALSE);
-//}
-
-//static void _datetime_time_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-//
-// int is_auto_sync = 0;
-// vconf_get_bool(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, &is_auto_sync);
-// if (is_auto_sync) {
-// return;
-// }
-//
-// Evas_Object *scroller;
-// Evas_Object *layout, *btn;
-// Evas_Object *datetime;
-// Elm_Object_Item *it;
-// char *dt_fmt;
-// appdata *ad = (appdata *)data;
-//
-// if (!ad || !obj)
-// return;
-//
-// ad->dt_genlist_item_of_time = (Elm_Object_Item *)event_info;
-//
-// scroller = _create_scroller(ad->nf);
-// evas_object_data_set(scroller, "appdata", ad);
-//
-// layout = elm_layout_add(scroller);
-// elm_layout_file_set(layout, EDJE_PATH, "setting-test/datetime");
-// evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// datetime = elm_datetime_add(layout);
-// elm_object_style_set(datetime, "timepicker_layout");
-// elm_object_part_content_set(layout, "content", datetime);
-//
-// ad->datetime = datetime;
-//
-//#ifndef DESKTOP
-// dt_fmt = _time_format_get();
-// elm_datetime_format_set(datetime, dt_fmt);
-// DBG("datetime time format : %s", dt_fmt);
-// FREE(dt_fmt);
-// register_vconf_changing(VCONFKEY_REGIONFORMAT_TIME1224, _vconf_time_format_changed_cb, datetime);
-// register_vconf_changing(VCONFKEY_SYSTEM_TIME_CHANGED, _vconf_time_format_changed_cb, datetime);
-//#endif
-//
-// btn = elm_button_add(layout);
-// elm_object_text_set(btn, _("IDS_ST_BUTTON_CANCEL_ABB2"));
-// evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// elm_object_part_content_set(layout, "btn1", btn);
-// evas_object_smart_callback_add(btn, "clicked", _cancle_clicked_cb, ad);
-//
-// btn = elm_button_add(layout);
-// elm_object_text_set(btn, _("IDS_COM_SK_SET_ABB"));
-// evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// elm_object_part_content_set(layout, "btn2", btn);
-// evas_object_smart_callback_add(btn, "clicked", _set_clicked_cb, ad);
-//
-// elm_object_content_set(scroller, layout);
-//
-// it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, scroller, NULL);
-// elm_naviframe_item_pop_cb_set(it, _clear_time_changed_cb, ad);
-// elm_naviframe_item_title_enabled_set(it, EINA_FALSE, EINA_FALSE);
-//}
-
-//static void _alert_gl_del(void *data, Evas_Object *obj)
-//{
-// Alert_Item_Data *id = data;
-// FREE(id);
-//}
-//
-//char *_gl_alert_title_get(void *data, Evas_Object *obj, const char *part)
-//{
-// char buf[__SETTING_BUF_SIZE__] = {0,};
-// Alert_Item_Data *id = data;
-// int index = id->index;
-//
-// char *temps[] = { "IDS_ST_BODY_ON_M_STATUS", "IDS_ST_BODY_OFF_M_STATUS" };
-//
-// if (!strcmp(part, "elm.text")) {
-// snprintf(buf, sizeof(buf) - 1, "%s", _(temps[index]));
-// index++;
-// }
-// return strdup(buf);
-//}
-//
-//Evas_Object *_gl_alert_ridio_get(void *data, Evas_Object *obj, const char *part)
-//{
-// Evas_Object *radio = NULL;
-// Evas_Object *radio_main = evas_object_data_get(obj, "radio_main");
-// Alert_Item_Data *id = data;
-// int index = id->index;
-//
-// if (!strcmp(part, "elm.icon")) {
-// radio = elm_radio_add(obj);
-// elm_radio_state_value_set(radio, id->index);
-// evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
-// evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// elm_radio_group_add(radio, radio_main);
-//
-//#if 0
-// vconf_get_bool(VCONFKEY_SETAPPL_HOURLY_ALERT_BOOL, &is_alert_mode_type);
-//
-// is_alert_mode_type = !is_alert_mode_type;
-//
-// if (is_alert_mode_type == id->index) {
-// elm_radio_value_set(radio_main, is_alert_mode_type);
-// }
-//#endif
-// index++;
-// }
-// return radio;
-//}
-//
-//static void _hourly_gl_cb(void *data, Evas_Object *obj, void *event_info)
-//{
-// elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-//
-// is_alert_mode_type = (uintptr_t)data;
-//
-// elm_naviframe_item_pop(g_app_context->nf);
-// if (!g_app_context->alert_rdg) {
-// evas_object_del(g_app_context->alert_rdg);
-// g_app_context->alert_rdg = NULL;
-// }
-//
-//#if 0
-// clock_menu_its[2].type_num = is_alert_mode_type;
-// vconf_set_bool(VCONFKEY_SETAPPL_HOURLY_ALERT_BOOL, !is_alert_mode_type);
-//#endif
-// if (g_clock_genlist) {
-// elm_genlist_realized_items_update(g_clock_genlist);
-// }
-//
-// g_app_context = NULL;
-//}
-//
-//void _show_hourly_alert_list(void *data)
-//{
-// appdata *ad = data;
-// if (ad == NULL) {
-// DBG("%s", "_create_alert_list - appdata is null");
-// return;
-// }
-// Evas_Object *genlist = NULL;
-// Elm_Object_Item *nf_it = NULL;
-//
-// g_app_context = ad;
-//
-// Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
-// itc->item_style = "1text.1icon.1";
-// itc->func.text_get = _gl_alert_title_get;
-// itc->func.content_get = _gl_alert_ridio_get;
-// itc->func.del = _alert_gl_del;
-//
-// Evas_Object *layout = elm_layout_add(ad->nf);
-// elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
-// evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-//
-// genlist = elm_genlist_add(layout);
-// elm_genlist_block_count_set(genlist, 14);
-// elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
-// evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-// connect_to_wheel_with_genlist(genlist, ad);
-//
-// Alert_Item_Data *id = calloc(sizeof(Alert_Item_Data), 1);
-// if (id) {
-// id->index = 0;
-// id->item = elm_genlist_item_append(genlist, itc, id, NULL, ELM_GENLIST_ITEM_NONE, _hourly_gl_cb, (void *)0);
-// }
-//
-// Alert_Item_Data *id2 = calloc(sizeof(Alert_Item_Data), 1);
-// if (id2) {
-// id2->index = 1;
-// id2->item = elm_genlist_item_append(genlist, itc, id2, NULL, ELM_GENLIST_ITEM_NONE, _hourly_gl_cb, (void *)1);
-// }
-//
-// ad->alert_rdg = elm_radio_add(genlist);
-// elm_radio_state_value_set(ad->alert_rdg, 3);
-// elm_radio_value_set(ad->alert_rdg, is_alert_mode_type);
-//
-// evas_object_data_set(genlist, "radio_main", ad->alert_rdg);
-//
-// elm_genlist_item_class_free(itc);
-//
-// elm_object_part_content_set(layout, "elm.genlist", genlist);
-//
-// nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout, NULL);
-// elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-//}
-//
void _clocklist_load()
{
diff --git a/src/setting-connection.c b/src/setting-connection.c
index 1667f7a..f0b9d5b 100644
--- a/src/setting-connection.c
+++ b/src/setting-connection.c
@@ -54,7 +54,6 @@ void _nfc_cb(void *data, Evas_Object *obj, void *event_info);
void _location_cb(void *data, Evas_Object *obj, void *event_info);
static void bt_status_changed_cb(int result, bt_adapter_state_e adapter_state, void *user_data);
-static void wifi_status_vconf_changed_cb(keynode_t *key, void *data);
static void wifi_status_changed_cb(wifi_manager_device_state_e state, void *user_data);
static void nfc_status_vconf_changed_cb(bool activated, void *user_data);
static void location_status_vconf_changed_cb(keynode_t *key, void *data);
diff --git a/src/setting-display.c b/src/setting-display.c
index e451d47..ecc918d 100644
--- a/src/setting-display.c
+++ b/src/setting-display.c
@@ -35,8 +35,6 @@
#include "setting-display.h"
#include "setting_view_toast.h"
#include "setting-language.h"
-#include "setting-homescreen.h"
-#include "setting-motion.h"
#include "util.h"
#include "setting-clock.h"
diff --git a/src/setting-info.c b/src/setting-info.c
index 70b7f58..f5d2588 100644
--- a/src/setting-info.c
+++ b/src/setting-info.c
@@ -20,7 +20,6 @@
#include <stdint.h>
#include "setting-info.h"
-#include "setting-battery.h"
#include "util.h"
#include <bluetooth-api.h>
diff --git a/src/setting-privacy.c b/src/setting-privacy.c
deleted file mode 100644
index e161739..0000000
--- a/src/setting-privacy.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-privacy.c
- *
- * Created on: Jan 7, 2014
- * Author: Sunyeop Hwang
- */
-
-
-#include "setting-privacy.h"
-#include "setting_data_vconf.h"
-#include "util.h"
-
-static void _privacy_lock_cb(void *data, Evas_Object *obj, void *event_info);
-static void _privacy_help_cb(void *data, Evas_Object *obj, void *event_info);
-static void _privacy_pattern_enable_cb(void *data, Evas_Object *obj, void *event_info);
-static void _privacy_pattern_disable_cb(void *data, Evas_Object *obj, void *event_info);
-static void _create_privacy_pattern_list(void *data);
-
-static struct _privacy_menu_item privacy_menu_list[] = {
- { "IDS_LCKSCN_BODY_PRIVACY_LOCK_ABB", _privacy_lock_cb },
- { "IDS_ST_MBODY_HELP", _privacy_help_cb }
-};
-
-
-static struct _privacy_menu_item privacy_pattern_menu_list[] = {
- { "IDS_LCKSCN_HEADER_PIN", _privacy_pattern_enable_cb },
- { "IDS_LCKSCN_BODY_NONE", _privacy_pattern_disable_cb }
-};
-
-static char *lock_type_str[] = {
- "IDS_LCKSCN_BODY_NONE",
- "IDS_LCKSCN_HEADER_PIN"
-};
-
-static Evas_Object *g_privacy_genlist = NULL;
-
-int _get_lock_type_value()
-{
- int value = 0;
- if (vconf_get_int("db/setting/lock_type", &value) != 0) {
- ERR("error get vconf value!!");
- }
- return value;
-}
-
-int _set_lock_type_value(int value)
-{
- if (vconf_set_int("db/setting/lock_type", value) != 0) {
- ERR("error set vconf value!!");
- return FALSE;
- }
- return TRUE;
-}
-
-int _get_see_pattern_value()
-{
- int value = 0;
- if (vconf_get_bool("db/setting/see_pattern", &value) != 0) {
- ERR("error get vconf value!!");
- }
- return value;
-}
-
-int _set_see_pattern_value(int value)
-{
- if (vconf_set_bool("db/setting/see_pattern", value) != 0) {
- ERR("error set vconf value!!");
- return FALSE;
- }
- return TRUE;
-}
-
-static void _privacy_lock_setting_cb(app_control_h service, app_control_h reply, app_control_result_e result, void *data)
-{
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null");
- return;
- }
-
- if (result == APP_CONTROL_RESULT_SUCCEEDED) {
- _set_lock_type_value(1);
- elm_naviframe_item_pop(ad->nf);
-
- if (g_privacy_genlist) {
- elm_genlist_realized_items_update(g_privacy_genlist);
- }
- }
-}
-
-static void _privacy_lock_verify_cb(app_control_h service, app_control_h reply, app_control_result_e result, void *data)
-{
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null");
- return;
- }
-
- if (result == APP_CONTROL_RESULT_SUCCEEDED) {
- _create_privacy_pattern_list(ad);
- }
-}
-
-static void _gl_privacy_del(void *data, Evas_Object *obj)
-{
- Privacy_Item_Data *id = data;
- FREE(id);
-}
-
-char *_gl_privacy_pattern_title_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[__SETTING_BUF_SIZE__] = {0,};
- Item_Data *id = data;
- int index = id->index;
-
- if (!strcmp(part, "elm.text")) {
- snprintf(buf, sizeof(buf) - 1, "%s", _(privacy_pattern_menu_list[index].name));
- }
-
- return strdup(buf);
-}
-
-static void _privacy_pattern_enable_cb(void *data, Evas_Object *obj, void *event_info)
-{
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null");
- return;
- }
-
- app_control_h service;
- app_control_create(&service);
- app_control_set_app_id(service, "org.tizen.w-lockscreen-setting");
-
- app_control_add_extra_data(service, "type", "setting");
- app_control_send_launch_request(service, _privacy_lock_setting_cb, ad);
- app_control_destroy(service);
-}
-
-static void _privacy_pattern_disable_cb(void *data, Evas_Object *obj, void *event_info)
-{
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null");
- return;
- }
-
- _set_lock_type_value(0);
- elm_naviframe_item_pop(ad->nf);
-
- if (g_privacy_genlist) {
- elm_genlist_realized_items_update(g_privacy_genlist);
- }
-}
-
-static void _create_privacy_pattern_list(void *data)
-{
- appdata *ad = data;
-
- if (!ad) {
- ERR("appdata is null!!");
- return;
- }
-
- Evas_Object *genlist = NULL;
- Evas_Object *layout = NULL;
- Elm_Object_Item *nf_it = NULL;
- struct _privacy_menu_item *menu_list = NULL;
- int idx = 0;
-
- Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
- itc->item_style = "1text";
- itc->func.text_get = _gl_privacy_pattern_title_get;
- itc->func.del = _gl_privacy_del;
-
- layout = elm_layout_add(ad->nf);
- elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- genlist = elm_genlist_add(layout);
- elm_genlist_block_count_set(genlist, 14);
-
- connect_to_wheel_with_genlist(genlist, ad);
- menu_list = privacy_pattern_menu_list;
-
- for (idx = 0; idx < sizeof(privacy_pattern_menu_list) / sizeof(struct _privacy_menu_item); idx++) {
- Privacy_Item_Data *id = calloc(sizeof(Privacy_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(
- genlist, /* genlist object */
- itc, /* item class */
- id, /* data */
- NULL,
- ELM_GENLIST_ITEM_NONE,
- menu_list[idx].func, /* call back */
- ad);
- }
- }
-
- elm_genlist_item_class_free(itc);
-
- elm_object_part_content_set(layout, "elm.genlist", genlist);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout, NULL);
- elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-}
-
-char *_gl_privacy_title_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[__SETTING_BUF_SIZE__] = {0,};
- Item_Data *id = data;
- int index = id->index;
-
- if (!strcmp(part, "elm.text.1") || !strcmp(part, "elm.text")) {
- snprintf(buf, sizeof(buf) - 1, "%s", _(privacy_menu_list[index].name));
- } else if (!strcmp(part, "elm.text.2")) {
- snprintf(buf, sizeof(buf) - 1, "%s", _(lock_type_str[_get_lock_type_value()]));
- }
-
- return strdup(buf);
-}
-
-Evas_Object *_gl_privacy_content_get(void *data, Evas_Object *obj, const char *part)
-{
- Evas_Object *check = NULL;
-
- Privacy_Item_Data *id = data;
-
- if (!strcmp(part, "elm.icon")) {
- check = elm_check_add(obj);
- elm_check_state_set(check, (_get_see_pattern_value()) ? EINA_TRUE : EINA_FALSE);
- /*evas_object_smart_callback_add(check, "changed", _see_pattern_chk_changed_cb, (void *)1); */
- evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- id->check = check;
- }
- return check;
-}
-
-static void _privacy_lock_cb(void *data, Evas_Object *obj, void *event_info)
-{
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null");
- return;
- }
-
- if (!_get_lock_type_value()) {
- _create_privacy_pattern_list(ad);
- } else {
- app_control_h service;
- app_control_create(&service);
- app_control_set_app_id(service, "org.tizen.w-lockscreen-setting");
-
- app_control_add_extra_data(service, "type", "verify");
- app_control_send_launch_request(service, _privacy_lock_verify_cb, ad);
- app_control_destroy(service);
- }
-}
-
-void _create_help_popup(void *data)
-{
- Evas_Object *popup = NULL;
- Evas_Object *scroller = NULL;
- Evas_Object *label = NULL;
-
- appdata *ad = (appdata *) data;
- if (ad == NULL)
- return;
-
- popup = elm_popup_add(ad->nf);
- elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_translatable_part_text_set(popup, "title,text", "IDS_ST_MBODY_HELP");
-
- ad->popup = popup;
-
- scroller = elm_scroller_add(popup);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE);
- elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
- elm_object_style_set(scroller, "effect");
- elm_object_content_set(popup, scroller);
- evas_object_show(scroller);
-
- label = elm_label_add(scroller);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- elm_object_translatable_text_set(label, "IDS_LCKSCN_BODY_THE_PRIVACY_LOCK_OPTION_WILL_BE_SHOWN_WHEN_BLUETOOTH_IS_DISCONNECTED");
-
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_content_set(scroller, label);
- evas_object_show(label);
-
- /*ea_object_event_callback_add(popup, EA_CALLBACK_BACK, setting_popup_back_cb, ad); */
-
- evas_object_show(popup);
-}
-
-static void _privacy_help_cb(void *data, Evas_Object *obj, void *event_info)
-{
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_privcay_help_cb - ad is null");
- return;
- }
-
- _create_help_popup(ad);
-}
-
-Evas_Object *create_privacy_list(void *data)
-{
- appdata *ad = data;
-
- if (!ad) {
- ERR("appdata is null!!");
- return NULL;
- }
-
- Evas_Object *genlist = NULL;
- Evas_Object *layout = NULL;
- struct _privacy_menu_item *menu_list = NULL;
- int idx = 0;
-
- Elm_Genlist_Item_Class *itc = NULL;
-
- Elm_Genlist_Item_Class *itc_2text = elm_genlist_item_class_new();
- itc_2text->item_style = "2text";
- itc_2text->func.text_get = _gl_privacy_title_get;
- itc_2text->func.del = _gl_privacy_del;
-
- Elm_Genlist_Item_Class *itc_1text = elm_genlist_item_class_new();
- itc_1text->item_style = "1text";
- itc_1text->func.text_get = _gl_privacy_title_get;
- itc_1text->func.del = _gl_privacy_del;
-
- layout = elm_layout_add(ad->nf);
- elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- genlist = elm_genlist_add(layout);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- /*elm_genlist_block_count_set(genlist, 14); */
-
- connect_to_wheel_with_genlist(genlist, ad);
- menu_list = privacy_menu_list;
-
- for (idx = 0; idx < sizeof(privacy_menu_list) / sizeof(struct _privacy_menu_item); idx++) {
- if (idx == 0) {
- itc = itc_2text;
- } else {
- itc = itc_1text;
- }
-
- Privacy_Item_Data *id = calloc(sizeof(Privacy_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(
- genlist, /* genlist object */
- itc, /* item class */
- id, /* data */
- NULL,
- ELM_GENLIST_ITEM_NONE,
- menu_list[idx].func, /* call back */
- ad);
- }
- }
-
- elm_genlist_item_class_free(itc_2text);
- elm_genlist_item_class_free(itc_1text);
- itc = NULL;
-
- g_privacy_genlist = genlist;
-
- elm_object_part_content_set(layout, "elm.genlist", genlist);
-
- return layout;
-}
-
-Eina_Bool clear_privacy_cb(void *data, Elm_Object_Item *it)
-{
- g_privacy_genlist = NULL;
-
- return EINA_TRUE;
-}
-
diff --git a/src/setting-profile.c b/src/setting-profile.c
deleted file mode 100644
index afa0eb5..0000000
--- a/src/setting-profile.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- *
- * setting-profile.c (s-health)
- *
- */
-#include "setting-profile.h"
-#include "util.h"
-
-/* profile(s-health) */
-void _create_profile(void *data, Evas_Object *obj, void *event_info)
-{
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_create_profile - appdata is null");
- return;
- }
-
- app_control_h service;
- app_control_create(&service);
- app_control_set_app_id(service, PROFILE_APP_ID);
- app_control_set_operation(service, PROFILE_OP_ID);
- app_control_send_launch_request(service, NULL, NULL);
- app_control_destroy(service);
-}
-
diff --git a/src/setting-safety.c b/src/setting-safety.c
deleted file mode 100644
index 7dfd01b..0000000
--- a/src/setting-safety.c
+++ /dev/null
@@ -1,774 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-/*
- * setting-safety.c
- *
- * Created on: Jan 14, 2014
- * Author: min-hoyun
- */
-
-#include "setting-safety.h"
-#include "util.h"
-#include "setting_debug.h"
-#include "setting_data_vconf.h"
-
-/* */
-static void _emergency_mode_vconf_changed_cb(keynode_t *key, void *data);
-static void _emergency_mode_cb(void *data, Evas_Object *obj, void *event_info);
-#if 0 /* _NOT_USED_ */
-static void _trauma_cb(void *data, Evas_Object *obj, void *event_info);
-static void _no_activity_cb(void *data, Evas_Object *obj, void *event_info);
-static void _set_interval_cb(void *data, Evas_Object *obj, void *event_info);
-#endif
-static void _help_cb(void *data, Evas_Object *obj, void *event_info);
-
-#if 0 /* _NOT_USED */
-static void show_interval_list(void *data);
-static void _trauma_interval_cb(void *data, Evas_Object *obj, void *event_info);
-static void _no_activity_interval_cb(void *data, Evas_Object *obj, void *event_info);
-static void _show_interval_trauma_list(void *data);
-static void _show_interval_no_activity_list(void *data);
-#endif
-
-
-
-static struct _safety_menu_item safety_menu_list[] = {
- { "IDS_ST_MBODY_ULTRA_POWER_SAVING_MODE", NULL, _emergency_mode_cb },
- /* { "Trauma", NULL, _trauma_cb }, */
- /* { "No activity", NULL, _no_activity_cb }, */
- /* { "Set interval", NULL, _set_interval_cb }, */
- { "IDS_ST_MBODY_HELP", NULL, _help_cb }
-};
-
-#if 0 /* _NOT_USED */
-static struct _set_interval_menu_item interval_menu_list[] = {
- { "Trauma", "Warning %s", _trauma_interval_cb },
- { "No activity", "Warning %s", _no_activity_interval_cb }
-};
-
-static struct _interval_trauma_menu_item interval_trauma_time_arr[] = {
- { "After %s seconds", "30" },
- { "After %s minute" , "1" },
- { "After %s minutes", "5" },
- { "After %s minutes", "10" },
- { "After %s minutes", "20" },
-};
-
-static char *interval_no_activity_hour_arr[] = {
- "6", "12", "24", "48"
-};
-
-#endif
-
-static Safety_Data safety_data;
-static Evas_Object *g_safety_genlist = NULL;
-
-
-void initialize_safety()
-{
- DBG("initialize safety");
-
- safety_data.g_safety_genlist = NULL;
- safety_data.app_context = NULL;
-
- safety_data.interval_no_activity = 0;
- safety_data.interval_trauma = 0;
- safety_data.is_enable_no_activity = 0;
- safety_data.is_enable_trauma = 0;
- safety_data.is_support_emergency = 0;
-
- vconf_get_bool(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, &safety_data.is_enable_emergency_mode);
- register_vconf_changing(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, _emergency_mode_vconf_changed_cb, NULL);
-}
-
-Eina_Bool clear_safety_cb(void *data, Elm_Object_Item *it)
-{
- g_safety_genlist = NULL;
-
- unregister_vconf_changing(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, _emergency_mode_vconf_changed_cb);
-
- return EINA_TRUE;
-}
-
-static void _emergency_mode_vconf_changed_cb(keynode_t *key, void *data)
-{
- DBG("Setting - _emergency_mode_vconf_changed_cb() is called!");
-
- int enable = vconf_keynode_get_bool(key);
-
- if (enable == safety_data.is_enable_emergency_mode) {
- DBG("Setting - this value was set from Setting!!");
- return;
- } else {
- DBG("Setting - this value is set from WMS");
-
- safety_data.is_enable_emergency_mode = enable;
- if (g_safety_genlist) {
- elm_genlist_realized_items_update(g_safety_genlist);
- }
- }
-}
-
-static void _emergency_mode_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("emergency_mode_cb() is called.");
-
- Elm_Object_Item *it = (Elm_Object_Item *)event_info;
- elm_genlist_item_selected_set(it, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_emergency_mode_cb - ad is null");
- return;
- }
-
- if (safety_data.is_enable_emergency_mode) {
- /*confirm popup ok to off to device restart */
- _disable_emergency_popup_cb(data, obj, event_info);
- } else {
- safety_data.is_enable_emergency_mode = !safety_data.is_enable_emergency_mode;
- vconf_set_bool(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, safety_data.is_enable_emergency_mode);
-
- /*DBG("Setting - Emergency mode is %d", safety_data.is_enable_emergency_mode); */
- /*elm_genlist_item_update(it); */
- elm_exit(); /*gonna be changed regarding freezer */
- }
-}
-
-#if 0 /* _NOT_USED_ */
-static void _trauma_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("trauma_cb() is called.");
-
- Elm_Object_Item *it = (Elm_Object_Item *)event_info;
- elm_genlist_item_selected_set(it, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_emergency_mode_cb - ad is null");
- return;
- }
-
- safety_data.is_enable_trauma = !safety_data.is_enable_trauma;
-
- elm_genlist_item_update(it);
-}
-
-static void _no_activity_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_no_activity_cb() is called.");
-
- Elm_Object_Item *it = (Elm_Object_Item *)event_info;
- elm_genlist_item_selected_set(it, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_no_activity_cb - ad is null");
- return;
- }
-
- safety_data.is_enable_no_activity = !safety_data.is_enable_no_activity;
-
- elm_genlist_item_update(it);
-}
-
-static void _set_interval_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_set_interval_cb() is called.");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_set_interval_cb - ad is null");
- return;
- }
-
- show_interval_list(ad);
-}
-#endif
-
-static void _help_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_help_cb() is called.");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- appdata *ad = data;
- if (ad == NULL) {
- DBG("%s", "_help_cb - ad is null");
- return;
- }
- _help_popup_cb(data, obj, event_info);
-}
-
-static int _is_enable(int index)
-{
- int enable = DISABLE;
- switch (index) {
- case 0:
- vconf_get_bool(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, &safety_data.is_enable_emergency_mode);
- enable = safety_data.is_enable_emergency_mode;
- break;
- case 1:
- enable = safety_data.is_enable_trauma;
- break;
- case 2:
- enable = safety_data.is_enable_no_activity;
- break;
- case 3:
- break;
- case 4:
- break;
- }
- return enable;
-}
-
-static char *_gl_safety_title_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[__SETTING_BUF_SIZE__] = {0,};
- Safety_Item_Data *id = data;
- int index = id->index;
-
- if (!strcmp(part, "elm.text.1") || !strcmp(part, "elm.text")) {
- snprintf(buf, sizeof(buf) - 1, "%s", _(safety_menu_list[index].name));
- } else if (!strcmp(part, "elm.text.2")) {
- snprintf(buf, sizeof(buf) - 1, "%s", _is_enable(index) ? _("IDS_EMAIL_BODY_ENABLED_M_STATUS") : _("IDS_ST_BODY_DISABLED_M_STATUS"));
- }
- return strdup(buf);
-}
-
-Evas_Object *_gl_safety_check_get(void *data, Evas_Object *obj, const char *part)
-{
- Evas_Object *check = NULL;
-
- Safety_Item_Data *id = data;
- int index = id->index;
-
- if (!strcmp(part, "elm.icon")) {
- check = elm_check_add(obj);
- elm_check_state_set(check, _is_enable(index) ? EINA_TRUE : EINA_FALSE);
- evas_object_size_hint_align_set(check, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(check, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- }
-
- return check;
-}
-
-static void _gl_safety_del(void *data, Evas_Object *obj)
-{
- Safety_Item_Data *id = data;
- FREE(id);
-}
-
-Evas_Object *create_safety_list(void *data)
-{
- DBG("create_safety_list() is called.");
-
- appdata *ad = data;
- if (ad == NULL) {
- ERR("appdata is null!!");
- return NULL;
- }
-
- Evas_Object *genlist = NULL;
- Evas_Object *layout = NULL;
- Elm_Genlist_Item_Class *itc_temp = NULL;
- struct _safety_menu_item *menu_list = NULL;
- int idx = 0;
-
- Elm_Genlist_Item_Class *itc_1text_1check = elm_genlist_item_class_new();
- itc_1text_1check->item_style = "1text.1icon.1";
- itc_1text_1check->func.text_get = _gl_safety_title_get;
- itc_1text_1check->func.content_get = _gl_safety_check_get;
- itc_1text_1check->func.del = _gl_safety_del;
-
- Elm_Genlist_Item_Class *itc_2text_1check = elm_genlist_item_class_new();
- itc_2text_1check->item_style = "2text.1icon.1";
- itc_2text_1check->func.text_get = _gl_safety_title_get;
- itc_2text_1check->func.content_get = _gl_safety_check_get;
- itc_2text_1check->func.del = _gl_safety_del;
-
- Elm_Genlist_Item_Class *itc_1text = elm_genlist_item_class_new();
- itc_1text->item_style = "1text";
- itc_1text->func.text_get = _gl_safety_title_get;
- itc_1text->func.del = _gl_safety_del;
-
- layout = elm_layout_add(ad->nf);
- elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- genlist = elm_genlist_add(layout);
- elm_genlist_block_count_set(genlist, 14);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- connect_to_wheel_with_genlist(genlist, ad);
-
- menu_list = safety_menu_list;
-
- int count = 0;
- count = sizeof(safety_menu_list) / sizeof(struct _safety_menu_item);
-
- for (idx = 0; idx < count; idx++) {
- if (idx == 0) {
- itc_temp = itc_2text_1check;
- }
-#if 0
- else if (idx > 0 && idx < 3) {
- itc_temp = itc_1text_1check;
- }
-#endif
- else {
- itc_temp = itc_1text;
- }
-
- Safety_Item_Data *id = calloc(sizeof(Safety_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(
- genlist, /* genlist object */
- itc_temp, /* item class */
- id, /* data */
- NULL,
- ELM_GENLIST_ITEM_NONE,
- menu_list[idx].func, /* call back */
- ad);
- if (idx == 0) {
- vconf_get_bool("db/setting/support_emergency", &safety_data.is_support_emergency);
- /*not support list for emergency mode */
- if (!safety_data.is_support_emergency)
- elm_object_item_disabled_set(id->item, EINA_TRUE);
- }
- }
- }
-
- elm_genlist_item_class_free(itc_2text_1check);
- elm_genlist_item_class_free(itc_1text_1check);
- elm_genlist_item_class_free(itc_1text);
-
- elm_object_part_content_set(layout, "elm.genlist", genlist);
-
- return layout;
-}
-
-#if 0 /* _NOT_USED */
-static void _trauma_interval_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_trauma_interval_cb() is called.");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- _show_interval_trauma_list(data);
-}
-
-static void _no_activity_interval_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_no_activity_interval_cb() is called.");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- _show_interval_no_activity_list(data);
-}
-
-static char *_gl_interval_title_get(void *data, Evas_Object *obj, const char *part)
-{
- DBG("_gl_interval_title_get() is called.");
-
- char buf[__SETTING_BUF_SIZE__] = {0,};
- Safety_Item_Data *id = data;
- int index = id->index;
-
- if (!strcmp(part, "elm.text.1")) {
- snprintf(buf, sizeof(buf) - 1, "%s", interval_menu_list[index].title);
- } else if (!strcmp(part, "elm.text.2")) {
- snprintf(buf, sizeof(buf) - 1, interval_menu_list[index].sub_title, "after 30 seconds");
- }
- return strdup(buf);
-}
-
-static void show_interval_list(void *data)
-{
- DBG("show_interval_list() is called.");
-
- appdata *ad = data;
- if (!ad) {
- ERR("appdata is null!!");
- return;
- }
-
- Evas_Object *genlist = NULL;
- Evas_Object *layout = NULL;
- Elm_Object_Item *nf_it = NULL;
- struct _set_interval_menu_item *menu_list = NULL;
- int idx = 0;
-
- Elm_Genlist_Item_Class *itc_2text = elm_genlist_item_class_new();
- itc_2text->item_style = "2text";
- itc_2text->func.text_get = _gl_interval_title_get;
- itc_2text->func.del = _gl_safety_del;
-
- layout = elm_layout_add(ad->nf);
- elm_layout_file_set(layout, EDJE_PATH, "setting/genlist/layout");
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-
- genlist = elm_genlist_add(layout);
- elm_genlist_block_count_set(genlist, 14);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
-
- menu_list = interval_menu_list;
-
- int count = 0;
- count = sizeof(interval_menu_list) / sizeof(struct _set_interval_menu_item);
-
- for (idx = 0; idx < count; idx++) {
- Safety_Item_Data *id = calloc(sizeof(Safety_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(
- genlist, /* genlist object */
- itc_2text, /* item class */
- id, /* data */
- NULL,
- ELM_GENLIST_ITEM_NONE,
- menu_list[idx].func, /* call back */
- ad);
- }
- }
-
- elm_genlist_item_class_free(itc_2text);
-
- elm_object_part_content_set(layout, "elm.genlist", genlist);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, layout, NULL);
- elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-}
-
-
-static char *_gl_interval_trauma_title_get(void *data, Evas_Object *obj, const char *part)
-{
- DBG("_gl_interval_trauma_title_get() is called.");
-
- char buf[512] = {0,};
- Safety_Item_Data *id = data;
-
- if (!strcmp(part, "elm.text")) {
- snprintf(buf, sizeof(buf) - 1, interval_trauma_time_arr[id->index].str,
- interval_trauma_time_arr[id->index].time);
- }
- return strdup(buf);
-}
-
-static Evas_Object *_gl_interval_trauma_ridio_get(void *data, Evas_Object *obj, const char *part)
-{
- DBG("_gl_interval_trauma_ridio_get() is called.");
-
- Evas_Object *radio = NULL;
- Evas_Object *radio_main = evas_object_data_get(obj, "radio_main");
- Safety_Item_Data *id = data;
-
- if (!strcmp(part, "elm.icon")) {
- radio = elm_radio_add(obj);
- elm_radio_state_value_set(radio, id->index);
- evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_radio_group_add(radio, radio_main);
-
- if (safety_data.interval_trauma == id->index) {
- elm_radio_value_set(radio_main, safety_data.interval_trauma);
- }
- }
- return radio;
-}
-
-static void _trauma_interval_radio_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_trauma_interval_radio_cb is called!");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- DBG("selected trauma interval : %d", (int *)data);
-
- if (safety_data.app_context) {
- elm_naviframe_item_pop(safety_data.app_context->nf);
- }
-}
-
-static void _show_interval_trauma_list(void *data)
-{
- DBG("_show_interval_trauma_list() is called.");
-
- appdata *ad = data;
- if (ad == NULL) {
- ERR("%s", "_show_interval_trauma_list - appdata is null");
- return;
- }
- Evas_Object *genlist = NULL;
- Elm_Object_Item *nf_it = NULL;
- int idx;
-
- safety_data.app_context = ad;
-
- Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
- itc->item_style = "1text.1icon.1";
- itc->func.text_get = _gl_interval_trauma_title_get;
- itc->func.content_get = _gl_interval_trauma_ridio_get;
- itc->func.del = _gl_safety_del;
-
- genlist = elm_genlist_add(ad->nf);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- connect_to_wheel_with_genlist(genlist, ad);
-
- const int count = sizeof(interval_trauma_time_arr) / sizeof(interval_trauma_time_arr[0]);
- for (idx = 0; idx < count; idx++) {
- Safety_Item_Data *id = calloc(sizeof(Safety_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(genlist,
- itc,
- id,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _trauma_interval_radio_cb,
- (void *)idx);
- }
- }
-
- ad->safety_interval_trauma_rdg = elm_radio_add(genlist);
- elm_radio_state_value_set(ad->safety_interval_trauma_rdg, count);
- elm_radio_value_set(ad->safety_interval_trauma_rdg, count);
-
- evas_object_data_set(genlist, "radio_main", ad->safety_interval_trauma_rdg);
-
- elm_genlist_item_class_free(itc);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, NULL);
- elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-}
-
-static char *_gl_interval_no_activity_title_get(void *data, Evas_Object *obj, const char *part)
-{
- char buf[512] = {0,};
- Safety_Item_Data *id = data;
-
- if (!strcmp(part, "elm.text")) {
- snprintf(buf, sizeof(buf) - 1, "After %s hours", interval_no_activity_hour_arr[id->index]);
- }
- return strdup(buf);
-}
-
-static Evas_Object *_gl_interval_no_activity_ridio_get(void *data, Evas_Object *obj, const char *part)
-{
- Evas_Object *radio = NULL;
- Evas_Object *radio_main = evas_object_data_get(obj, "radio_main");
- Safety_Item_Data *id = data;
-
- if (!strcmp(part, "elm.icon")) {
- radio = elm_radio_add(obj);
- elm_radio_state_value_set(radio, id->index);
- evas_object_size_hint_align_set(radio, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_size_hint_weight_set(radio, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_radio_group_add(radio, radio_main);
-
- if (safety_data.interval_no_activity == id->index) {
- elm_radio_value_set(radio_main, safety_data.interval_no_activity);
- }
- }
- return radio;
-}
-
-static void _no_activity_interval_radio_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("_no_activity_interval_radio_cb is called!");
-
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-
- DBG("selected no activity interval : %d", (int *)data);
-
- if (safety_data.app_context) {
- elm_naviframe_item_pop(safety_data.app_context->nf);
- }
-}
-
-static void _show_interval_no_activity_list(void *data)
-{
- DBG("_show_interval_no_activity_list() is called.");
-
- appdata *ad = data;
- if (ad == NULL) {
- ERR("%s", "_show_interval_no_activity_list - appdata is null");
- return;
- }
- Evas_Object *genlist = NULL;
- Elm_Object_Item *nf_it = NULL;
- int idx;
-
- safety_data.app_context = ad;
-
- Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
- itc->item_style = "1text.1icon.1";
- itc->func.text_get = _gl_interval_no_activity_title_get;
- itc->func.content_get = _gl_interval_no_activity_ridio_get;
- itc->func.del = _gl_safety_del;
-
- genlist = elm_genlist_add(ad->nf);
- elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
- connect_to_wheel_with_genlist(genlist, ad);
-
- const int count = sizeof(interval_no_activity_hour_arr) / sizeof(interval_no_activity_hour_arr[0]);
- for (idx = 0; idx < count; idx++) {
- Safety_Item_Data *id = calloc(sizeof(Safety_Item_Data), 1);
- if (id) {
- id->index = idx;
- id->item = elm_genlist_item_append(genlist,
- itc,
- id,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- _no_activity_interval_radio_cb,
- (void *)idx);
- }
- }
-
- ad->safety_interval_no_activity_rdg = elm_radio_add(genlist);
- elm_radio_state_value_set(ad->safety_interval_no_activity_rdg, count);
- elm_radio_value_set(ad->safety_interval_no_activity_rdg, count);
-
- evas_object_data_set(genlist, "radio_main", ad->safety_interval_no_activity_rdg);
-
- elm_genlist_item_class_free(itc);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, NULL);
- elm_naviframe_item_title_enabled_set(nf_it, EINA_FALSE, EINA_FALSE);
-}
-#endif
-
-void _help_popup_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Object *popup = NULL;
- Evas_Object *scroller = NULL;
- Evas_Object *label = NULL;
-
- appdata *ad = (appdata *) data;
- if (ad == NULL)
- return;
-
- popup = elm_popup_add(ad->nf);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(popup, "title,text", _("IDS_ST_MBODY_HELP"));
-
- ad->popup = popup;
-
- scroller = elm_scroller_add(popup);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE);
- elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
- elm_object_content_set(popup, scroller);
- evas_object_show(scroller);
-
- label = elm_label_add(scroller);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- char *txt = elm_entry_utf8_to_markup(_("IDS_ST_BODY_THE_HOME_SCREEN_WILL_BE_CHANGED_TO_THE_BLACK_THEME_TO_REDUCE_BATTERY_CONSUMPTION_MSG"));
- elm_object_text_set(label, txt);
- FREE(txt);
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_content_set(scroller, label);
- evas_object_show(label);
-
- /*ea_object_event_callback_add(popup, EA_CALLBACK_BACK, setting_popup_back_cb, ad); */
-
- evas_object_show(popup);
-}
-
-static void _disable_emergency_cancel_cb(void *data, Evas_Object *obj, void *event_info)
-{
- appdata *ad = (appdata *) data;
- if (ad == NULL)
- return;
-
- if (ad->popup) {
- evas_object_del(data);
- ad->popup = NULL;
- }
-}
-
-static void _disable_emergency_ok_cb(void *data, Evas_Object *obj, void *event_info)
-{
- appdata *ad = data;
-
- if (ad == NULL) {
- DBG("%s", "_disable_emergency_ok_cb : appdata is null");
- return;
- }
-
- if (ad->popup) {
- evas_object_del(data);
- ad->popup = NULL;
- }
-
- safety_data.is_enable_emergency_mode = EINA_FALSE;
- vconf_set_bool(VCONFKEY_SETAPPL_EMERGENCY_STATUS_BOOL, safety_data.is_enable_emergency_mode);
- vconf_set_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS, VCONFKEY_SYSMAN_POWER_OFF_RESTART);
-}
-
-void _disable_emergency_popup_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Object *popup = NULL;
- Evas_Object *btn = NULL;
- Evas_Object *scroller = NULL;
- Evas_Object *label = NULL;
-
- appdata *ad = (appdata *) data;
- if (ad == NULL)
- return;
-
- popup = elm_popup_add(ad->nf);
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_part_text_set(popup, "title,text", _("Disable Ultra power saving mode"));
-
- ad->popup = popup;
-
- scroller = elm_scroller_add(popup);
- evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_content_set(popup, scroller);
- evas_object_show(scroller);
-
- label = elm_label_add(scroller);
- elm_object_style_set(label, "popup/default");
- elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
- char *txt = elm_entry_utf8_to_markup(_("IDS_ST_POP_TO_DISABLE_ULTRA_POWER_SAVING_MODE_YOUR_DEVICE_WILL_RESTART"));
- elm_object_text_set(label, txt);
- FREE(txt);
- evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_content_set(scroller, label);
- evas_object_show(label);
-
- /*ea_object_event_callback_add(popup, EA_CALLBACK_BACK, setting_popup_back_cb, ad); */
-
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "default");
- evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_text_set(btn, _("IDS_ST_BUTTON_CANCEL_ABB2"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", _disable_emergency_cancel_cb, popup);
-
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "default");
- evas_object_size_hint_weight_set(btn, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_text_set(btn, _("IDS_WNOTI_BUTTON_OK_ABB2"));
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", _disable_emergency_ok_cb, popup);
-
- evas_object_show(popup);
-}
-
-
diff --git a/src/setting-sound.c b/src/setting-sound.c
index 03e05b1..49bf5fa 100644
--- a/src/setting-sound.c
+++ b/src/setting-sound.c
@@ -456,9 +456,6 @@ char *_gl_Sound_title_get(void *data, Evas_Object *obj, const char *part)
break;
case SETTING_SOUND_MENU_RINGTONE:
system_settings_get_value_string(SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, &pa_cur_ringtone);
- if (pa_cur_ringtone == NULL) {
- pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR);
- }
if (pa_cur_ringtone && (strlen(pa_cur_ringtone) < 1024)) {
strncpy(curr_ringtone_file_path, pa_cur_ringtone, sizeof(curr_ringtone_file_path)-1);
DBG("Setting - ringtone path : %s", pa_cur_ringtone);
@@ -466,30 +463,6 @@ char *_gl_Sound_title_get(void *data, Evas_Object *obj, const char *part)
snprintf(buf, sizeof(buf) - 1, text_color, _get_sound_file_name(pa_cur_ringtone));
}
break;
-#if 0
- case 4:
- pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR);
- if (pa_cur_ringtone == NULL) {
- pa_cur_ringtone = vconf_get_str(VCONFKEY_SETAPPL_NOTI_RINGTONE_DEFAULT_PATH_STR);
- }
- if (pa_cur_ringtone && (strlen(pa_cur_ringtone) < 1024)) {
- strcpy(curr_noti_file_path, pa_cur_ringtone);
- DBG("Setting - noti's ringtone path : %s", pa_cur_ringtone);
-
- snprintf(buf, sizeof(buf) - 1, "%s", _get_sound_file_name(pa_cur_ringtone));
- }
- break;
- case 5:
- vibrate_type = get_vibration_level();
- snprintf(buf, sizeof(buf) - 1, "%s", _(vibration_str[vibrate_type % 2]));
- break;
-
- case 6:
- vconf_get_bool(VCONFKEY_SETAPPL_PERFERED_ARM_LEFT_BOOL, &pref_arm_type);
- pref_arm_type = (pref_arm_type == TRUE) ? 0 : 1;
- snprintf(buf, sizeof(buf)-1, "%s", _(pref_arm_str[pref_arm_type % 2]));
- break;
-#endif
}
}
diff --git a/src/setting.c b/src/setting.c
index 8e235ac..b605fad 100644
--- a/src/setting.c
+++ b/src/setting.c
@@ -21,21 +21,14 @@
#include "setting-volume.h"
#include "setting-clock.h"
#include "setting-info.h"
-#include "setting-bluetooth.h"
-#include "setting-motion.h"
#include "setting-display.h"
#include "setting-language.h"
#include "setting-device.h"
-#include "setting-privacy.h"
#include "setting-connection.h"
-#include "setting-safety.h"
-#include "setting-profile.h"
#include "util.h"
#include "setting-common-sound.h"
#include "setting.h"
-#include "setting_control_bt.h"
#include "setting_view_toast.h"
-#include "setting_indicator_util.h"
static struct _main_menu_item setting_menu_its[] = {
{ SETTING_MAIN_MENU_WATCH_FACE_STYLES, "WDS_CLOCK_MBODY_WATCH_FACES_AND_STYLES", "b_settings_list_watchface_style.png", clock_cb },
@@ -386,30 +379,6 @@ static Eina_Bool _scroller_timer_cb(void *data)
return ECORE_CALLBACK_CANCEL;
}
-void profile_cb(void *data, Evas_Object *obj, void *event_info)
-{
- DBG("profile cb");
-
- setting_ret_if(!data);
-
- if (running) {
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
- return;
- }
-
- if (!running) {
- _create_profile(data, obj, event_info);
- running = true;
-
- if (running_timer) {
- ecore_timer_del(running_timer);
- running_timer = NULL;
- }
- running_timer = ecore_timer_add(0.5, (Ecore_Task_Cb)_app_ctrl_timer_cb, NULL);
- }
- elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-}
-
void account_cb(void *data, Evas_Object *obj, void *event_info)
{
elm_genlist_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
@@ -768,21 +737,6 @@ static void _gl_del(void *data, Evas_Object *obj)
FREE(id);
}
-static Evas_Object *_gl_indicator_get(void *data, Evas_Object *obj, const char *part)
-{
- Evas_Object *layout = NULL;
-
- layout = elm_layout_add(obj);
- elm_layout_file_set(layout, EDJE_PATH, "setting/indicator");
-
- evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- indicator_view_update(layout);
- evas_object_show(layout);
- DBG("indicator get!!!!!!!!");
-
- return layout;
-}
-
static Evas_Object *_create_mainlist_winset(Evas_Object *parent, appdata *ad)
{
Evas_Object *genlist = NULL;
@@ -791,10 +745,6 @@ static Evas_Object *_create_mainlist_winset(Evas_Object *parent, appdata *ad)
/* Create item class */
elm_theme_extension_add(NULL, EDJE_PATH);
- Elm_Genlist_Item_Class *itc_tmp = elm_genlist_item_class_new();
- itc_tmp->item_style = "setting_indicator";
- itc_tmp->func.content_get = _gl_indicator_get;
- itc_tmp->func.del = _gl_del;
Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new();
itc->item_style = "1text.1icon";
@@ -805,26 +755,10 @@ static Evas_Object *_create_mainlist_winset(Evas_Object *parent, appdata *ad)
genlist = elm_genlist_add(ad->nf);
if (genlist == NULL) {
elm_genlist_item_class_free(itc);
- elm_genlist_item_class_free(itc_tmp);
return NULL;
}
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
-#if 0
- Item_Data *id_indi = calloc(sizeof(Item_Data), 1);
- if (id_indi) {
- id_indi->index = idx;
- id_indi->item = elm_genlist_item_append(
- genlist,
- itc_tmp,
- id_indi,
- NULL,
- ELM_GENLIST_ITEM_NONE,
- NULL, NULL);
- elm_genlist_item_select_mode_set(id_indi->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- }
-
-#endif
int item_count = 0;
menu_its = setting_menu_its;
@@ -859,7 +793,6 @@ static Evas_Object *_create_mainlist_winset(Evas_Object *parent, appdata *ad)
}
elm_genlist_item_class_free(itc);
- elm_genlist_item_class_free(itc_tmp);
Elm_Genlist_Item_Class *padding = elm_genlist_item_class_new();
padding->item_style = "padding";
@@ -873,8 +806,6 @@ static Evas_Object *_create_mainlist_winset(Evas_Object *parent, appdata *ad)
ad->main_genlist = genlist;
- indicator_set_vconf_changed_cb(ad);
-
return genlist;
}
@@ -1008,7 +939,6 @@ void app_terminate(void *data)
setting_ret_if(!data);
feedback_deinitialize();
- indicator_unset_vconf_changed_cb();
if (ad->alert_rdg) {
ad->alert_rdg = NULL;
diff --git a/src/setting_indicator_util.c b/src/setting_indicator_util.c
deleted file mode 100644
index 8cb62c1..0000000
--- a/src/setting_indicator_util.c
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 2010 Samsung Electronics, Inc.
- * All rights reserved.
- *
- * This software is a confidential and proprietary information
- * of Samsung Electronics, Inc. ("Confidential Information"). You
- * shall not disclose such Confidential Information and shall use
- * it only in accordance with the terms of the license agreement
- * you entered into with Samsung Electronics.
- */
-#include <bluetooth.h>
-#include <vconf-keys.h>
-#include <vconf.h>
-
-#include "setting_data_vconf.h"
-#include "setting_indicator_util.h"
-
-void indicator_vconf_changed_cb(keynode_t *node, void *data)
-{
- appdata *ad = data;
-
- if (!ad) {
- ERR("appdata is null!!");
- return;
- }
-
- Evas_Object *layout = NULL;
-
- layout = elm_object_item_part_content_get(elm_genlist_first_item_get(ad->main_genlist), "elm.icon");
- indicator_view_update(layout);
-}
-
-void _indicator_set_BT_icon(keynode_t *node, void *data)
-{
- Evas_Object *layout = data;
- int isBTOn = 0, sap_connected = 0, headset_connected = 0;
-
- if (vconf_get_int(VCONFKEY_BT_STATUS, &isBTOn) != 0) {
- DBG("vconf_get_int() failed");
- isBTOn = 0;
- }
-
- elm_object_signal_emit(layout, "hideHeadset", "img.headset");
-
- if (isBTOn) {
- vconf_get_bool(VCONFKEY_WMS_WMANAGER_CONNECTED, &sap_connected);
- DBG("SAP conntected : %d", sap_connected);
- if (sap_connected == 0) {
- elm_object_signal_emit(layout, "showUnconnctedBTicon", "img.bluetooth");
- } else {
- elm_object_signal_emit(layout, "showConnectedBTicon", "img.bluetooth");
- }
- vconf_get_int(VCONFKEY_BT_DEVICE, &headset_connected);
- DBG("Heaadset connected : %x", headset_connected);
- if (headset_connected & VCONFKEY_BT_DEVICE_A2DP_HEADSET_CONNECTED) {
- elm_object_signal_emit(layout, "showHeadset", "img.headset");
- } else {
- elm_object_signal_emit(layout, "hideHeadset", "img.headset");
- }
- } else {
- elm_object_signal_emit(layout, "hideBTicon", "img.bluetooth");
- elm_object_signal_emit(layout, "hideHeadset", "img.headset");
- }
-}
-
-void _indicator_set_battery_icon(keynode_t *node, void *data)
-{
- int battery_level = 100;
- int is_battery_display = -1;
- char buf[__SETTING_BUF_SIZE__] = {0,};
- char buf2[5] = {0,};
- Evas_Object *icon = NULL;
-
- Evas_Object *layout = data;
-
- icon = elm_object_part_content_get(layout, "sw.battery");
- if (icon == NULL) {
- icon = elm_layout_add(layout);
- elm_layout_file_set(icon, EDJE_PATH, "setting/indicator/battery_icon");
- evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_object_part_content_set(layout, "sw.battery", icon);
- }
-
- vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &battery_level);
- vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &is_battery_display);
- if (is_battery_display) {
- char *level = (char *)_get_strnum_from_icu(battery_level);
- if (level) {
- DBG("%s %d", level, strlen(level));
- if (strlen(level) > 6) {
- snprintf(buf, sizeof(buf) - 1, "%d%%", battery_level);
- } else {
- snprintf(buf, sizeof(buf) - 1, "%s%%", level);
- }
- elm_object_part_text_set(layout, "txt.battery", buf);
- }
- FREE(level);
- } else {
- elm_object_part_text_set(layout, "txt.battery", "");
- }
-
- int is_charged;
- vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &is_charged);
- DBG("battery_level: %d, isCharging: %d", battery_level, is_charged);
- if (is_charged == 1) {
- snprintf(buf, sizeof(buf) - 1, "change_charging_level_");
- } else if (is_charged == 0) {
- snprintf(buf, sizeof(buf) - 1, "change_level_");
- } else if (is_charged == -1) {
- DBG("Battery charging has problem");
- elm_object_part_text_set(layout, "txt.battery", "");
- snprintf(buf, sizeof(buf) - 1, "change_level_");
- }
- battery_level /= 5;
- battery_level *= 5;
- snprintf(buf2, sizeof(buf2) - 1, "%02d", battery_level);
- strncat(buf, buf2, sizeof(buf) - 1);
- DBG("battery file : %s", buf);
- elm_object_signal_emit(icon, buf, "img.battery");
- elm_object_signal_emit(layout, "showBattery", "sw.battery");
-}
-
-void indicator_view_update(Evas_Object *layout)
-{
- /* BT */
- _indicator_set_BT_icon(NULL, layout);
-
- /* battery */
- _indicator_set_battery_icon(NULL, layout);
-}
-
-void indicator_set_vconf_changed_cb(void *data)
-{
- register_vconf_changing(VCONFKEY_WMS_WMANAGER_CONNECTED, indicator_vconf_changed_cb, data);
- register_vconf_changing(VCONFKEY_SYSMAN_BATTERY_CAPACITY, indicator_vconf_changed_cb, data);
- register_vconf_changing(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, indicator_vconf_changed_cb, data);
- register_vconf_changing(VCONFKEY_BT_DEVICE, indicator_vconf_changed_cb, data);
-}
-
-void indicator_unset_vconf_changed_cb()
-{
- unregister_vconf_changing(VCONFKEY_WMS_WMANAGER_CONNECTED, indicator_vconf_changed_cb);
- unregister_vconf_changing(VCONFKEY_SYSMAN_BATTERY_CAPACITY, indicator_vconf_changed_cb);
- unregister_vconf_changing(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, indicator_vconf_changed_cb);
- unregister_vconf_changing(VCONFKEY_BT_DEVICE, indicator_vconf_changed_cb);
-}