#define MAX_DEVICE_NAME_LEN 32
-#define DEVICED_BUS_NAME "org.tizen.system.deviced"
-#define DEVICED_OBJECT_PATH "/Org/Tizen/System/DeviceD"
-#define DEVICED_INTERFACE_NAME DEVICED_BUS_NAME
-#define DEVICED_PATH_BOARD DEVICED_OBJECT_PATH"/Board"
-#define DEVICED_INTERFACE_BOARD DEVICED_INTERFACE_NAME".Board"
-#define METHOD_GET_SERIAL "GetSerial"
-
#define DEVICE_NAME "IDS_ST_HEADER_DEVICE_NAME"
-
#define EMPTY_LIMITATION_STR "IDS_ST_BODY_THE_NAME_FIELD_CANNOT_BE_EMPTY"
#define DEVICE_NAME_DEFAULT "Radioed"
-#define ITEM_NAME_STATUS "Status"
+#define ITEM_NAME_STATUS "Status"
static int _view_create(void *cb);
static int _view_destroy(void *cb);
*
* @return no return
*/
-static void __setting_about_popup_rsp_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __popup_rsp_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
SettingAbout *ad = (SettingAbout *)data;
FREE(name_value);
SETTING_TRACE("ad->item_dev_name->sub_desc:%s",
ad->item_dev_name->sub_desc);
- Ecore_IMF_Context *imf_context =
- (Ecore_IMF_Context *)elm_entry_imf_context_get(
+ Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)
+ elm_entry_imf_context_get(
ad->item_dev_name->eo_check);
if (imf_context)
ecore_imf_context_input_panel_show(imf_context);
*
* @return FALSE for call it once, TRUE for call once the CPU is in idler
*/
-static Eina_Bool __setting_about_popup_remove_delay(void *data)
+static Eina_Bool __popup_remove_delay(void *data)
{
SETTING_TRACE_BEGIN;
SettingAbout *ad = data;
* @param obj Evas object
* @param event_info event type
*/
-static void __setting_about_popup_del_cb(void *data, Evas *e, Evas_Object *obj,
+static void __popup_del_cb(void *data, Evas *e, Evas_Object *obj,
void *event_info)
{
*
* @param data application context
*/
-static Eina_Bool __setting_about_popup_show_delay(void *data)
+static Eina_Bool __popup_show_delay(void *data)
{
SETTING_TRACE_BEGIN;
retvm_if(data == NULL, FALSE, "Data parameter is NULL");
ad->popup = setting_create_popup(ad, ad->md.window,
"IDS_ST_HEADER_ENTER_VALID_DEVICE_NAME_ABB",
"IDS_ST_POP_YOU_MUST_ENTER_A_DEVICE_NAME",
- __setting_about_popup_rsp_cb, 0, FALSE, FALSE,
+ __popup_rsp_cb, 0, FALSE, FALSE,
1, "IDS_ST_BUTTON_OK_ABB");
evas_object_event_callback_add(ad->popup, EVAS_CALLBACK_DEL,
- __setting_about_popup_del_cb, ad);
+ __popup_del_cb, ad);
}
return FALSE;
*
* @return FALSE for call it once, TRUE for call once the CPU is in idler
*/
-static void __setting_about_popup_mobile_ap_turn_off_ask_resp_cb(void *data,
- Evas_Object *obj, void *event_info)
+static void __popup_mobile_ap_turn_off_ask_resp_cb(void *data, Evas_Object *obj,
+ void *event_info)
{
SETTING_TRACE_BEGIN;
setting_retm_if(data == NULL, "Data parameter is NULL");
EINA_TRUE);
elm_entry_cursor_end_set(ad->item_dev_name->eo_check);
- Ecore_IMF_Context *imf_context =
- (Ecore_IMF_Context *)elm_entry_imf_context_get(
+ Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)
+ elm_entry_imf_context_get(
ad->item_dev_name->eo_check);
if (imf_context)
ecore_imf_context_input_panel_show(imf_context);
* @param event_info event type
*/
-static void __setting_about_popup_regulatory_info_rsp_cb(void *data,
+static void __popup_regulatory_info_rsp_cb(void *data,
Evas_Object *obj, void *event_info)
{
retm_if(data == NULL, "Data parameter is NULL");
*
* @param data application context
*/
-static void __setting_about_popup_regulatory_info(void *data)
+static void __popup_regulatory_info(void *data)
{
SETTING_TRACE_BEGIN;
elm_object_text_set(btn1, _("IDS_ST_BUTTON_OK"));
elm_object_part_content_set(popup, "button1", btn1);
evas_object_smart_callback_add(btn1, "clicked",
- __setting_about_popup_regulatory_info_rsp_cb, popup);
+ __popup_regulatory_info_rsp_cb, popup);
evas_object_show(popup);
SETTING_TRACE_END;
* @param szStr the buffer for store the model name
* @param nSize buffer size
*/
-static void __setting_about_main_get_phone_model_name(char *szStr, int nSize)
+static void __get_phone_model_name(char *szStr, int nSize)
{
retm_if(szStr == NULL, "szStr parameter is NULL");
* @param szStr the buffer for store SW version
* @param nSize buffer size
*/
-static void __setting_about_main_get_sw_version(char *szStr, int nSize)
+static void __get_sw_version(char *szStr, int nSize)
{
retm_if(szStr == NULL, "szStr parameter is NULL");
return;
}
- /* This part of code was unused */
- /*
- char *build_info = NULL;
- ret = system_info_get_platform_string(
- "http://tizen.org/system/build.string", &build_info);
- if (ret != SYSTEM_INFO_ERROR_NONE) {
- SETTING_TRACE_ERROR(
- "fail to call system_info_get_platform_string");
- FREE(version);
- FREE(build_info);
- snprintf(szStr, nSize, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
- return;
- }
- */
snprintf(szStr, nSize, "TIZEN %s", version);
FREE(version);
- /*FREE(build_info);*/
}
/**
*
* @return -1 if getting CPU info fails, otherwise 0 is returned
*/
-static int __setting_about_main_stat_get_cpuinfo(char *szStr, int nSize)
+static int __stat_get_cpuinfo(char *szStr, int nSize)
{
int ret = 0;
* @param obj the button evas object
* @param event_info event type
*/
-static void __setting_about_naviframe_btn_done_cb(void *data, Evas_Object *obj,
+static void __naviframe_btn_done_cb(void *data, Evas_Object *obj,
void *event_info)
{
SETTING_TRACE_BEGIN;
* @param obj the button evas object
* @param event_info event type
*/
-static void __setting_about_naviframe_btn_cancel_cb(void *data,
- Evas_Object *obj, void *event_info)
+static void __naviframe_btn_cancel_cb(void *data, Evas_Object *obj,
+ void *event_info)
{
SETTING_TRACE_BEGIN;
setting_retm_if(data == NULL, "data is NULL");
elm_naviframe_item_pop(ad->md.naviframe);
SETTING_TRACE_END;
}
-static void __setting_about_main_popup_cb(void *data, Evas_Object *obj,
+static void __popup_cb(void *data, Evas_Object *obj,
void *event_info)
{
SETTING_TRACE_BEGIN;
SettingAbout *ad = (SettingAbout *)data;
switch (btn_type(obj)) {
- case POPUP_RESPONSE_OK: {
+ case POPUP_RESPONSE_OK:
if (ad->popup_space) {
ad->popup_showed_flag = FALSE;
evas_object_del(ad->popup_space);
ad->popup_space = NULL;
}
break;
- }
- default: {
+ default:
break;
}
- }
}
/**
* @param data application data
* @param obj the entry evas object
*/
-static void __setting_about_entry_changed_cb(void *data, Evas_Object *obj)
+static void __entry_changed_cb(void *data, Evas_Object *obj)
{
retm_if(!data || !obj, "Data parameter is NULL");
/*return if entry is not focused too */
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
+ Setting_GenGroupItem_Data *list_item =
+ (Setting_GenGroupItem_Data *)data;
SettingAbout *ad = list_item->userdata;
retm_if(ad == NULL, "Data parameter is NULL");
* @param obj the entry evas object
* @param event_info event type
*/
-static void __setting_about_entry_device_name_changed_cb(void *data,
- Evas_Object *obj, void *event_info)
+static void __entry_device_name_changed_cb(void *data, Evas_Object *obj,
+ void *event_info)
{
/*SETTING_TRACE_BEGIN; */
setting_retm_if(obj == NULL, "obj is NULL");
} else {
Eina_Bool device_focus_status = elm_object_focus_get(
ad->item_dev_name->eo_check);
- if (device_focus_status) {
- /*SETTING_TRACE("name is NOT empty, but focus"); */
+ if (device_focus_status)
elm_object_item_signal_emit(list_item->item,
"elm,state,eraser,show", "");
- }
}
elm_object_item_signal_emit(list_item->item,
"elm,state,guidetext,hide", "");
}
- __setting_about_entry_changed_cb(data, obj);
+ __entry_changed_cb(data, obj);
/*SETTING_TRACE_END; */
}
*
* Focused callback will show X marked button and hide guidetext.
*/
-static void __setting_about_entry_focused(void *data, Evas_Object *obj,
- void *event_info)
+static void __entry_focused(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
retm_if(!data || !obj, "Data parameter is NULL");
* @param obj the entry evas object
* @param event_info event type
*/
-static void __setting_about_entry_unfocus_cb(void *data, Evas_Object *obj,
- void *event_info)
+static void __entry_unfocus_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
retm_if(!data || !obj, "Data parameter is NULL");
* @param obj the entry evas object
* @param event_info event type
*/
-static void __setting_about_entry_max_len_reached(void *data, Evas_Object *obj,
+static void __entry_max_len_reached(void *data, Evas_Object *obj,
void *event_info)
{
SETTING_TRACE_BEGIN;
/*notify only when entry is being focused on. */
retm_if(!elm_object_focus_get(obj), "Entry is not focused");
- Setting_GenGroupItem_Data *list_item = (Setting_GenGroupItem_Data *)data;
+ Setting_GenGroupItem_Data *list_item =
+ (Setting_GenGroupItem_Data *)data;
list_item->maxLengthReachFlag = true;
SettingAbout *ad = list_item->userdata;
_("IDS_ST_POP_THE_MAXIMUM_NUMBERS_OF_CHARACTERS_FOR_YOUR_DEVICE_NAME_HPD_HAS_BEEN_EXCEEDED"),
MAX_DEVICE_NAME_LEN);
- ad->popup_space = setting_create_popup(ad, ad->md.window,
+ ad->popup_space = setting_create_popup(ad,
+ ad->md.window,
"IDS_ST_HEADER_ENTER_VALID_DEVICE_NAME_ABB",
- strMax, __setting_about_main_popup_cb,
+ strMax, __popup_cb,
0, FALSE, FALSE, 1,
"IDS_ST_BUTTON_OK_ABB");
}
* @param obj the entry evas object
* @param event_info event type
*/
-static void __setting_about_entry_input_panel_event_cb(void *data,
- Ecore_IMF_Context *ctx, int value)
+static void __entry_input_panel_event_cb(void *data, Ecore_IMF_Context *ctx,
+ int value)
{
SETTING_TRACE_BEGIN;
retm_if(data == NULL, "Data parameter is NULL");
if (ad->item_dev_name) {
if (ad->empty_flag) {
ad->idler_add_popup = ecore_idler_add(
- __setting_about_popup_show_delay,
+ __popup_show_delay,
ad);
}
}
* should be removed to fix blinking issue.*/
if (ad->pause_flag) {
ad->idler_remove_popup = ecore_idler_add(
- __setting_about_popup_remove_delay, ad);
+ __popup_remove_delay, ad);
}
elm_object_focus_set(ad->md.naviframe, EINA_FALSE);
* @param data application data
* @param event_info event type
*/
-static void __setting_about_main_vconf_change_cb(keynode_t *key, void *data)
+static void __vconf_change_cb(keynode_t *key, void *data)
{
SETTING_TRACE_BEGIN;
setting_retm_if(NULL == key, "key is NULL");
*
* @param data application data
*/
-static void __setting_about_main_certificates_clicked(void *data)
+static void __certificates_clicked(void *data)
{
app_control_h svc = NULL;
SettingAbout *ad = (SettingAbout *)data;
app_control_destroy(svc);
}
-/**
- * @brief Do process when clicking '<-' button
- *
- * @param data application context
- * @param obj evas object
- * @param event_info event type
- */
-static void __setting_about_main_click_softkey_back_cb(void *data,
- Evas_Object *obj, void *event_info)
-{
- SETTING_TRACE_BEGIN;
- SettingAbout *ad = (SettingAbout *)data;
-
- if (ad)
- elm_naviframe_item_pop(ad->md.naviframe);
-}
-
-static Eina_Bool __setting_about_child_view_back_cb(void *data,
- Elm_Object_Item *it)
+static Eina_Bool __child_view_back_cb(void *data, Elm_Object_Item *it)
{
SETTING_TRACE_BEGIN;
SettingAbout *ad = data;
return EINA_TRUE;
}
-static Eina_Bool __setting_about_name_view_key_down(void *data, int type,
- void *event)
+static Eina_Bool __name_view_key_down(void *data, int type, void *event)
{
SETTING_TRACE_BEGIN;
Evas_Event_Key_Down *ev = event;
SettingAbout *ad = data;
if (!strcmp(ev->keyname, "XF86Back"))
- __setting_about_naviframe_btn_cancel_cb(ad, NULL, NULL);
+ __naviframe_btn_cancel_cb(ad, NULL, NULL);
return ECORE_CALLBACK_RENEW;
}
-static Eina_Bool __setting_about_name_focus_update_cb(void *data)
+static Eina_Bool __name_focus_update_cb(void *data)
{
SETTING_TRACE_BEGIN;
/* error check */
item_data->focus_cb, item_data);
}
- if (item_data->start_change_cb) {
+ if (item_data->start_change_cb)
evas_object_event_callback_add(entry, EVAS_CALLBACK_KEY_DOWN,
(Evas_Object_Event_Cb)(item_data->start_change_cb),
item_data->userdata);
- }
- Ecore_IMF_Context *imf_context =
- (Ecore_IMF_Context *)elm_entry_imf_context_get(
- entry);
- if (imf_context && item_data->x_callback_cb) {
+ Ecore_IMF_Context *imf_context = (Ecore_IMF_Context *)
+ elm_entry_imf_context_get(entry);
+ if (imf_context && item_data->x_callback_cb)
ecore_imf_context_input_panel_event_callback_add(imf_context,
ECORE_IMF_INPUT_PANEL_STATE_EVENT,
item_data->x_callback_cb, item_data->userdata);
- }
+
if (item_data->input_panel_disable_flag)
elm_entry_input_panel_enabled_set(entry, EINA_FALSE);
return entry;
}
-static Evas_Object *__device_name_genlist_content_get(void *data, Evas_Object *genlist, const char *part)
+static Evas_Object *__device_name_genlist_content_get(void *data,
+ Evas_Object *genlist, const char *part)
{
Evas_Object *entry = NULL;
retv_if(!data || !genlist, NULL);
/**
* Setting > About > Device name > (new view) here
*/
-static void __setting_about_main_creat_name_view(void *data)
+static void __creat_name_view(void *data)
{
SETTING_TRACE_BEGIN;
Evas_Object *list = NULL;
SWALLOW_Type_LAYOUT_EDITFIELD,
SETTING_ABOUT_DEVICE_NAME_STR,
pa_sub_desc,
- __setting_about_entry_device_name_changed_cb,
- __setting_about_entry_focused,
- __setting_about_entry_unfocus_cb,
+ __entry_device_name_changed_cb,
+ __entry_focused,
+ __entry_unfocus_cb,
NULL,
- __setting_about_entry_max_len_reached,
+ __entry_max_len_reached,
ELM_INPUT_PANEL_LAYOUT_NORMAL,
false,
TRUE,
setting_retm_if(!item_data, "calloc failed");
item_data->swallow_type = SWALLOW_Type_LAYOUT_EDITFIELD;
item_data->isSinglelineFlag = FALSE;
- item_data->x_callback_cb = __setting_about_entry_input_panel_event_cb;
+ item_data->x_callback_cb = __entry_input_panel_event_cb;
item_data->guide_text = (char *)g_strdup(EMPTY_LIMITATION_STR);
item_data->focus_unallowed = get_tethering_status();
item_data->return_key_type = ELM_INPUT_PANEL_RETURN_KEY_TYPE_DONE;
sizeof(Elm_Entry_Filter_Limit_Size));
if (item_data->limit_filter_data) {
/*max byte len is 32 -> MAX_DEVICE_NAME_LEN */
- item_data->limit_filter_data->max_byte_count = MAX_DEVICE_NAME_LEN;
+ item_data->limit_filter_data->max_byte_count =
+ MAX_DEVICE_NAME_LEN;
item_data->window = ad->md.window;
} else {
SETTING_TRACE_ERROR("fail to calloc");
navi_it = setting_push_to_naviframe_with_back_button(DEVICE_NAME,
NULL, NULL, ad, list, ad->md.naviframe);
elm_naviframe_item_pop_cb_set(navi_it,
- __setting_about_child_view_back_cb, ad);
+ __child_view_back_cb, ad);
/* Title Cancel Button */
btn = elm_button_add(ad->md.naviframe);
elm_object_style_set(btn, "naviframe/title_cancel");
evas_object_smart_callback_add(btn, "clicked",
- __setting_about_naviframe_btn_cancel_cb, ad);
+ __naviframe_btn_cancel_cb, ad);
elm_object_item_part_content_set(navi_it, "title_left_btn", btn);
/* Title Done Button */
btn = elm_button_add(ad->md.naviframe);
elm_object_style_set(btn, "naviframe/title_done");
evas_object_smart_callback_add(btn, "clicked",
- __setting_about_naviframe_btn_done_cb, ad);
+ __naviframe_btn_done_cb, ad);
elm_object_item_part_content_set(navi_it, "title_right_btn", btn);
ad->event_handler = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN,
- __setting_about_name_view_key_down, ad);
+ __name_view_key_down, ad);
ad->name_update_idler = ecore_idler_add(
- __setting_about_name_focus_update_cb, ad);
+ __name_focus_update_cb, ad);
}
/**
* @param obj evas object
* @param event_info event type
*/
-static void __setting_about_main_mouse_up_Gendial_list_cb(void *data,
- Evas_Object *obj, void *event_info)
+static void __mouse_up_Gendial_list_cb(void *data, Evas_Object *obj,
+ void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
Setting_GenGroupItem_Data *list_item =
(Setting_GenGroupItem_Data *)elm_object_item_data_get(
item);
- retm_if(list_item == NULL, "return of elm_object_item_data_get is NULL");
+ retm_if(list_item == NULL, "elm_object_item_data_get return NULL");
SETTING_TRACE("clicking item[%s]", _(list_item->keyStr));
if (!safeStrCmp("IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB",
list_item->keyStr)) {
- __setting_about_main_certificates_clicked(data);
+ __certificates_clicked(data);
} else if (!safeStrCmp("IDS_ST_BODY_REGULATORY_INFORMATION_ABB",
list_item->keyStr)) {
- __setting_about_popup_regulatory_info(data);
+ __popup_regulatory_info(data);
} else if (!safeStrCmp("IDS_ST_MBODY_LEGAL_INFORMATION_ABB",
list_item->keyStr)) {
app_launcher("org.tizen.setting-license",
#endif
} else if (!safeStrCmp(SETTING_ABOUT_DEVICE_NAME_STR,
list_item->keyStr)) {
- __setting_about_main_creat_name_view(data);
+ __creat_name_view(data);
} else if (!safeStrCmp(ITEM_NAME_STATUS,
list_item->keyStr)) {
setting_view_create(&view_setting_about_status, (void *)data);
* @param obj evas object
* @param event_info event type
*/
-static void __setting_about_main_gl_drag(void *data, Evas_Object *obj,
- void *event)
+static void __gl_drag(void *data, Evas_Object *obj, void *event)
{
ret_if(!data);
retm_if(event == NULL, "Invalid argument: event info is NULL");
* @param obj evas object
* @param event_info event type
*/
-static void __setting_about_main_gl_mouse_up(void *data, Evas *e,
- Evas_Object *obj, void *event)
+static void __gl_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event)
{
SettingAbout *ad = (SettingAbout *)data;
Evas_Event_Mouse_Up *ev = (Evas_Event_Mouse_Up *)event;
if (ad->item_dev_name) {
Elm_Object_Item *selected_item = elm_genlist_at_xy_item_get(
- ad->md.genlist, ev->output.x, ev->output.y, NULL);
+ ad->md.genlist, ev->output.x, ev->output.y,
+ NULL);
if (ad->item_dev_name->item == selected_item) {
if (elm_object_focus_get(ad->item_dev_name->eo_check)) {
ad->md.window,
NULL,
SETTING_ABOUT_MOBILE_AP_TURNED_OFF,
- __setting_about_popup_mobile_ap_turn_off_ask_resp_cb,
+ __popup_mobile_ap_turn_off_ask_resp_cb,
0,
FALSE, FALSE, 2,
"IDS_ST_BODY_TURN_OFF",
imf_context = (Ecore_IMF_Context *)elm_entry_imf_context_get(
ad->item_dev_name->eo_check);
- if (imf_context) {
+ if (imf_context)
ecore_imf_context_input_panel_show(
imf_context);
- }
}
} else {
/*to make inputing words input */
* @return FALSE for call it once and then destory the timer, TRUE for always
* call it when the timer is reached.
*/
-static int __setting_about_main_generate_genlist(void *data)
+static int __generate_genlist(void *data)
{
SETTING_TRACE_BEGIN;
-
- retv_if(data == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
-
- SettingAbout *ad = (SettingAbout *)data;
+ int ret;
Setting_GenGroupItem_Data *item_data = NULL;
char str[MAX_DISPLAY_STR_LEN_ON_PHONE_INFO] = { 0, };
int ret_value = 0;
int dim2 = 0;
float ram_total_gb = 0;
runtime_memory_info_s mem_info = {0};
+ SettingAbout *ad = (SettingAbout *)data;
+ retv_if(!ad, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
/* [UI] Certificates */
/* implementation is in progress. */
- item_data = setting_create_Gendial_field_def(ad->md.genlist, &(ad->itc_1text),
- __setting_about_main_mouse_up_Gendial_list_cb, ad,
+ item_data = setting_create_Gendial_field_def(ad->md.genlist,
+ &(ad->itc_1text), __mouse_up_Gendial_list_cb, ad,
SWALLOW_Type_INVALID, NULL, NULL, 0,
"IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB", NULL, NULL);
if (!item_data)
/* [UI] Legal Information */
setting_create_Gendial_field_def(ad->md.genlist, &(ad->itc_1text),
- __setting_about_main_mouse_up_Gendial_list_cb, ad,
+ __mouse_up_Gendial_list_cb, ad,
SWALLOW_Type_INVALID, NULL, NULL, 0,
"IDS_ST_MBODY_LEGAL_INFORMATION_ABB", NULL, NULL);
NULL);
/*////////////////////////////////////////////////////////////////// */
- /* 1. Name */
+ /* 1. [UI] Name */
/* Device name */
char *name_value = vconf_get_str(VCONFKEY_SETAPPL_DEVICE_NAME_STR);
char *pa_sub_desc = elm_entry_utf8_to_markup(name_value);
if (NULL == pa_sub_desc || '\0' == pa_sub_desc[0])
ad->empty_flag = TRUE;
- /* [UI] Name */
- ad->item_dev_name_main = item_data = setting_create_Gendial_field_def(
+ ad->item_dev_name_main = setting_create_Gendial_field_def(
ad->md.genlist, &(ad->itc_2text_2),
- __setting_about_main_mouse_up_Gendial_list_cb, ad,
+ __mouse_up_Gendial_list_cb, ad,
SWALLOW_Type_INVALID, NULL,
NULL, 0, SETTING_ABOUT_DEVICE_NAME_STR, pa_sub_desc,
NULL);
- if (item_data)
- __BACK_POINTER_SET(ad->item_dev_name_main);
- else
+ __BACK_POINTER_SET(ad->item_dev_name_main);
+ if (!ad->item_dev_name_main)
SETTING_TRACE_ERROR("item_data is NULL");
FREE(pa_sub_desc);
/* 2. [UI] Model number */
- memset(str, 0x00, sizeof(str));
- __setting_about_main_get_phone_model_name(str, sizeof(str));
+ str[0] = '\0';
+ __get_phone_model_name(str, sizeof(str));
item_data = setting_create_Gendial_field_def(ad->md.genlist,
&(ad->itc_2text_2), NULL,
NULL, SWALLOW_Type_INVALID, NULL,
}
/* 3. [UI] Tizen version */
- memset(str, 0x00, sizeof(str));
- __setting_about_main_get_sw_version(str, sizeof(str));
+ str[0] = '\0';
+ __get_sw_version(str, sizeof(str));
item_data = setting_create_Gendial_field_def(ad->md.genlist,
&(ad->itc_2text_2), NULL,
NULL, SWALLOW_Type_INVALID, NULL,
}
/* 4. [UI] CPU Info */
- memset(str, 0x00, sizeof(str));
- int ret = __setting_about_main_stat_get_cpuinfo(str, sizeof(str));
- if (ret == -1) {
+ str[0] = '\0';
+ ret = __stat_get_cpuinfo(str, sizeof(str));
+ if (ret == -1)
SETTING_TRACE_ERROR("call __stat_get_cpuinfo fail");
- }
+
item_data = setting_create_Gendial_field_def(
ad->md.genlist, &(ad->itc_2text_2), NULL,
NULL, SWALLOW_Type_INVALID, NULL,
EINA_TRUE);
elm_genlist_item_select_mode_set(item_data->item,
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
- __BACK_POINTER_SET(item_data);
} else {
SETTING_TRACE_ERROR("item_data is NULL");
}
/* 5. [UI] Device RAM amount: */
- memset(str, 0, sizeof(str));
+ str[0] = '\0';
ret_value = runtime_info_get_system_memory_info(&mem_info);
if (RUNTIME_INFO_ERROR_NONE == ret_value) {
ram_total_gb = mem_info.total / 1000000.0;
snprintf(str, sizeof(str), "%0.1fGB", ram_total_gb);
}
- item_data = setting_create_Gendial_field_def(
- ad->md.genlist,
- &(ad->itc_2text_2), NULL,
- NULL, SWALLOW_Type_INVALID, NULL,
+ item_data = setting_create_Gendial_field_def(ad->md.genlist,
+ &(ad->itc_2text_2), NULL, NULL,
+ SWALLOW_Type_INVALID, NULL,
NULL, 0, "RAM", str, NULL);
if (item_data) {
elm_object_item_disabled_set(item_data->item, EINA_TRUE);
elm_genlist_item_select_mode_set(item_data->item,
ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
+
/* 6. [UI] Device resolution: */
- memset(str, 0, sizeof(str));
+ str[0] = '\0';
ret_value = system_info_get_platform_int(
"http://tizen.org/feature/screen.width",
&dim1);
system_info_get_platform_int(
"http://tizen.org/feature/screen.height",
&dim2);
- if (SYSTEM_INFO_ERROR_NONE == ret_value) {
- snprintf(str, sizeof(str),
- "%d x %d", dim1, dim2);
- }
+ if (SYSTEM_INFO_ERROR_NONE == ret_value)
+ snprintf(str, sizeof(str), "%d x %d", dim1, dim2);
}
- item_data = setting_create_Gendial_field_def(
- ad->md.genlist,
- &(ad->itc_2text_2), NULL,
- NULL, SWALLOW_Type_INVALID, NULL,
- NULL, 0, "Resolution", str, NULL);
+ item_data = setting_create_Gendial_field_def(ad->md.genlist,
+ &(ad->itc_2text_2), NULL, NULL,
+ SWALLOW_Type_INVALID, NULL,
+ NULL, 0, "Resolution", str,
+ NULL);
if (item_data) {
elm_object_item_disabled_set(item_data->item, EINA_TRUE);
elm_genlist_item_select_mode_set(item_data->item,
}
/* 7. [UI] Device status: */
- item_data = setting_create_Gendial_field_def(
- ad->md.genlist, &(ad->itc_1icon_1text_sub),
- __setting_about_main_mouse_up_Gendial_list_cb, ad,
- SWALLOW_Type_INVALID, NULL,
- NULL, 0, ITEM_NAME_STATUS,
- "Show phone number, network"\
- "status, and other information.",
- NULL);
+ (void)setting_create_Gendial_field_def(ad->md.genlist,
+ &(ad->itc_1icon_1text_sub), __mouse_up_Gendial_list_cb,
+ ad, SWALLOW_Type_INVALID, NULL, NULL, 0,
+ ITEM_NAME_STATUS, "Show phone number, network"\
+ "status, and other information.", NULL);
return SETTING_RETURN_SUCCESS;
}
{
SETTING_TRACE_BEGIN;
int ret;
- Evas_Object *back_button = NULL;
retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
SettingAbout *ad = (SettingAbout *)cb;
- view_init(&ad->md, _("IDS_ST_BODY_ABOUT_DEVICE"));
+ ret = view_init(&ad->md, _("IDS_ST_BODY_ABOUT_DEVICE"));
+ if (ret != SETTING_RETURN_SUCCESS)
+ return ret;
+ setting_add_back_button(&ad->md, _view_pop_cb, ad);
evas_object_smart_callback_add(ad->md.genlist, "drag",
- __setting_about_main_gl_drag, ad);
-
+ __gl_drag, ad);
evas_object_event_callback_add(ad->md.genlist, EVAS_CALLBACK_MOUSE_UP,
- __setting_about_main_gl_mouse_up, ad);
+ __gl_mouse_up, ad);
- back_button = setting_create_button(ad->md.naviframe,
- _("IDS_ST_BUTTON_BACK"), NAVI_BACK_ARROW_BUTTON_STYLE,
- __setting_about_main_click_softkey_back_cb, ad);
- elm_layout_content_set(ad->md.naviframe, "prev_btn", back_button);
- elm_naviframe_item_pop_cb_set(ad->md.naviframe_it, _view_pop_cb, ad);
-
- __setting_about_main_generate_genlist(ad);
+ __generate_genlist(ad);
ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
- __setting_about_main_vconf_change_cb, ad);
+ __vconf_change_cb, ad);
if (ret != 0)
SETTING_TRACE_ERROR("call vconf_notify_key_changed failed");
SettingAbout *ad = (SettingAbout *)cb;
ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_DEVICE_NAME_STR,
- __setting_about_main_vconf_change_cb);
+ __vconf_change_cb);
if (ret != 0)
SETTING_TRACE_ERROR("call vconf_ignore_key_changed failed");
static Eina_Bool _view_pop_cb(void *data, Elm_Object_Item *it)
{
+ SETTING_TRACE_BEGIN;
SettingAbout *ad = (SettingAbout *)data;
if (!ad || ad->empty_flag)