(Setting_GenGroupItem_Data *) data;
//SETTING_TRACE("part:%s", part);
- if (!safeStrCmp(part, "elm.text.1")) { /* title */
+ if (!safeStrCmp(part, "elm.text") || !safeStrCmp(part, "elm.text.1")) { /* title */
char label[HELP_MSG_BUFF_SIZE + 1] = { 0, };
if (item_data->keyStr)
{
SETTING_TRACE_ERROR("KEY_HOME ungrab error ret[%d]", ret);
}
}
-#endif
-#if SIMPLY_SUPPORT_ALL_RESET
bool __reset_all_idler(void *data)
{
SETTING_TRACE_BEGIN;
}
return FALSE;
}
-#endif
-#if SIMPLY_SUPPORT_ALL_RESET
+
static void __reset_all_button_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
ad->view_layout = view_layout;
ad->controllbar = controllbar;
+ ad->reset_list = elm_object_part_content_get(scroller, "search_list");
/* *******************************************update info */
setting_view_reset_settings.is_create = 1;
*general func
*
***************************************************/
+bool __delay_reset_location(void *data)
+{
+ SETTING_TRACE_BEGIN;
+ retv_if(!data, FALSE);
+ Setting_GenGroupItem_Data *item_data = data;
+ int plugin_ret = setting_invoke_reset_function("setting-location-efl", NULL, NULL);
+ SETTING_TRACE("load libug-%s.so[plugin_ret:%d]", "setting-location-efl", plugin_ret);
+ const char *result_str = NULL;
+ if (LOAD_LIB_FAILED == plugin_ret) // -1
+ {
+ result_str = LOAD_LIB_FAILED_STR;
+
+ } else if (UNDEFINED_LIB_SYMBOL == plugin_ret) // -2
+ {
+ result_str = UNDEFINE_STR;
+ } else if (OPERATE_LIB_SUCESS > plugin_ret){ // 0
+ result_str = RESET_FAILED_STR;
+
+ } else {
+ return FALSE;
+ }
+
+ item_data->sub_desc = (char *) g_strdup(_(result_str));
+ elm_object_item_data_set(item_data->item, item_data);
+ elm_genlist_item_update(item_data->item);
+ return FALSE;
+}
static void __reset_an_item(Setting_Done_List_Data *list_data,
const char *item_name,
NULL, NULL, 0,
(char *)item_name,
(char *)result_str, NULL);
- elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
-
} else
{
char *path = get_ug_path_from_ug_args((void *)ug_args);
service_h svc = get_bundle_from_ug_args((void *)ug_args);
-
- int plugin_ret = setting_invoke_reset_function(path, svc, NULL);
- SETTING_TRACE("load libug-%s.so[plugin_ret:%d]", path, plugin_ret);
+ int plugin_ret = OPERATE_LIB_SUCESS;
+ if (!isEmulBin() || 0 != safeStrCmp(KeyStr_Location, item_name)) //KeyStr_Location is too slow to display in emulator
+ {
+ plugin_ret = setting_invoke_reset_function(path, svc, NULL);
+ SETTING_TRACE("load libug-%s.so[plugin_ret:%d]", path, plugin_ret);
+ }
+ else
+ {
+ item_data = setting_create_Gendial_field_def(genlist, &(ad->itc_1text),
+ NULL, ad,
+ SWALLOW_Type_LAYOUT_SPECIALIZTION_X,
+ NULL, NULL, 0,
+ (char *)item_name,
+ (char *)result_str, NULL);
+ ecore_idler_add((Ecore_Task_Cb) __delay_reset_location, item_data);
+ return;
+ }
if (LOAD_LIB_FAILED == plugin_ret) // -1
{
NULL, NULL, 0,
(char *)item_name,
(char *)result_str, NULL);
- elm_genlist_item_select_mode_set(elm_genlist_item_append(genlist, &(itc_seperator), NULL, NULL,ELM_GENLIST_ITEM_NONE, NULL, NULL),
- ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
if (item_data)
evas_object_del(ad->pop_progress);
ad->pop_progress = NULL;
}
-
+ Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1");
+ if (btn)
+ {
+ setting_enable_evas_object(btn);
+ setting_dim_evas_object(btn, FALSE);
+ }
+
+ Evas_Object *genlist = elm_object_content_get(ad->notify);
+ if(genlist)
+ elm_genlist_item_show(elm_genlist_first_item_get(genlist), ELM_GENLIST_ITEM_SCROLLTO_TOP);
+ if(ad->reset_list)
+ elm_genlist_item_show(elm_genlist_first_item_get(ad->reset_list), ELM_GENLIST_ITEM_SCROLLTO_TOP);
return ECORE_CALLBACK_CANCEL;
}
if (ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status) {
+ elm_genlist_item_show(ad->list_data.chk_items[ad->gl_index].data_GenItem->item, ELM_GENLIST_ITEM_SCROLLTO_IN);//show the last item
__reset_an_item(&(ad->list_data),
ad->list_data.chk_items[ad->gl_index].item_name,
ad->list_data.chk_items[ad->gl_index].ug_args);
-
/*unselect item*/
elm_check_state_set(ad->list_data.chk_items[ad->gl_index].data_GenItem->eo_check, 0);
ad->list_data.chk_items[ad->gl_index].data_GenItem->chk_status = 0;
SETTING_TRACE_DEBUG("********resetting*******");
SettingResetUG *ad = (SettingResetUG *) list_data->UG_data;
-
- //some item must have been selected, or else cannot go into setting_reset_check_state()
ad->notify = elm_popup_add(ad->win_get);
elm_object_style_set(ad->notify,"menustyle");
elm_object_part_text_set(ad->notify, "title,text", _(RESET_RESULT_STR));
EVAS_HINT_EXPAND);
Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad);
elm_object_part_content_set(ad->notify, "button1", btn);
+ setting_disable_evas_object(btn);
+ setting_dim_evas_object(btn, TRUE);
Evas_Object *genlist = elm_genlist_add(ad->notify);
elm_object_style_set(genlist, "dialogue");
evas_object_size_hint_align_set(genlist,
EVAS_HINT_FILL,
EVAS_HINT_FILL);
-
- elm_object_content_set(ad->notify, genlist);
- evas_object_show(ad->notify);
-
- ad->pop_progress = setting_create_popup_with_progressbar(ad, ad->win_get,
- "list_process",
- NULL, NULL, NULL, 0, 1, 1);
-
+ /* add separator */
+ setting_create_Gendial_field_titleItem(genlist,
+ &itc_group_item,
+ RESET_RESULT_STR,
+ NULL);
//ad->gl_index = 0;
//ad->animator = ecore_animator_add(__reset_animator_cb, ad);
//Don't append any item until the popup is fully showed up
ecore_idler_add((Ecore_Task_Cb) __reset_delay_idler, ad);
+ elm_object_content_set(ad->notify, genlist);
+ elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
+ evas_object_show(ad->notify);
/* reset sel_all item */
elm_check_state_set(list_data->select_all_checkbox, 0);
//int screen_lock_type = 0;
//every time clicking 'Reset' button, restore following VCONFs
- vconf_set_bool(VCONFKEY_SETAPPL_FONT_CHANGED, FALSE);
+ //vconf_set_bool(VCONFKEY_SETAPPL_FONT_CHANGED, FALSE);
if (ad->list_data.selInfoPop) {
evas_object_del(ad->list_data.selInfoPop);
#endif
}
}
-
Evas_Object *sub_layout = elm_object_part_content_get(ad->view_layout, "elm.swallow.contents");
if (sub_layout)
{
if (select_all_layout) {
elm_object_part_text_set(select_all_layout, "elm.text", _(KeyStr_Select_All));
}
-
- Evas_Object *scroller = elm_object_part_content_get(sub_layout, "search_list");
- if (scroller) elm_genlist_realized_items_update(scroller);
- SETTING_TRACE("scroller:%p", scroller);
-
}
+ if (ad->reset_list)
+ elm_genlist_realized_items_update(ad->reset_list);
+
setting_reset_result_popup_update(ad);
break;
}
}
-void setting_reset_special_process(void *data)
-{
- SETTING_TRACE_BEGIN;
- ret_if(!data);
- SettingResetUG *ad = data;
-
- char speciliztion[MAX_SPECIALIZITION_LEN] = { 0, };
-
- int is_font_changed = FALSE;
- //if failed, is_font_changed keep FALSE
- vconf_get_bool(VCONFKEY_SETAPPL_FONT_CHANGED, &is_font_changed);
- if (is_font_changed)
- {
- if ('\0' != speciliztion[0]) g_strlcat(speciliztion, _(ADN_STR), MAX_SPECIALIZITION_LEN);
- g_strlcat(speciliztion, _(KeyStr_Font), MAX_SPECIALIZITION_LEN);
- }
- SETTING_TRACE("speciliztion:%s", speciliztion);
- if ('\0' != speciliztion[0])
- {
- g_strlcat(speciliztion, _(CLOSEING_STR), MAX_SPECIALIZITION_LEN);
-
- ad->ask_popup =
- setting_create_popup_with_btn(ad, ad->win_main_layout, NULL, speciliztion,
- __ask_popup_response_cb,
- 0, 1,
- _("IDS_COM_SK_OK"));
- }
-
-}
-
void setting_reset_result_popup_resp_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
ret_if(!data);
SettingResetUG *ad = data;
if (btn_type(obj) == POPUP_RESPONSE_OK) {
-
- setting_reset_special_process(ad);
}
if (ad->notify) {
evas_object_del(ad->notify);
ret_if(!data);
SettingResetUG *ad = data;
if (ad->notify) {
- if (0 != safeStrCmp("menustyle", elm_object_style_get(ad->notify)))
+ elm_object_part_text_set(ad->notify, "title,text", _(RESET_RESULT_STR));
+ Evas_Object *btn = elm_object_part_content_get(ad->notify, "button1");
+ if (btn)
{
- return;
+ elm_object_text_set(btn, _("IDS_COM_SK_OK"));
}
Evas_Object *genlist = elm_object_content_get(ad->notify);
- evas_object_hide(ad->notify);
- ad->old_notify = ad->notify;
-
- ad->notify = elm_popup_add(ad->win_get);
- elm_object_style_set(ad->notify,"menustyle");
- //elm_popup_title_label_set(ad->notify, RESET_RESULT_STR);
- elm_object_part_text_set(ad->notify, "title,text", RESET_RESULT_STR);
- evas_object_size_hint_weight_set(ad->notify,
- EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- //elm_popup_buttons_add(ad->notify,1,
- // _("IDS_COM_SK_OK"),
- // POPUP_RESPONSE_OK,NULL);
- Evas_Object *btn = setting_create_button(ad->notify, _("IDS_COM_SK_OK"), NULL, setting_reset_result_popup_resp_cb, ad);
- elm_object_part_content_set(ad->notify, "button1", btn);
-
- SETTING_TRACE("genlist:%p", genlist);
- if (genlist)
+ if(genlist)
{
elm_genlist_realized_items_update(genlist);
elm_object_content_set(ad->notify, genlist);
}
-
- //evas_object_smart_callback_add(ad->notify,
- // "response",
- // setting_reset_result_popup_resp_cb,
- // ad);
-
- evas_object_show(ad->notify);
+ //evas_object_show(ad->notify);
}
}