summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2016-04-29 14:31:36 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2016-04-29 14:32:03 +0900
commitfe0631f412ce62550ea20a34196238ec9643dd74 (patch)
tree7f10a1180e28fe86cc907d799ccdff0a8a581186
parente2d812592137a89b72bf7036ad5856efd0c9c00f (diff)
downloadsettings-fe0631f412ce62550ea20a34196238ec9643dd74.tar.gz
settings-fe0631f412ce62550ea20a34196238ec9643dd74.tar.bz2
settings-fe0631f412ce62550ea20a34196238ec9643dd74.zip
Change-Id: Iccfb95be7d1934d9624b3fe581b2c1bcc4f51f7b Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
-rw-r--r--packaging/.org.tizen.setting.spec.swpbin16384 -> 0 bytes
-rw-r--r--resource/setting-genlist.edc215
-rwxr-xr-xsetting-common/include/setting-common-draw-widget.h2
-rw-r--r--setting-common/src/setting-common-draw-widget.c16
-rw-r--r--[-rwxr-xr-x]setting-time/include/setting-time-main.h30
-rw-r--r--setting-time/include/setting-time.h7
-rwxr-xr-xsetting-time/src/setting-time-engine.c2
-rw-r--r--[-rwxr-xr-x]setting-time/src/setting-time-main.c356
-rw-r--r--[-rwxr-xr-x]setting-time/src/setting-time.c151
9 files changed, 469 insertions, 310 deletions
diff --git a/packaging/.org.tizen.setting.spec.swp b/packaging/.org.tizen.setting.spec.swp
deleted file mode 100644
index 5acec8c..0000000
--- a/packaging/.org.tizen.setting.spec.swp
+++ /dev/null
Binary files differ
diff --git a/resource/setting-genlist.edc b/resource/setting-genlist.edc
index 624d0a6..789c950 100644
--- a/resource/setting-genlist.edc
+++ b/resource/setting-genlist.edc
@@ -488,6 +488,221 @@ collections {
}
}
+//****************************************************************************//
+// Genlist
+//****************************************************************************//
+// Tizen 2.4
+#define GENLIST_ITEM_1LINE_HEIGHT_INC 120
+#define GENLIST_ITEM_2LINE_HEIGHT_INC 144
+#define GENLIST_ITEM_LR_PADDING_INC 32
+#define GENLIST_ITEM_TOP_PADDING_INC 23
+#define GENLIST_ITEM_BOTTOM_PADDING_INC 24 // including bottom line
+#define GENLIST_ITEM_TYPE_BA_PADDING_INC 32
+#define GENLIST_ITEM_TYPE_DC_PADDING_INC 32
+#define GENLIST_ITEM_TYPE_AD_PADDING_INC 32
+#define GENLIST_ITEM_MAIN_LINE_HEIGHT_INC 54
+#define GENLIST_ITEM_MAIN_LINE_ICON_TEXT_PADDING_INC 12
+#define GENLIST_ITEM_MAIN_LINE_TEXT_END_PADDING_INC 32
+#define GENLIST_ITEM_SUB_LINE_HEIGHT_INC 43
+#define GENLIST_ITEM_SUB_LINE_TEXT_END_PADDING_INC 32
+#define GENLIST_ITEM_END_TEXT_WIDTH_INC 121
+#define GENLIST_ITEM_GROUP_INDEX_HEIGHT_INC 64
+#define GENLIST_ITEM_GROUP_INDEX_TOP_PADDING_INC 10
+#define GENLIST_ITEM_GROUP_INDEX_BOTTOM_PADDING_INC 11
+#define GENLIST_ITEM_GROUP_INDEX_RIGHT_PADDING_INC 17
+#define GENLIST_ITEM_GROUP_INDEX_END_TEXT_WIDTH_INC 218
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_TOP_PADDING_INC 12
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_BOTTOM_PADDING_INC 12
+#define GENLIST_ITEM_GROUP_INDEX_EXPAND_ICON_SIZE_INC 64 64
+#define GENLIST_ITEM_MULTILINE_1LINE_HEIGHT_INC 120
+
+//No use to Combination
+#define LIST_BOTTOMLINE_HEIGHT 2
+
+#define STYLE_TAGS \
+ tag: "br" "\n";\
+ tag: "ps" "ps";\
+ tag: "tab" "\t";\
+ tag: "b" "+ font_weight=Bold";
+
+#define STYLE_TAG_MATCH \
+ tag: "match" "+ color=#3db8cc";
+
+ styles {
+ // ************* list main text ********** //
+ style { name: "list_text_main";
+ base: "color=#070707FF font=Tizen:style=Regular font_size=40 text_class=list_item ellipsis=1.0";
+ STYLE_TAGS
+ STYLE_TAG_MATCH
+ }
+ style { name: "list_text_main_dim";
+ base: "color=#0707077F font=Tizen:style=Regular font_size=40 text_class=list_item ellipsis=1.0";
+ STYLE_TAGS
+ STYLE_TAG_MATCH
+ }
+ style { name: "list_text_main_press";
+ base: "color=#070707FF font=Tizen:style=Regular font_size=40 text_class=list_item ellipsis=1.0";
+ STYLE_TAGS
+ STYLE_TAG_MATCH
+ }
+ }
+
+ group { name: "elm/genlist/item/entry.main/default";
+ alias: "elm/genlist/item_compress/entry.main/default";
+ alias: "elm/layout/entry.main/default";
+
+ data.item: "banded_bg_area" "elm.swallow.bg";
+ data.item: "texts" "elm.text.main";
+ data.item: "contents" "elm.icon.1 elm.icon.2 elm.icon.entry";
+
+ parts {
+ spacer { "base"; }
+ // background of item
+ rect { "bg";
+ desc { "default";
+ rel.to: "base";
+ color: 0 0 0 0;
+ }
+ desc { "pressed"; inherit;
+ color: 0 0 0 10;
+ }
+ desc { "disabled"; inherit;
+ color: 0 0 0 0;
+ }
+ }
+ // swallow area for banded color
+ swallow { "elm.swallow.bg"; scale;
+ desc { "default";
+ rel.to: "bg";
+ }
+ }
+ swallow { "elm.icon.1";
+ desc { "default";
+ rel2.relative: 0.0 1.0;
+ align: 0.0 0.5;
+ }
+ }
+ swallow { "elm.icon.2";
+ desc { "default";
+ rel1.relative: 1.0 0.0;
+ align: 1.0 0.5;
+ }
+ }
+ spacer { "elm.padding.left";
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ max: GENLIST_ITEM_LR_PADDING_INC -1;
+ rel1 {
+ to_x: "elm.icon.1";
+ relative: 1.0 0.0;
+ }
+ rel2 {
+ to_x: "elm.icon.1";
+ relative: 1.0 1.0;
+ }
+ align: 0.0 0.5;
+ }
+ }
+ spacer { "elm.padding.right";
+ desc { "default";
+ min: GENLIST_ITEM_LR_PADDING_INC 0;
+ max: GENLIST_ITEM_LR_PADDING_INC -1;
+ rel1 {
+ to_x: "elm.icon.2";
+ relative: 0.0 0.0;
+ }
+ rel2 {
+ to_x: "elm.icon.2";
+ relative: 0.0 1.0;
+ }
+ align: 1.0 0.5;
+ }
+ }
+ spacer { "elm.padding.top";
+ desc { "default";
+ min: 0 GENLIST_ITEM_TOP_PADDING_INC;
+ max: -1 GENLIST_ITEM_TOP_PADDING_INC;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ align: 0.5 0.0;
+ }
+ }
+ spacer { "elm.padding.bottom";
+ desc { "default";
+ min: 0 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ max: -1 GENLIST_ITEM_BOTTOM_PADDING_INC;
+ rel1.relative: 0.0 1.0;
+ rel2.relative: 1.0 1.0;
+ align: 0.5 1.0;
+ }
+ }
+ textblock { "elm.text.main";
+ desc { "default";
+ rel1 {
+ to_x: "elm.padding.left";
+ to_y: "elm.padding.top";
+ relative: 1.0 1.0;
+ }
+ rel2 {
+ to_x: "elm.padding.right";
+ to_y: "elm.padding.top";
+ relative: 0.0 1.0;
+ }
+ align: 0.5 0.0;
+ min: 0 GENLIST_ITEM_MAIN_LINE_HEIGHT_INC;
+ text.min: 0 1;
+ text.style: "list_text_main";
+ }
+ desc { "disabled"; inherit;
+ text.style: "list_text_main_dim";
+ }
+ }
+ swallow { "elm.icon.entry";
+ desc { "default";
+ rel1 {
+ to_x: "elm.icon.1";
+ to_y: "elm.text.main";
+ relative: 1.0 1.0;
+ }
+ rel2 {
+ to_x: "elm.icon.2";
+ to_y: "elm.padding.bottom";
+ relative: 0.0 0.0;
+ }
+ min: 0 96;
+ }
+ }
+ rect { "elm.bottomline"; scale;
+ desc { "default";
+ fixed: 0 1;
+ min: 0 LIST_BOTTOMLINE_HEIGHT;
+ max: -1 LIST_BOTTOMLINE_HEIGHT;
+ align: 0.5 0.0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 1.0 0.0;
+ color: 204 204 204 255;
+ }
+ desc { "hidden"; inherit: "default";
+ visible: 0;
+ }
+ }
+ }
+ programs {
+ program {
+ signal: "elm,state,elm.swallow.bg,visible";
+ source: "elm";
+ action: STATE_SET "hidden" 0.0;
+ target: "elm.bottomline";
+ }
+ }
+ GENLIST_PROGRAM_DEFAULT(
+ target: "elm.text.main";
+ target: "elm.bottomline";
+ )
+ GENLIST_PROGRAM_DISABLED(
+ target: "elm.text.main";
+ )
+ }
#define GENLIST_PART_DIALOGUE_GROUP_DIVIDER_R(RIGHT) \
GENLIST_PART_DIVIDER_PADDING \
diff --git a/setting-common/include/setting-common-draw-widget.h b/setting-common/include/setting-common-draw-widget.h
index 386486d..bb7b8da 100755
--- a/setting-common/include/setting-common-draw-widget.h
+++ b/setting-common/include/setting-common-draw-widget.h
@@ -338,6 +338,8 @@ extern Setting_GenGroupItem_Data *setting_create_Gendial_field_def(Evas_Object *
char *sub_desc,
setting_call_back_func chk_change_cb);
+extern void setting_add_gl_help(Evas_Object *scroller, const char *str);
+
extern Setting_GenGroupItem_Data *setting_create_Gendial_field_entry_with_return_key(Evas_Object *
genlist,
const Elm_Genlist_Item_Class *itc,
diff --git a/setting-common/src/setting-common-draw-widget.c b/setting-common/src/setting-common-draw-widget.c
index 527a15d..3c7bb64 100644
--- a/setting-common/src/setting-common-draw-widget.c
+++ b/setting-common/src/setting-common-draw-widget.c
@@ -1169,3 +1169,19 @@ setting_protect_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
if (NULL != data) *((void **)data) = NULL;
}
+EXPORT_PUBLIC void
+setting_add_gl_help(Evas_Object *scroller, const char *str)
+{
+ if (str) {
+ Setting_GenGroupItem_Data *item_data = setting_create_Gendial_field_def(scroller, &itc_multiline_text,
+ NULL,
+ NULL,
+ SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
+ NULL, NULL, 0, str, NULL, NULL);
+ if (NULL == item_data) {
+ SETTING_TRACE_ERROR("item_data is NULL");
+ return;
+ }
+ elm_genlist_item_select_mode_set(item_data->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
+ }
+}
diff --git a/setting-time/include/setting-time-main.h b/setting-time/include/setting-time-main.h
index dd68689..1e08269 100755..100644
--- a/setting-time/include/setting-time-main.h
+++ b/setting-time/include/setting-time-main.h
@@ -24,35 +24,35 @@
#include <setting-time.h>
#include <setting-time-engine.h>
-#define MAX_ARGS 15
-#define CITY_BUF_SIZE 128
-#define GMT_BUF_SIZE 10
+#define MAX_ARGS 15
+#define CITY_BUF_SIZE 128
+#define GMT_BUF_SIZE 10
#define __MAX_PATH_SIZE 1024
-#define SETTING_TIME_ZONEINFO_PATH "/usr/share/zoneinfo/"
-#define SETTING_TIME_SHARE_LOCAL_PATH "/usr/share/locale"
+#define SETTING_TIME_ZONEINFO_PATH "/usr/share/zoneinfo/"
+#define SETTING_TIME_SHARE_LOCAL_PATH "/usr/share/locale"
#define SETTING_TZONE_SYMLINK_PATH _TZ_SYS_ETC"/localtime"
void setting_time_main_launch_worldclock_sg(void *data);
void setting_time_main_close_worldclock_sg(gpointer cb_data, gint argc,
- gchar **argv);
+ gchar **argv);
void setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj,
- void *event_info);
+ void *event_info);
void setting_time_main_click_softkey_caller_exist_left_cb(void *data,
- Evas_Object *obj,
- void *event_info);
+ Evas_Object *obj,
+ void *event_info);
void setting_time_main_click_softkey_caller_exist_right_cb(void *data,
- Evas_Object *obj,
- void *event_info);
+ Evas_Object *obj,
+ void *event_info);
static void setting_time_main_chk_btn_cb(void *data, Evas_Object *obj,
- void *event_info);
+ void *event_info);
void setting_time_main_item_mouse_up_cb(void *data, Evas *e, Evas_Object *obj,
- void *event_info);
+ void *event_info);
static void setting_time_main_mouse_up_Gendial_list_cb(void *data,
- Evas_Object *obj,
- void *event_info);
+ Evas_Object *obj,
+ void *event_info);
void setting_time_main_btn_update_ok_cb(void *cb);
void setting_time_main_btn_update_cancel_cb(void *cb);
void setting_time_update_time_date_format_string(SettingTimeUG *ad);
diff --git a/setting-time/include/setting-time.h b/setting-time/include/setting-time.h
index 1faf65a..1a9c413 100644
--- a/setting-time/include/setting-time.h
+++ b/setting-time/include/setting-time.h
@@ -36,7 +36,7 @@
#include <setting-common-view.h>
#define ERR_BIGGER_THAN_2037 "Cannot Set the year bigger than 2037"
-#define AUTO_TIME_UPDATE_ON "Automatic time update is ON!"
+#define AUTO_TIME_UPDATE_ON "Automatic time update is ON!"
#define SETTING_TIME_AUTO_UPDATE_DESC "IDS_ST_BODY_USE_TIME_PROVIDED_BY_NETWORK"
#define NOT_SUPPORT_AUTO_UPDATE_DESC "IDS_ST_POP_AUTO_TIME_UPDATE_UNAVAILABLE_CHOOSE_ALTERNATIVE_TIME_SET_MODE_JPN_SBM"
@@ -44,7 +44,7 @@
#define DATE_TIME_STR_AUTOMATIC_UPDATE "IDS_ST_MBODY_AUTO_UPDATE"
#define DATE_TIME_STR_TIME_ZONE "IDS_ST_BODY_TIME_ZONE"
#define DATE_TIME_STR_DATE_AND_TIME "IDS_ST_BODY_DATE_AND_TIME"
-#define DATE_TIME_STR_TIME_FORMAT "IDS_ST_BODY_MSG_TIME_FORMAT"
+#define DATE_TIME_STR_TIME_FORMAT "IDS_ST_BODY_MSG_TIME_FORMAT"
typedef struct _SettingTimeUG SettingTimeUG;
@@ -80,7 +80,7 @@ struct _SettingTimeUG {
Evas_Object *pop;
Eina_Bool is_datefield_selected;
- /* UI */
+ /* UI */
Setting_GenGroupItem_Data *data_auto;
Setting_GenGroupItem_Data *data_tz;
Setting_GenGroupItem_Data *data_time;
@@ -94,6 +94,7 @@ struct _SettingTimeUG {
Elm_Genlist_Item_Class itc_2text_arrow;
Elm_Genlist_Item_Class itc_1text_1icon;
Elm_Genlist_Item_Class itc_layout;
+ Elm_Genlist_Item_Class itc_layout_time;
Elm_Genlist_Item_Class itc_2text_3_parent;
Elm_Genlist_Item_Class itc_1icon_1text_sub;
diff --git a/setting-time/src/setting-time-engine.c b/setting-time/src/setting-time-engine.c
index 9f5dcc7..827b824 100755
--- a/setting-time/src/setting-time-engine.c
+++ b/setting-time/src/setting-time-engine.c
@@ -20,7 +20,7 @@
*/
#include <setting-time-engine.h>
-/* To set system time takes some time. It makes some time before firing vconf event */
+/* To set system time takes some time. It makes some time before firing vconf event */
int setting_time_update_cb(void *data)
{
retv_if(data == NULL, -1);
diff --git a/setting-time/src/setting-time-main.c b/setting-time/src/setting-time-main.c
index 38529b5..58560b3 100755..100644
--- a/setting-time/src/setting-time-main.c
+++ b/setting-time/src/setting-time-main.c
@@ -48,7 +48,7 @@
#define PROGRESS_POPUP_SHOW 0
#define DEF_BUF_SIZE 256
-/* ICU utilities*/
+/* ICU utilities*/
static UChar *uastrcpy(const char *chars);
static void ICU_set_timezone(const char *timezone);
static void get_gmt_offset(char *str_buf, int size);
@@ -131,7 +131,7 @@ void time_changed_callback(keynode_t *key, void *data)
ad->update_timezone_idler = NULL;
}
ad->update_timezone_idler =
- ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad);
+ ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad);
/* update time */
if (ad->refresh_time_idler) {
ecore_idler_del(ad->refresh_time_idler);
@@ -162,19 +162,19 @@ void setting_time_update_time_date_format_string(SettingTimeUG *ad)
value = VCONFKEY_TIME_FORMAT_12;
switch (value) {
- case VCONFKEY_TIME_FORMAT_12: {
- /* Get Time */
- strftime(time_str, MAX_ARGS, "%l:%M %p ", &ts_ret);
- }
- break;
+ case VCONFKEY_TIME_FORMAT_12: {
+ /* Get Time */
+ strftime(time_str, MAX_ARGS, "%l:%M %p ", &ts_ret);
+ }
+ break;
- case VCONFKEY_TIME_FORMAT_24: {
- strftime(time_str, MAX_ARGS, "%H:%M", &ts_ret);
- }
- break;
- default:
- /* do nothing */
- break;
+ case VCONFKEY_TIME_FORMAT_24: {
+ strftime(time_str, MAX_ARGS, "%H:%M", &ts_ret);
+ }
+ break;
+ default:
+ /* do nothing */
+ break;
}
if (ad->data_time) {
@@ -191,13 +191,13 @@ bool setting_update_timezone(SettingTimeUG *ad)
char gmt_offset[GMT_BUF_SIZE] = {0, };
int ret = 0;
- /* get time zone */
+ /* get time zone */
displayTimezone = get_timezone_displayname();
get_gmt_offset(gmt_offset, GMT_BUF_SIZE);
if (displayTimezone != NULL) {
ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s",
- displayTimezone, gmt_offset);
+ displayTimezone, gmt_offset);
retv_if(ret < 0, 0);
} else {
ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "Korean Standard Time, GMT +9:00");
@@ -226,15 +226,17 @@ static void setting_time_main_int_vconf_change_cb(keynode_t *key, void *data)
/* SETTING_TRACE("vconf_name:%s", vconf_name); */
if (!safeStrCmp(vconf_name, VCONFKEY_REGIONFORMAT_TIME1224) ||
- !safeStrCmp(vconf_name, VCONFKEY_SETAPPL_DATE_FORMAT_INT)) {
+ !safeStrCmp(vconf_name, VCONFKEY_SETAPPL_DATE_FORMAT_INT)) {
char *time;
static char time_arr[DEF_BUF_SIZE];
char *pa_time_format = get_pa_time_format_str();
setting_retm_if(NULL == pa_time_format, "pa_time_format is NULL");
- char* lang = NULL;
+ char *lang = NULL;
int err = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
- char *date = __setting_phone_lang_get_by_pattern(lang, "MMM/d/yyyy");
+ if (err != SYSTEM_SETTINGS_ERROR_NONE) {
+ SETTING_TRACE("Failed to call system_settings_get_value_string with error code %d", err);
+ }
if (!strncmp(pa_time_format, "IDS_ST_BODY_12_HOURS", strlen("IDS_ST_BODY_12_HOURS")))
time = __setting_phone_lang_get_by_pattern(lang, "hhmm");
@@ -255,8 +257,8 @@ static int _alarmmgr_set_timezone_helper(char *tzdata)
if (ret) {
/* set event system */
setting_set_event_system(SYS_EVENT_TIME_ZONE,
- EVT_KEY_TIME_ZONE,
- tzdata);
+ EVT_KEY_TIME_ZONE,
+ tzdata);
}
return ret;
@@ -269,8 +271,8 @@ static int _alarmmgr_set_systime_helper(time_t t_current)
if (ret) {
/* set event system */
setting_set_event_system(SYS_EVENT_SCREEN_AUTOROTATE_STATE,
- EVT_KEY_TIME_CHANGED,
- t_current);
+ EVT_KEY_TIME_CHANGED,
+ ctime(&t_current));
}
return ret;
@@ -337,9 +339,6 @@ static void __update_time_via_sim_card(void *data)
ret = _alarmmgr_set_systime_helper(t_current);
setting_retm_if(ret == -1, "_alarmmgr_set_systime_helper call failed");
if (ad->data_time) {
- struct tm ts_ret;
- struct tm *ts = localtime_r(&t_current, &ts_ret);
- ret_if(!ts);
setting_enable_evas_object(ad->data_time->btn_left);
setting_enable_evas_object(ad->data_time->btn_right);
}
@@ -407,12 +406,12 @@ static void __sim_time_info_chg_cb(keynode_t *key, void *data)
char *vconf_name = vconf_keynode_get_name(key);
/*SETTING_TRACE("vconf_name:%s", vconf_name);*/
if (!safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_GMT)
- || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_EVENT_GMT)
- || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_ZONE)) {
+ || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_EVENT_GMT)
+ || !safeStrCmp(vconf_name, VCONFKEY_TELEPHONY_NITZ_ZONE)) {
int value = 0;
int err = 0;
setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value,
- &err);
+ &err);
if (value) {
int ret = 0;
int t_nitz = 0;
@@ -516,12 +515,12 @@ static void setting_time_main_datefield_set_cb(void *data, Evas_Object *object,
elm_datetime_value_get(obj, &_tm);
SETTING_TRACE("year : %d, month : %d, day : %d, hour : %d, min : %d",
- _tm.tm_year, _tm.tm_mon, _tm.tm_mday, _tm.tm_hour, _tm.tm_min);
+ _tm.tm_year, _tm.tm_mon, _tm.tm_mday, _tm.tm_hour, _tm.tm_min);
_tm.tm_isdst = -1;
_tm.tm_sec = 0;
- /* local time -> gmtime */
+ /* local time -> gmtime */
time_t the_time = mktime(&_tm); /* represent local time */
/* invoke API to change time */
@@ -536,9 +535,9 @@ static void setting_time_main_datefield_set_cb(void *data, Evas_Object *object,
#if 1
time_t cctime = time(NULL);
struct tm ts_ret;
- struct tm *ts = localtime_r(&cctime, &ts_ret);
+ localtime_r(&cctime, &ts_ret);
SETTING_TRACE("After _alarmmgr_set_systime_helper() ....year : %d, month : %d, day : %d, hour : %d, min : %d",
- ts_ret.tm_year, ts_ret.tm_mon, ts_ret.tm_mday, ts_ret.tm_hour, ts_ret.tm_min);
+ ts_ret.tm_year, ts_ret.tm_mon, ts_ret.tm_mday, ts_ret.tm_hour, ts_ret.tm_min);
#endif
Evas_Object *popup = NULL;
popup = evas_object_data_get(obj, "popup");
@@ -569,7 +568,7 @@ void hour_format_event_handler(const char *event_name, bundle *data, void *user_
SETTING_TRACE("hour_format_set(%s)", hour_format_set);
}
-int hour_format_event_reg_id;
+unsigned int hour_format_event_reg_id;
static int setting_time_main_create(void *cb)
{
@@ -587,7 +586,7 @@ static int setting_time_main_create(void *cb)
app_control_get_extra_data(service, "caller", &caller);
app_control_get_extra_data(service, "title", &title);
- Evas_Object *scroller; /* scroller is a genlist */
+ Evas_Object *scroller; /* scroller is a genlist */
ad->caller = caller;
@@ -598,13 +597,13 @@ static int setting_time_main_create(void *cb)
title_str = title;
ad->ly_main =
- setting_create_layout_navi_bar_genlist(ad->win_main_layout,
- ad->win_get, title_str,
- NULL,
+ setting_create_layout_navi_bar_genlist(ad->win_main_layout,
+ ad->win_get, title_str,
+ NULL,
NULL,
- setting_time_main_click_softkey_left_cb,
- NULL, ad, &scroller,
- &ad->navi_bar);
+ setting_time_main_click_softkey_left_cb,
+ NULL, ad, &scroller,
+ &ad->navi_bar);
ad->scrl_main = scroller;
elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
@@ -612,99 +611,22 @@ static int setting_time_main_create(void *cb)
int value;
int err;
int ret = 0;
- setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, &value,
- &err);
-
- /*int enable_automatic = __setting_time_check_enable_automatic_update(); */
- bool auto_flag = value;
-
- if (auto_flag) { /*do special process only when auto mode */
- /*to read TAPI vconfs */
- int ret = 0;
- int t_nitz = 0;
- int t_offset = 0;
- ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_GMT, &t_nitz);
- ret += vconf_get_int(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, &t_offset);
- char *tzpath = vconf_get_str(VCONFKEY_TELEPHONY_NITZ_ZONE);
- if (ret == 0 && !isEmptyStr(tzpath)) {
- /*1.to update timezone */
- char tz_path[MAX_COMMON_BUFFER_LEN / 4 + 1];
- safeCopyStr(tz_path, SETTING_TIME_ZONEINFO_PATH, MAX_COMMON_BUFFER_LEN / 4);
- g_strlcat(tz_path, tzpath, sizeof(tz_path));
- SETTING_TRACE("full tz_path:%s", tz_path);
- ret = _alarmmgr_set_timezone_helper(tz_path);
- if (ret < 0) {
- SETTING_TRACE("tzpath is not valid.");
- } else
- SETTING_TRACE("_alarmmgr_set_timezone_helper - successful : %s \n", tz_path);
- if (!__setting_set_city_tzone(tzpath)) {
- SETTING_TRACE("__setting_set_city_tzone ERROR")
- }
- get_city_name(tzpath);
- char *city = get_city_name_result();
- SETTING_TRACE("city:%s", city);
- ret = vconf_set_str(VCONFKEY_SETAPPL_CITYNAME_INDEX_INT, city);
-
- /* 2.to set current time */
- int t_uptime = 0;
- FILE *fp = fopen("/proc/uptime", "r");
- if (fp) {
- if (!fscanf(fp, "%d", &t_uptime)) {
- SETTING_TRACE_ERROR("fscanf error");
- }
- fclose(fp);
- fp = NULL;
- } else {
- SETTING_TRACE_ERROR("fopen error");
- }
-
- SETTING_TRACE("t_nitz:%d, t_offset:%d, t_uptime:%d", t_nitz, t_offset, t_uptime);
- time_t t_current = t_nitz + t_uptime - t_offset;
- SETTING_TRACE("t_current:%d", t_current);
- ret = _alarmmgr_set_systime_helper(t_current);
- }
- FREE(tzpath);
- }
-
- /* UI automatic */
- /*if (!isEmulBin()) { */
- ad->data_auto =
- setting_create_Gendial_field_def(scroller, &(ad->itc_1text_1icon),
- setting_time_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_1ICON_1RADIO, NULL,
- NULL, value,
- DATE_TIME_STR_AUTOMATIC_UPDATE, NULL,
- setting_time_main_chk_btn_cb);
- if (ad->data_auto) {
- ad->data_auto->userdata = ad;
- } else {
- SETTING_TRACE_ERROR("ad->data_auto is NULL");
- }
-
- /*ADD_GL_HELP(scroller,SETTING_TIME_AUTO_UPDATE_DESC); */
- /*} */
-
/* create DATE_AND_TIME */
ad->data_time =
- setting_create_Gendial_field_def(scroller, &(ad->itc_layout),
- setting_time_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_LAYOUT_DATEFIELD,
- NULL, NULL, 0,
- DATE_TIME_STR_DATE_AND_TIME,
- NULL,
- NULL);
+ setting_create_Gendial_field_def(scroller, &(ad->itc_layout),
+ setting_time_main_mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_LAYOUT_DATEFIELD,
+ NULL, NULL, 0,
+ DATE_TIME_STR_DATE_AND_TIME,
+ NULL,
+ NULL);
+
if (ad->data_time) {
ad->data_time->userdata = ad;
ad->data_time->nf = ad->navi_bar;
- ad->data_time->isItemDisableFlag = auto_flag;
ad->data_time->activated_cb = setting_time_main_datefield_set_cb;
elm_genlist_item_select_mode_set(ad->data_time->item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
- Elm_Object_Item *item = elm_genlist_item_append(scroller, &(itc_bottom_line), NULL, NULL,
- ELM_GENLIST_ITEM_NONE, NULL, NULL);
- elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
} else {
SETTING_TRACE_ERROR("ad->data_time is NULL");
}
@@ -726,85 +648,80 @@ static int setting_time_main_create(void *cb)
char *timezone_str = get_timezone_str();
SETTING_TRACE("timezone : %s, displayTimezone :%s, gmt_offset : %s",
- timezone_str, displayTimezone, _(str_buf));
+ timezone_str, displayTimezone, _(str_buf));
ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "%s, GMT %s",
- displayTimezone, _(str_buf));
+ displayTimezone, _(str_buf));
FREE(timezone_str);
- retv_if(ret < 0, 0);
+ if (ret < 0) {
+ SETTING_TRACE_ERROR("cannot snprintf");
+ }
} else {
/* default code */
ret = snprintf(time_zone_sub_str, CITY_BUF_SIZE + GMT_BUF_SIZE + 2, "Korean Standard Time, GMT +9:00");
- retv_if(ret < 0, 0);
+ if (ret < 0) {
+ SETTING_TRACE_ERROR("cannot snprintf");
+ }
}
FREE(displayTimezone);
- /* UI create time zone */
+ /* UI create time zone */
ad->data_tz =
- setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
- setting_time_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_INVALID, NULL,
- NULL, 0, DATE_TIME_STR_TIME_ZONE,
- time_zone_sub_str, NULL);
+ setting_create_Gendial_field_def(scroller, &(ad->itc_2text_2),
+ setting_time_main_mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_INVALID, NULL,
+ NULL, 0, DATE_TIME_STR_TIME_ZONE,
+ time_zone_sub_str, NULL);
if (ad->data_tz) {
ad->data_tz->userdata = ad;
} else {
SETTING_TRACE_ERROR("ad->data_tz is NULL");
}
- /* UI create "Time format" */
+ /* UI create "Time format" */
value = VCONFKEY_TIME_FORMAT_12;
setting_get_int_slp_key(INT_SLP_SETTING_REGIONFORMAT_TIME1224, &value, &err);
ad->data_time_fmt = setting_create_Gendial_field_def(scroller,
- &(ad->itc_1text_1icon),
- setting_time_main_mouse_up_Gendial_list_cb,
- ad,
- SWALLOW_Type_1ICON_1RADIO,
- NULL,
- NULL,
- (value == VCONFKEY_TIME_FORMAT_24),
- "IDS_ST_MBODY_24_HOUR_CLOCK",
- NULL,
- setting_time_main_chk_btn_cb);
+ &(ad->itc_1text_1icon),
+ setting_time_main_mouse_up_Gendial_list_cb,
+ ad,
+ SWALLOW_Type_1ICON_1RADIO,
+ NULL,
+ NULL,
+ (value == VCONFKEY_TIME_FORMAT_24),
+ "IDS_ST_MBODY_24_HOUR_CLOCK",
+ NULL,
+ setting_time_main_chk_btn_cb);
if (ad->data_time_fmt) {
__BACK_POINTER_SET(ad->data_time_fmt);
ad->data_time_fmt->userdata = ad;
} else {
SETTING_TRACE_ERROR("ad->data_time_fmt is NULL");
}
- ADD_GL_HELP_NO_SEP(scroller, "IDS_ST_SBODY_SHOW_THE_TIME_IN_24_HOUR_FORMAT_INSTEAD_OF_12_HOUR_HAM_PM_FORMAT");
+ setting_add_gl_help(scroller, "IDS_ST_SBODY_SHOW_THE_TIME_IN_24_HOUR_FORMAT_INSTEAD_OF_12_HOUR_HAM_PM_FORMAT");
#if APPLIED_DATATIME_DATA_FORMAT
char *pa_date_format = get_pa_date_format_str();
ad->data_date_fmt = setting_create_Gendial_exp_parent_field(scroller,
- &(ad->itc_2text_3_parent),
- setting_time_main_mouse_up_Gendial_list_cb,
- ad, SWALLOW_Type_INVALID,
- DATE_TIME_STR_TIME_FORMAT,
- pa_time_format);
+ &(ad->itc_2text_3_parent),
+ setting_time_main_mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_INVALID,
+ DATE_TIME_STR_TIME_FORMAT,
+ pa_time_format);
if (ad->data_date_fmt) {
ad->data_date_fmt->int_slp_setting_binded =
- INT_SLP_SETTING_DATE_FORMAT;
+ INT_SLP_SETTING_DATE_FORMAT;
} else {
SETTING_TRACE_ERROR("ad->data_date_fmt is NULL");
}
G_FREE(pa_date_format);
#endif
- if (auto_flag) {
- if (ad->data_tz) {
- setting_disable_genlist_item(ad->data_tz->item);
- }
- if (ad->data_time) {
- setting_disable_genlist_item(ad->data_time->item);
- }
- }
-
setting_view_time_main.is_create = 1;
vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED, time_changed_callback, (void *)ad);
- /* register vconf key to get event callback for converting 12/24H */
+ /* register vconf key to get event callback for converting 12/24H */
vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224, setting_time_main_int_vconf_change_cb, ad);
- /* register vconf key to get event callback for date format */
+ /* register vconf key to get event callback for date format */
vconf_notify_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT, setting_time_main_int_vconf_change_cb, ad);
vconf_notify_key_changed(VCONFKEY_TELEPHONY_NITZ_GMT, __sim_time_info_chg_cb, ad);
@@ -812,7 +729,7 @@ static int setting_time_main_create(void *cb)
vconf_notify_key_changed(VCONFKEY_TELEPHONY_NITZ_ZONE, __sim_time_info_chg_cb, ad);
vconf_notify_key_changed(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL,
- setting_time_main_bool_vconf_change_cb, ad);
+ setting_time_main_bool_vconf_change_cb, ad);
/* to avoid update time-diff, every per 3s to update. */
#ifdef USE_TIMER_UPDATE_TIME_IN_TIME_VIEW
@@ -821,8 +738,8 @@ static int setting_time_main_create(void *cb)
/* eventsystem */
if (ES_R_OK != eventsystem_register_event(SYS_EVENT_HOUR_FORMAT,
- &hour_format_event_reg_id,
- (eventsystem_handler)hour_format_event_handler, cb)) {
+ &hour_format_event_reg_id,
+ (eventsystem_handler)hour_format_event_handler, cb)) {
SETTING_TRACE_ERROR("error");
}
@@ -867,19 +784,19 @@ static int setting_time_main_destroy(void *cb)
}
vconf_ignore_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED,
- time_changed_callback);
+ time_changed_callback);
vconf_ignore_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
- setting_time_main_int_vconf_change_cb);
+ setting_time_main_int_vconf_change_cb);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_DATE_FORMAT_INT,
- setting_time_main_int_vconf_change_cb);
+ setting_time_main_int_vconf_change_cb);
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_GMT, __sim_time_info_chg_cb);
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_EVENT_GMT, __sim_time_info_chg_cb);
vconf_ignore_key_changed(VCONFKEY_TELEPHONY_NITZ_ZONE, __sim_time_info_chg_cb);
vconf_ignore_key_changed(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL,
- setting_time_main_bool_vconf_change_cb);
+ setting_time_main_bool_vconf_change_cb);
if (ad->ly_main != NULL) {
evas_object_del(ad->ly_main);
@@ -909,7 +826,7 @@ static int setting_time_main_update(void *cb)
ad->update_timezone_idler = NULL;
}
ad->update_timezone_idler =
- ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad);
+ ecore_idler_add((Ecore_Task_Cb) __update_timezone_idler, ad);
/* update time */
if (ad->refresh_time_idler) {
ecore_idler_del(ad->refresh_time_idler);
@@ -940,7 +857,7 @@ int setting_time_check_automatic_time_update_state()
int err = 0;
setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
- &bvalue, &err);
+ &bvalue, &err);
return bvalue;
@@ -966,7 +883,7 @@ static int __setting_set_city_tzone(const char *pTZPath)
static void
setting_time_main_launch_worldclock_result_ug_cb(ui_gadget_h ug,
- app_control_h result, void *priv)
+ app_control_h result, void *priv)
{
SETTING_TRACE_BEGIN;
/* error check */
@@ -1031,7 +948,7 @@ setting_time_main_launch_worldclock_result_ug_cb(ui_gadget_h ug,
}
void setting_time_main_launch_worldclock_destroy_ug_cb(ui_gadget_h ug,
- void *priv)
+ void *priv)
{
SETTING_TRACE_BEGIN;
/* if(ug) ug_destroy(ug); */
@@ -1049,8 +966,8 @@ void setting_time_main_launch_worldclock_destroy_ug_cb(ui_gadget_h ug,
}
void setting_time_main_launch_worldclock_layout_ug_cb(ui_gadget_h ug,
- enum ug_mode mode,
- void *priv)
+ enum ug_mode mode,
+ void *priv)
{
SETTING_TRACE_BEGIN;
/*SettingTimeUG *ad = (SettingTimeUG *) priv; */
@@ -1064,14 +981,14 @@ void setting_time_main_launch_worldclock_layout_ug_cb(ui_gadget_h ug,
return;
switch (mode) {
- case UG_MODE_FULLVIEW:
- evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- /*elm_win_resize_object_add(ad->win_get, base); */
- evas_object_show(base);
- break;
- default:
- break;
+ case UG_MODE_FULLVIEW:
+ evas_object_size_hint_weight_set(base, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ /*elm_win_resize_object_add(ad->win_get, base); */
+ evas_object_show(base);
+ break;
+ default:
+ break;
}
SETTING_TRACE_END;
}
@@ -1095,7 +1012,7 @@ void setting_time_main_launch_worldclock_sg(void *data)
elm_object_tree_focus_allow_set(ad->ly_main, EINA_FALSE);
SETTING_TRACE("to load ug[%s]", "worldclock-efl");
ad->ug_loading =
- setting_ug_create(ad->ug, "worldclock-efl", UG_MODE_FULLVIEW, NULL, cbs);
+ setting_ug_create(ad->ug, "worldclock-efl", UG_MODE_FULLVIEW, NULL, cbs);
if (NULL == ad->ug_loading) { /* error handling */
}
@@ -1114,11 +1031,14 @@ static void __setting_update_datefield_cb(void *cb)
struct tm ts_ret;
struct tm *ts = localtime_r(&cctime, &ts_ret);
SETTING_TRACE("year : %d, month : %d, day : %d, hour : %d, min : %d",
- ts_ret.tm_year, ts_ret.tm_mon, ts_ret.tm_mday, ts_ret.tm_hour, ts_ret.tm_min);
+ ts_ret.tm_year, ts_ret.tm_mon, ts_ret.tm_mday, ts_ret.tm_hour, ts_ret.tm_min);
if (ts) {
- char* region = NULL;
- int err = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region );
+ char *region = NULL;
+ int err = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region);
+ if (err != SYSTEM_SETTINGS_ERROR_NONE) {
+ SETTING_TRACE("Failed to call system_settings_get_value_string with error code %d", err);
+ }
char *date = __setting_phone_lang_get_by_pattern(region, "MMM/d/yyyy");
char *time;
static char date_arr[DEF_BUF_SIZE], time_arr[DEF_BUF_SIZE];
@@ -1173,7 +1093,7 @@ Eina_Bool setting_update_datefield_cb(void *data)
void
setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj,
- void *event_info)
+ void *event_info)
{
SETTING_TRACE_BEGIN;
retm_if(data == NULL, "Data parameter is NULL");
@@ -1194,8 +1114,8 @@ setting_time_main_click_softkey_left_cb(void *data, Evas_Object *obj,
void
setting_time_main_click_softkey_caller_exist_left_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object *obj,
+ void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
@@ -1203,7 +1123,7 @@ setting_time_main_click_softkey_caller_exist_left_cb(void *data,
SettingTimeUG *ad = (SettingTimeUG *) data;
- /* Create Bundle and send message */
+ /* Create Bundle and send message */
app_control_h svc;
if (app_control_create(&svc))
return;
@@ -1219,8 +1139,8 @@ setting_time_main_click_softkey_caller_exist_left_cb(void *data,
void
setting_time_main_click_softkey_caller_exist_right_cb(void *data,
- Evas_Object *obj,
- void *event_info)
+ Evas_Object *obj,
+ void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
@@ -1228,7 +1148,7 @@ setting_time_main_click_softkey_caller_exist_right_cb(void *data,
SettingTimeUG *ad = (SettingTimeUG *) data;
- /* Create Bundle and send message */
+ /* Create Bundle and send message */
app_control_h svc;
if (app_control_create(&svc))
return;
@@ -1250,7 +1170,7 @@ static void __time_auto_update(void *data)
SettingTimeUG *ad = (SettingTimeUG *) data;
int err;
setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
- SETTING_ON_OFF_BTN_ON, &err);
+ SETTING_ON_OFF_BTN_ON, &err);
if (ad->data_tz) {
setting_disable_genlist_item(ad->data_tz->item);
}
@@ -1281,15 +1201,15 @@ setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info)
retm_if(data == NULL, "Data parameter is NULL");
SettingTimeUG *ad = NULL;
Setting_GenGroupItem_Data *list_item =
- (Setting_GenGroupItem_Data *) data;
+ (Setting_GenGroupItem_Data *) data;
ad = list_item->userdata;
- list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */
+ list_item->chk_status = elm_check_state_get(obj); /* for genlist update status */
int err;
if (obj == ad->data_auto->eo_check) {
int bvalue;
setting_get_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
- &bvalue, &err);
+ &bvalue, &err);
if (bvalue) {
(void) setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE, SETTING_ON_OFF_BTN_OFF, &err);
setting_update_gl_item_chk_status(ad->data_auto, 0);
@@ -1312,16 +1232,22 @@ setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info)
-//#define FUNCTION_SYSTEM_SETTING 1
+ /*#define FUNCTION_SYSTEM_SETTING 1 */
#if FUNCTION_SYSTEM_SETTING
/* Time format */
if (ad->data_time_fmt == list_item) {
- int err = 0;
- int value = VCONFKEY_TIME_FORMAT_12;
if (list_item->chk_status) {
- err = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, true);
+ int ret = SYSTEM_SETTINGS_ERROR_NONE;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, true);
+ if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+ SETTING_TRACE("Failed to call system_settings_set_value_bool with error code %d", ret);
+ }
} else {
- err = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, false);
+ int ret = SYSTEM_SETTINGS_ERROR_NONE;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, false);
+ if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+ SETTING_TRACE("Failed to call system_settings_set_value_bool with error code %d", ret);
+ }
}
}
#else
@@ -1342,7 +1268,7 @@ setting_time_main_chk_btn_cb(void *data, Evas_Object *obj, void *event_info)
}
static void setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
- void *event_info)
+ void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
@@ -1352,7 +1278,7 @@ static void setting_time_main_mouse_up_Gendial_list_cb(void *data, Evas_Object *
Elm_Object_Item *item = (Elm_Object_Item *) event_info;
elm_genlist_item_selected_set(item, 0);
Setting_GenGroupItem_Data *list_item =
- (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
+ (Setting_GenGroupItem_Data *) elm_object_item_data_get(item);
setting_retm_if(NULL == list_item, "list_item is NULL");
SettingTimeUG *ad = (SettingTimeUG *) data;
@@ -1415,13 +1341,13 @@ void setting_time_main_btn_update_ok_cb(void *cb)
SettingTimeUG *ad = (SettingTimeUG *) cb;
int err; /* error check */
setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
- SETTING_ON_OFF_BTN_ON, &err);
+ SETTING_ON_OFF_BTN_ON, &err);
setting_update_gl_item_chk_status(ad->data_auto, 1);
deviced_request_reboot();
- /* We'd better check return value from deviced_request_reboot() function. */
- /* It will return 0 on success or -1 if failed. */
+ /* We'd better check return value from deviced_request_reboot() function. */
+ /* It will return 0 on success or -1 if failed. */
}
@@ -1434,7 +1360,7 @@ void setting_time_main_btn_update_cancel_cb(void *cb)
retm_if(cb == NULL, "Data parameter is NULL");
setting_set_bool_slp_key(BOOL_SLP_SETTING_AUTOMATIC_TIME_UPDATE,
- SETTING_ON_OFF_BTN_OFF, &err);
+ SETTING_ON_OFF_BTN_OFF, &err);
setting_update_gl_item_chk_status(ad->data_auto, 0);
}
@@ -1464,7 +1390,7 @@ static void ICU_set_timezone(const char *timezone)
SETTING_TRACE("ucal_setDefaultTimeZone() SUCCESS ");
} else {
SETTING_TRACE("ucal_setDefaultTimeZone() FAILED : %s ",
- u_errorName(ec));
+ u_errorName(ec));
}
FREE(str);
}
@@ -1478,7 +1404,7 @@ static void ICU_set_timezone(const char *timezone)
static void get_gmt_offset(char *str_buf, int size)
{
/* timezone string +/-<n> ex. +9, -1 */
- time_t t = time(0); /* get unix time. sec. */
+ time_t t = time(0); /* get unix time. sec. */
struct tm *pdata, data;
pdata = localtime_r(&t, &data); /* save time as structure. */
@@ -1534,7 +1460,7 @@ static char *get_city_name_result()
static bool get_city_name(char *tzname)
{
sqlite3 *pSQLite3 = NULL;
- char *szErrMsg = NULL;
+ char *szErrMsg = NULL;
int rst = sqlite3_open(_TZ_SYS_DB"/.worldclock.db", &pSQLite3);
if (rst) {
diff --git a/setting-time/src/setting-time.c b/setting-time/src/setting-time.c
index 37b8d67..5f6b5c5 100755..100644
--- a/setting-time/src/setting-time.c
+++ b/setting-time/src/setting-time.c
@@ -33,7 +33,7 @@
* @param data user data (SettingTimeUG *)
*/
static void setting_time_ug_cb_resize(void *data, Evas *e, Evas_Object *obj,
- void *event_info)
+ void *event_info)
{
SETTING_TRACE_BEGIN;
SettingTimeUG *ad = (SettingTimeUG *) data;
@@ -51,7 +51,7 @@ static void setting_time_ug_cb_resize(void *data, Evas *e, Evas_Object *obj,
* @return
*/
static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
- app_control_h service, void *priv)
+ app_control_h service, void *priv)
{
SETTING_TRACE_BEGIN;
setting_retvm_if((!priv), NULL, "!priv");
@@ -65,7 +65,7 @@ static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
timeUG->evas = evas_object_evas_get(timeUG->win_main_layout);
timeUG->pop_progress = NULL;
- /* Initialize Caller value */
+ /* Initialize Caller value */
timeUG->caller = NULL;
setting_retvm_if(timeUG->win_main_layout == NULL, NULL, "cannot get main window ");
@@ -91,37 +91,37 @@ static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
timeUG->is_expand_time_format_list = 1;
}
- /* creating a view. */
+ /* creating a view. */
setting_view_node_set_cur_view(&setting_view_time_main);
setting_view_create(&setting_view_time_main, (void *)timeUG);
evas_object_event_callback_add(timeUG->win_main_layout,
- EVAS_CALLBACK_RESIZE,
- setting_time_ug_cb_resize, timeUG);
+ EVAS_CALLBACK_RESIZE,
+ setting_time_ug_cb_resize, timeUG);
return timeUG->ly_main;
}
static void setting_time_ug_on_start(ui_gadget_h ug, app_control_h service,
- void *priv)
+ void *priv)
{
SETTING_TRACE_BEGIN;
- /* do nothing */
+ /* do nothing */
}
static void setting_time_ug_on_pause(ui_gadget_h ug, app_control_h service,
- void *priv)
+ void *priv)
{
SETTING_TRACE_BEGIN;
- /* do nothing */
+ /* do nothing */
}
static void setting_time_ug_on_resume(ui_gadget_h ug, app_control_h service,
- void *priv)
+ void *priv)
{
- /* do nothing */
+ /* do nothing */
}
static void setting_time_ug_on_destroy(ui_gadget_h ug, app_control_h service,
- void *priv)
+ void *priv)
{
SETTING_TRACE_BEGIN;
setting_retm_if((!priv), "!priv");
@@ -130,7 +130,7 @@ static void setting_time_ug_on_destroy(ui_gadget_h ug, app_control_h service,
evas_object_event_callback_del(timeUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_time_ug_cb_resize); /* fix flash issue for gallery */
timeUG->ug = ug;
- /* delete the allocated objects. */
+ /* delete the allocated objects. */
setting_view_destroy(&setting_view_time_main, timeUG);
if (NULL != ug_get_layout(timeUG->ug)) {
@@ -142,49 +142,49 @@ static void setting_time_ug_on_destroy(ui_gadget_h ug, app_control_h service,
}
static void setting_time_ug_on_message(ui_gadget_h ug, app_control_h msg,
- app_control_h service, void *priv)
+ app_control_h service, void *priv)
{
SETTING_TRACE_BEGIN;
}
static void setting_time_ug_on_event(ui_gadget_h ug, enum ug_event event,
- app_control_h service, void *priv)
+ app_control_h service, void *priv)
{
SETTING_TRACE_BEGIN;
SettingTimeUG *ad = (SettingTimeUG *) priv;
switch (event) {
- case UG_EVENT_LOW_MEMORY:
- break;
- case UG_EVENT_LOW_BATTERY:
- break;
- case UG_EVENT_LANG_CHANGE: {
- const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET);
- if (pa_lang) {
- char *q = strchr(pa_lang, '.');
- if (q) {
- *q = '\0';
- }
+ case UG_EVENT_LOW_MEMORY:
+ break;
+ case UG_EVENT_LOW_BATTERY:
+ break;
+ case UG_EVENT_LANG_CHANGE: {
+ const char *pa_lang = vconf_get_str(VCONFKEY_LANGSET);
+ if (pa_lang) {
+ char *q = strchr(pa_lang, '.');
+ if (q) {
+ *q = '\0';
}
- int err = -1;
-
- uloc_setDefault(pa_lang, &err);
- FREE(pa_lang);
- setting_view_update(&setting_view_time_main, ad);
}
- break;
- case UG_EVENT_ROTATE_PORTRAIT:
- break;
- case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
- break;
- case UG_EVENT_ROTATE_LANDSCAPE:
- break;
- case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
- break;
- case UG_EVENT_REGION_CHANGE:
- break;
- default:
- break;
+ int err = -1;
+
+ uloc_setDefault(pa_lang, &err);
+ FREE(pa_lang);
+ setting_view_update(&setting_view_time_main, ad);
+ }
+ break;
+ case UG_EVENT_ROTATE_PORTRAIT:
+ break;
+ case UG_EVENT_ROTATE_PORTRAIT_UPSIDEDOWN:
+ break;
+ case UG_EVENT_ROTATE_LANDSCAPE:
+ break;
+ case UG_EVENT_ROTATE_LANDSCAPE_UPSIDEDOWN:
+ break;
+ case UG_EVENT_REGION_CHANGE:
+ break;
+ default:
+ break;
}
}
@@ -192,40 +192,40 @@ static void setting_time_ug_on_event(ui_gadget_h ug, enum ug_event event,
* @brief key event handler for UG
*/
static void setting_time_ug_on_key_event(ui_gadget_h ug,
- enum ug_key_event event, app_control_h service,
- void *priv)
+ enum ug_key_event event, app_control_h service,
+ void *priv)
{
SETTING_TRACE_BEGIN;
SettingTimeUG *ad = (SettingTimeUG *) priv;
switch (event) {
- case UG_KEY_EVENT_END: {
+ case UG_KEY_EVENT_END: {
#if 0
- if (0 == safeStrCmp(ad->caller, "pwlock")) {
- /* Create Bundle and send message */
+ if (0 == safeStrCmp(ad->caller, "pwlock")) {
+ /* Create Bundle and send message */
- app_control_h svc;
- if (app_control_create(&svc))
- return;
+ app_control_h svc;
+ if (app_control_create(&svc))
+ return;
- app_control_add_extra_data(svc, "result", "lbutton_click");
- ug_send_result(ad->ug, svc);
+ app_control_add_extra_data(svc, "result", "lbutton_click");
+ ug_send_result(ad->ug, svc);
- app_control_destroy(svc);
- }
+ app_control_destroy(svc);
+ }
#endif
- if (elm_naviframe_top_item_get(ad->navi_bar) ==
- elm_naviframe_bottom_item_get(ad->navi_bar)) {
- ug_destroy_me(ug);
- } else {
- /* elm_naviframe_item_pop(ad->navi_bar); */
- setting_view_cb_at_endKey(ad);
- }
+ if (elm_naviframe_top_item_get(ad->navi_bar) ==
+ elm_naviframe_bottom_item_get(ad->navi_bar)) {
+ ug_destroy_me(ug);
+ } else {
+ /* elm_naviframe_item_pop(ad->navi_bar); */
+ setting_view_cb_at_endKey(ad);
}
- break;
- default:
- break;
+ }
+ break;
+ default:
+ break;
}
}
@@ -267,8 +267,7 @@ UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
FREE(timeUG);
}
-UG_MODULE_API int setting_plugin_search_init(app_control_h service, void *priv,
- char **applocale)
+UG_MODULE_API int setting_plugin_search_init(app_control_h service, void *priv, char **applocale)
{
int i, size;
Setting_Cfg_Node_T *node;
@@ -276,7 +275,7 @@ UG_MODULE_API int setting_plugin_search_init(app_control_h service, void *priv,
const Setting_Cfg_Node_T search_configs[] = {
{DATE_TIME_STR_AUTOMATIC_UPDATE, NULL, NULL, 0, Cfg_Item_unResetable, 0, Cfg_Item_View_Node, NULL, DATE_TIME_STR_DATE_AND_TIME, NULL, NULL },
- {DATE_TIME_STR_TIME_ZONE, NULL, NULL, 0, Cfg_Item_unResetable, 0, Cfg_Item_View_Node, NULL, DATE_TIME_STR_DATE_AND_TIME, NULL, NULL },
+ {DATE_TIME_STR_TIME_ZONE, NULL, NULL, 0, Cfg_Item_unResetable, 0, Cfg_Item_View_Node, NULL, DATE_TIME_STR_DATE_AND_TIME, NULL, NULL },
/* Duplicated title name : 'Date and time' with UG name : 'Date and time' */
{DATE_TIME_STR_DATE_AND_TIME, NULL, NULL, 0, Cfg_Item_unResetable, 0, Cfg_Item_View_Node, NULL, DATE_TIME_STR_DATE_AND_TIME, NULL, NULL },
@@ -292,12 +291,12 @@ UG_MODULE_API int setting_plugin_search_init(app_control_h service, void *priv,
for (i = 0; i < size; i++) {
node = setting_plugin_search_item_subindex_add(
- search_configs[i].key_name,
- search_configs[i].ug_args,
- IMG_DateTime,
- search_configs[i].item_type,
- search_configs[i].data,
- search_configs[i].sub_index);
+ search_configs[i].key_name,
+ search_configs[i].ug_args,
+ IMG_DateTime,
+ search_configs[i].item_type,
+ search_configs[i].data,
+ search_configs[i].sub_index);
*pplist = eina_list_append(*pplist, node);
}