static int viewer_manager_header_create(Evas_Object* genlist) { __COMMON_FUNC_ENTER__; Evas_Object *toggle_btn = NULL; manager_object->header_text = g_strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi)); header_itc_text.item_style = "dialogue/1text.1icon"; header_itc_text.func.text_get = _gl_header_text_get; header_itc_text.func.content_get = _gl_header_content_get; header_itc_text.func.state_get = NULL; header_itc_text.func.del = _gl_header_del; common_utils_add_dialogue_separator(genlist, "dialogue/separator"); toggle_btn = elm_check_add(genlist); elm_object_style_set(toggle_btn, "on&off"); evas_object_propagate_events_set(toggle_btn, EINA_TRUE); elm_check_state_set(toggle_btn, EINA_FALSE); evas_object_show(toggle_btn); evas_object_ref(toggle_btn); assertm_if(NULL != manager_object->item_header, "ERROR!!"); manager_object->item_header = elm_genlist_item_append(genlist, &header_itc_text, toggle_btn, NULL, ELM_GENLIST_ITEM_NONE, _gl_header_sel_cb, NULL); assertm_if(NULL == manager_object->item_header, "NULL!!"); __COMMON_FUNC_EXIT__; return TRUE; }
int viewer_manager_item_radio_mode_set(void* object, Elm_Object_Item* item, VIEWER_ITEM_RADIO_MODES mode) { __COMMON_FUNC_ENTER__; assertm_if(NULL == manager_object, "manager_object is NULL!!"); assertm_if(NULL == item, "item is NULL!!"); if (NULL == item) { INFO_LOG(COMMON_NAME_ERR, "item is NULL"); return FALSE; } ug_genlist_data_t* gdata = (ug_genlist_data_t *) elm_object_item_data_get(item); if (NULL == gdata || NULL == gdata->device_info) { INFO_LOG(COMMON_NAME_ERR, "gdata or device_info is NULL"); return FALSE; } if (gdata->radio_mode == mode) { INFO_LOG(UG_NAME_NORMAL, "[%s] is already in requested state", gdata->device_info->ssid); return FALSE; } INFO_LOG(UG_NAME_NORMAL, "[%s] AP Item State Transition from [%d] --> [%d]", gdata->device_info->ssid, gdata->radio_mode, mode); gdata->radio_mode = mode; if (gdata->device_info->ap_status_txt) { g_free(gdata->device_info->ap_status_txt); gdata->device_info->ap_status_txt = viewer_manager_get_device_status_txt(gdata->device_info, mode); } elm_genlist_item_update(item); __COMMON_FUNC_EXIT__; return TRUE; }
Elm_Object_Item* common_utils_add_dialogue_separator(Evas_Object* genlist, const char *separator_style) { assertm_if(NULL == genlist, "NULL!!"); static Elm_Genlist_Item_Class *separator_itc; separator_itc = elm_genlist_item_class_new(); separator_itc->item_style = separator_style; separator_itc->func.text_get = NULL; separator_itc->func.content_get = NULL; separator_itc->func.state_get = NULL; separator_itc->func.del = __common_utils_separator_del; Elm_Object_Item* sep = elm_genlist_item_append( genlist, separator_itc, separator_itc, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL); assertm_if(NULL == sep, "NULL!!"); elm_genlist_item_select_mode_set(sep, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); return sep; }
static char *_gl_text_get(void *data, Evas_Object *obj, const char *part) { char *ret = NULL; assertm_if(NULL == data, "data param is NULL!!"); assertm_if(NULL == obj, "obj param is NULL!!"); assertm_if(NULL == part, "part param is NULL!!"); devpkr_gl_data_t *gdata = (devpkr_gl_data_t *) data; retvm_if(NULL == gdata, NULL); if (!strncmp(part, "elm.text.main.left.top", strlen(part))) { ret = gdata->dev_info->ssid; if (ret == NULL) { ERROR_LOG(SP_NAME_NORMAL, "ssid name is NULL!!"); } } else if (!strncmp(part, "elm.text.sub.left.bottom", strlen(part))) { if (ITEM_CONNECTION_MODE_CONNECTING == gdata->connection_mode) { ret = sc(PACKAGE, I18N_TYPE_Connecting); } else if (ITEM_CONNECTION_MODE_CONFIGURATION == gdata->connection_mode) { ret = sc(PACKAGE, I18N_TYPE_Obtaining_IP_addr); } else { ret = gdata->dev_info->ap_status_txt; } if (ret == NULL) { ERROR_LOG(SP_NAME_NORMAL, "ap_status_txt is NULL!!"); } } return g_strdup(ret); }
static Evas_Object *_create_genlist(Evas_Object* parent) { __COMMON_FUNC_ENTER__; assertm_if(NULL == parent, "parent is NULL!!"); list = elm_genlist_add(parent); assertm_if(NULL == list, "list allocation fail!!"); elm_genlist_fx_mode_set(list, EINA_FALSE); elm_genlist_mode_set(list, ELM_LIST_COMPRESS); elm_genlist_homogeneous_set(list, EINA_TRUE); evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(list, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_smart_callback_add(list, "highlighted", _gl_highlighted, NULL); evas_object_smart_callback_add(list, "unhighlighted", _gl_unhighlighted, NULL); itc.item_style = "2line.top"; itc.func.text_get = _gl_text_get; itc.func.content_get = _gl_content_get; itc.func.state_get = NULL; itc.func.del = _gl_list_del; __COMMON_FUNC_EXIT__; return list; }
static Evas_Object *_gl_bottom_content_get(void *data, Evas_Object *obj, const char *part) { __COMMON_FUNC_ENTER__; if (manager_object == NULL || obj == NULL) return NULL; int ret = -1; Evas_Object *toggle_btn = elm_check_add(obj); assertm_if(NULL == toggle_btn, "NULL!!"); elm_object_style_set(toggle_btn, "on&off"); evas_object_propagate_events_set(toggle_btn, EINA_TRUE); ret = wifi_setting_value_get(VCONFKEY_WIFI_ENABLE_QS); switch (ret) { case 1: elm_check_state_set(toggle_btn, EINA_TRUE); break; case 0: elm_check_state_set(toggle_btn, EINA_FALSE); break; default: assertm_if(TRUE, "Setting fail!!"); break; } __COMMON_FUNC_EXIT__; return toggle_btn; }
static void __gl_sel(void *data, Evas_Object *obj, void *event_info) { __COMMON_FUNC_ENTER__; assertm_if(NULL == data, "data is NULL!!"); assertm_if(NULL == obj, "obj is NULL!!"); assertm_if(NULL == event_info, "event_info is NULL!!"); Elm_Object_Item *item = (Elm_Object_Item *)event_info; ITEM_CONNECTION_MODES state = view_main_state_get(); devpkr_gl_data_t *gdata = (devpkr_gl_data_t *)data; switch (state) { case ITEM_CONNECTION_MODE_OFF: case ITEM_CONNECTION_MODE_CONNECTING: view_main_wifi_connect(gdata); break; default: break; } elm_genlist_item_selected_set(item, EINA_FALSE); __COMMON_FUNC_EXIT__; }
static char* _gl_text_title_get(void *data, Evas_Object *obj, const char *part) { assertm_if(NULL == obj, "NULL!!"); assertm_if(NULL == part, "NULL!!"); return (char*) g_strdup(sc(PACKAGE, I18N_TYPE_WiFi_network)); }
Evas_Object* viewer_list_create(Evas_Object *win) { __COMMON_FUNC_ENTER__; assertm_if(NULL == win, "NULL!!"); assertm_if(NULL != viewer_list, "Err!!"); viewer_list = elm_genlist_add(win); elm_object_style_set(viewer_list, "dialogue"); assertm_if(NULL == viewer_list, "NULL!!"); elm_genlist_mode_set(viewer_list, ELM_LIST_LIMIT); evas_object_size_hint_weight_set(viewer_list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(viewer_list, EVAS_HINT_FILL, EVAS_HINT_FILL); container = NULL; container = g_slist_alloc(); assertm_if(NULL == container, "NULL!!"); itc.item_style = "dialogue/2text.2icon.3.tb"; itc.func.text_get = _gl_listview_text_get; itc.func.content_get = _gl_listview_content_get; itc.func.state_get = NULL; itc.func.del = _gl_listview_del; __COMMON_FUNC_EXIT__; return viewer_list; }
int viewer_list_title_item_set(Elm_Object_Item *target) { if (viewer_list_item_size_get() == 0) { // To use multiline textblock/entry/editfield in genlist, set height_for_width mode // then the item's height is calculated while the item's width fits to genlist width. elm_genlist_mode_set(viewer_list, ELM_LIST_COMPRESS); grouptitle_itc.item_style = "dialogue/title"; grouptitle_itc.func.text_get = _gl_text_title_get; grouptitle_itc.func.content_get = _gl_content_title_get; grouptitle_itc.func.state_get = NULL; grouptitle_itc.func.del = NULL; assertm_if(NULL != grouptitle, "Err!!"); grouptitle = elm_genlist_item_insert_after(viewer_list, &grouptitle_itc, NULL, NULL, target, ELM_GENLIST_ITEM_NONE, NULL, NULL); assertm_if(NULL == grouptitle, "NULL!!"); elm_genlist_item_select_mode_set(grouptitle, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); return TRUE; } else { return FALSE; } }
static int viewer_manager_hidden_button_create(Evas_Object* genlist) { __COMMON_FUNC_ENTER__; if(NULL != manager_object->item_sep_above_hidden_button || NULL != manager_object->item_sep_below_hidden_button || NULL != manager_object->item_hidden_btn) { __COMMON_FUNC_EXIT__; return FALSE; } assertm_if(NULL == genlist, "NULL!!"); hidden_button_itc.item_style = "dialogue/bg/1icon"; hidden_button_itc.func.text_get = NULL; hidden_button_itc.func.content_get = _gl_hidden_btn_content_get; hidden_button_itc.func.state_get = NULL; hidden_button_itc.func.del = NULL; manager_object->item_sep_above_hidden_button = common_utils_add_dialogue_separator(genlist, "dialogue/separator/20"); manager_object->item_hidden_btn = elm_genlist_item_append(genlist, &hidden_button_itc, NULL, NULL, ELM_GENLIST_ITEM_NONE, _hidden_button_callback, NULL); assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!"); common_utils_add_dialogue_separator(genlist, "dialogue/separator/end"); __COMMON_FUNC_EXIT__; return TRUE; }
int viewer_manager_header_mode_set(HEADER_MODES mode) { __COMMON_FUNC_ENTER__; assertm_if(NULL == manager_object, "NULL!!"); assertm_if(NULL == manager_object->item_header, "NULL!!"); assertm_if(HEADER_MODE_OFF > mode || HEADER_MODE_MAX <= mode, "Err!!"); if (manager_object->header_mode == mode) { return FALSE; } DEBUG_LOG(UG_NAME_NORMAL, "Header mode changing from %d --> %d", manager_object->header_mode, mode); manager_object->header_mode = mode; if (manager_object->header_text) { g_free(manager_object->header_text); } switch (mode) { case HEADER_MODE_OFF: case HEADER_MODE_ON: case HEADER_MODE_CONNECTED: viewer_manager_hidden_disable_set(FALSE); viewer_manager_scan_button_set(EINA_TRUE); manager_object->header_text = g_strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi)); break; case HEADER_MODE_ACTIVATING: viewer_manager_hidden_disable_set(TRUE); manager_object->header_text = g_strdup(sc(PACKAGE, I18N_TYPE_Activating_WiFi)); break; case HEADER_MODE_DEACTIVATING: viewer_manager_hidden_disable_set(TRUE); manager_object->header_text = g_strdup(sc(PACKAGE, I18N_TYPE_Deactivating)); break; case HEADER_MODE_CONNECTING: case HEADER_MODE_DISCONNECTING: case HEADER_MODE_CANCEL_CONNECTING: case HEADER_MODE_SEARCHING: viewer_manager_hidden_disable_set(TRUE); manager_object->header_text = g_strdup(sc(PACKAGE, I18N_TYPE_Wi_Fi)); break; default: assertm_if(TRUE, "Err!!"); break; } elm_genlist_item_update(manager_object->item_header); viewer_list_title_item_update(); if (ug_app_state->ug_type == UG_VIEW_SETUP_WIZARD) { viewer_manager_setup_wizard_button_controller(mode); } __COMMON_FUNC_EXIT__; return TRUE; }
Elm_Object_Item* viewer_list_item_insert_after(Evas_Object* list, void* list_data, Elm_Object_Item *after, Evas_Smart_Cb callback_func, void* callback_data) { Elm_Object_Item* ret = NULL; assertm_if(NULL == callback_data, "NULL!!"); if (!list || !list_data) { assertm_if(NULL == list, "NULL!!"); assertm_if(NULL == list_data, "NULL!!"); return NULL; } ug_genlist_data_t* gdata = NULL; gdata = (ug_genlist_data_t*) g_malloc0(sizeof(ug_genlist_data_t)); assertm_if(NULL == gdata, "NULL!!"); gdata->device_info = (wifi_device_info_t *)list_data; gdata->radio_mode = VIEWER_ITEM_RADIO_MODE_OFF; // DEBUG_LOG(UG_NAME_NORMAL, "ssid[%s] image[%s]", gdata->device_info->ssid, gdata->device_info->ap_image_path); if (!after) { /* If the after item is NULL then insert it as first item */ // DEBUG_LOG(UG_NAME_NORMAL, "first added AP item!"); after = grouptitle; } ret = elm_genlist_item_insert_after( list, /*obj*/ &itc,/*itc*/ gdata,/*data*/ NULL,/*parent*/ after, /*after than*/ ELM_GENLIST_ITEM_NONE, /*flags*/ callback_func,/*func*/ callback_data);/*func_data*/ if (!ret) { assertm_if(NULL == ret, "NULL!!"); g_free(gdata->device_info->ap_image_path); g_free(gdata->device_info->ap_status_txt); g_free(gdata->device_info->ssid); g_free(gdata->device_info); g_free(gdata); return NULL; } container = g_slist_append(container, ret); DEBUG_LOG(UG_NAME_NORMAL, "* item add complete ssid:[%s] size:[%d]", gdata->device_info->ssid, viewer_list_item_size_get()); elm_genlist_item_update(ret); return ret; }
Elm_Object_Item* viewer_list_item_next_get(const Elm_Object_Item* current) { assertm_if(NULL == current, "NULL!!"); Elm_Object_Item* ret=NULL; ret = elm_genlist_item_next_get(current); assertm_if(NULL == ret, "NULL!!"); return ret; }
int viewer_list_item_clear() { __COMMON_FUNC_ENTER__; if (viewer_list == NULL) { return TRUE; } int size = viewer_list_item_size_get(); if(0 == size){ DEBUG_LOG(UG_NAME_NORMAL, "header only"); __COMMON_FUNC_EXIT__; return TRUE; } int index = 0; DEBUG_LOG(UG_NAME_NORMAL, "list item size [%d]", size); /* remove AP items (size) */ Elm_Object_Item* det = NULL; for (index = size-1; index >= 0; index--) { det = viewer_list_item_at_index(index); assertm_if(NULL == det, "NULL!!"); viewer_list_item_del(det); } __COMMON_FUNC_EXIT__; return TRUE; }
HEADER_MODES viewer_manager_header_mode_get(void){ __COMMON_FUNC_ENTER__; assertm_if(HEADER_MODE_OFF > manager_object->header_mode || HEADER_MODE_MAX <= manager_object->header_mode, "Err!"); __COMMON_FUNC_EXIT__; return manager_object->header_mode; }
static void viewer_manager_genlist_normal_callback(void* data, Evas_Object* obj, void* event_info) { __COMMON_FUNC_ENTER__; assertm_if(NULL == manager_object, "manager_object is NULL!!"); assertm_if(NULL == event_info, "event_info is NULL!!"); assertm_if(NULL == data, "data is NULL!!"); assertm_if(NULL == obj, "obj is NULL!!"); wifi_device_info_t *device_info = (wifi_device_info_t *) data; DEBUG_LOG(UG_NAME_NORMAL, "event_info:[%s]", (char*) elm_object_style_get(obj)); radio_button_cb(device_info, obj, event_info); elm_genlist_item_selected_set((Elm_Object_Item *)event_info, FALSE); __COMMON_FUNC_EXIT__; return; }
static Evas_Object* __common_utils_create_conformant(Evas_Object* parent) { assertm_if(NULL == parent, "NULL!!"); Evas_Object* conform = NULL; elm_win_conformant_set(parent, TRUE); conform = elm_conformant_add(parent); assertm_if(NULL == conform, "NULL!!"); elm_object_style_set(conform, "internal_layout"); evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); evas_object_size_hint_align_set(conform, EVAS_HINT_FILL, EVAS_HINT_FILL); evas_object_show(conform); return conform; }
int viewer_list_item_selected_set(Elm_Object_Item* item, int state) { __COMMON_FUNC_ENTER__; assertm_if(NULL == item, "NULL!!"); elm_genlist_item_selected_set(item, state); __COMMON_FUNC_EXIT__; return TRUE; }
int viewer_list_item_enable_all(void) { __COMMON_FUNC_ENTER__; assertm_if(NULL == container, "NULL!!"); int count = g_slist_length(container); int i = 1; for(;i<count;i++){ Elm_Object_Item* det = NULL; det = (Elm_Object_Item*) g_slist_nth_data(container, i); assertm_if(NULL == det, "NULL!!"); elm_object_item_disabled_set(det, EINA_FALSE); } __COMMON_FUNC_EXIT__; return TRUE; }
Elm_Object_Item* viewer_list_item_first_get(Evas_Object* list) { __COMMON_FUNC_ENTER__; Elm_Object_Item* ret=NULL; ret = (Elm_Object_Item*) g_slist_nth_data(container, 1); assertm_if(NULL == ret, "NULL!!"); __COMMON_FUNC_EXIT__; return ret; }
int viewer_manager_hidden_disable_set(int mode) { __COMMON_FUNC_ENTER__; assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!"); elm_object_item_disabled_set(manager_object->item_hidden_btn, mode); elm_genlist_item_update(manager_object->item_hidden_btn); __COMMON_FUNC_EXIT__; return TRUE; }
Eina_Bool viewer_manager_show(VIEWER_WINSETS winset) { __COMMON_FUNC_ENTER__; assertm_if(NULL == manager_object, "NULL!!"); switch (winset) { case VIEWER_WINSET_SEARCHING: viewer_manager_scan_button_set(EINA_FALSE); viewer_list_item_disable_all(); break; case VIEWER_WINSET_SUB_CONTENTS: assertm_if(NULL == manager_object->list, "NULL!!"); viewer_list_title_item_set(manager_object->item_bottom_helper_txt); viewer_manager_hidden_button_create(manager_object->list); break; } __COMMON_FUNC_EXIT__; return EINA_TRUE; }
Eina_Bool viewer_manager_hide(VIEWER_WINSETS winset) { __COMMON_FUNC_ENTER__; switch (winset) { case VIEWER_WINSET_SEARCHING: /* searching view */ viewer_manager_scan_button_set(EINA_TRUE); viewer_list_item_enable_all(); break; case VIEWER_WINSET_SUB_CONTENTS: /* hidden AP and WPS PBC */ if (ug_app_state->passpopup) { common_pswd_popup_destroy(ug_app_state->passpopup); ug_app_state->passpopup = NULL; } if (ug_app_state->eap_view) { eap_view_close(ug_app_state->eap_view); ug_app_state->eap_view = NULL; } viewer_list_title_item_del(); assertm_if(NULL == manager_object->item_sep_above_hidden_button, "NULL!!"); assertm_if(NULL == manager_object->item_sep_below_hidden_button, "NULL!!"); assertm_if(NULL == manager_object->item_hidden_btn, "NULL!!"); elm_object_item_del(manager_object->item_sep_above_hidden_button); elm_object_item_del(manager_object->item_sep_below_hidden_button); elm_object_item_del(manager_object->item_hidden_btn); manager_object->item_sep_above_hidden_button = NULL; manager_object->item_sep_below_hidden_button = NULL; manager_object->item_hidden_btn = NULL; break; default: /* Err */ assertm_if(TRUE, "Err!!"); break; } __COMMON_FUNC_EXIT__; return EINA_TRUE; }
Elm_Object_Item* viewer_list_item_at_index(int index) { __COMMON_FUNC_ENTER__; int size = viewer_list_item_size_get(); assertm_if(0 > size, "query error! (i == zero base)"); Elm_Object_Item *gli = NULL; gli = (Elm_Object_Item*) g_slist_nth_data(container, index+1); assertm_if(NULL == gli, "NULL!!"); if (gli) { ug_genlist_data_t* gdata = NULL; gdata = elm_object_item_data_get(gli); assertm_if(NULL == gdata, "NULL!!"); if (!gdata) gli = NULL; } __COMMON_FUNC_EXIT__; return gli; }
static int viewer_manager_bottom_create(Evas_Object* genlist) { __COMMON_FUNC_ENTER__; assertm_if(NULL == genlist, "NULL!!"); bottom_itc.item_style = "grouptitle.dialogue.seperator"; bottom_itc.func.text_get = NULL; bottom_itc.func.content_get = NULL; bottom_itc.func.state_get = NULL; bottom_itc.func.del = NULL; bottom_itc_text.item_style = "dialogue/1text.1icon"; bottom_itc_text.func.text_get = _gl_bottom_text_get; bottom_itc_text.func.content_get = _gl_bottom_content_get; bottom_itc_text.func.state_get = NULL; bottom_itc_text.func.del = NULL; bottom_itc_helper_text.item_style = "multiline/1text"; bottom_itc_helper_text.func.text_get = _gl_bottom_helper_text_get; bottom_itc_helper_text.func.content_get = NULL; bottom_itc_helper_text.func.state_get = NULL; bottom_itc_helper_text.func.del = NULL; Elm_Object_Item* dialoguegroup = elm_genlist_item_append(genlist, &bottom_itc, NULL, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL); assertm_if(NULL == dialoguegroup, "NULL!!"); elm_genlist_item_select_mode_set(dialoguegroup, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); manager_object->item_bottom = elm_genlist_item_append(genlist, &bottom_itc_text, NULL, NULL, ELM_GENLIST_ITEM_NONE, _gl_bottom_sel_cb, NULL); assertm_if(NULL == manager_object->item_bottom, "NULL!!"); elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS); manager_object->item_bottom_helper_txt = elm_genlist_item_append(genlist, &bottom_itc_helper_text, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); elm_genlist_item_select_mode_set(manager_object->item_bottom_helper_txt, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); __COMMON_FUNC_EXIT__; return TRUE; }
int viewer_list_item_size_get() { __COMMON_FUNC_ENTER__; assertm_if(NULL == container, "NULL!!"); int ret = g_slist_length(container); ret = ret - 1; if (ret < 0) { ret = 0; } __COMMON_FUNC_EXIT__; return ret; }
static char *_gl_bottom_text_get(void *data, Evas_Object *obj, const char *part) { char* det = NULL; __COMMON_FUNC_ENTER__; if (!strncmp(part, "elm.text", strlen(part))) { det = g_strdup(sc(PACKAGE, I18N_TYPE_Network_notification)); assertm_if(NULL == det, "NULL!!"); } __COMMON_FUNC_EXIT__; return det; }
static Evas_Object *_gl_listview_content_get(void *data, Evas_Object *obj, const char *part) { assertm_if(NULL == obj, "NULL!!"); assertm_if(NULL == data, "NULL!!"); assertm_if(NULL == part, "NULL!!"); ug_genlist_data_t* gdata = (ug_genlist_data_t*) data; Evas_Object* icon = NULL; if (gdata->device_info->ap_image_path == NULL) { /* if there is no ap_image_path (NO AP Found situation) */ DEBUG_LOG(UG_NAME_ERR, "Fatal: Image path is NULL"); } else if (!strncmp(part, "elm.icon.1", strlen(part))) { /* for strength */ icon = elm_icon_add(obj); assertm_if(NULL == icon, "NULL!!"); elm_icon_file_set(icon, gdata->device_info->ap_image_path, NULL); } else if (!strncmp(part, "elm.icon.2", strlen(part))) { if (VIEWER_ITEM_RADIO_MODE_CONNECTING == gdata->radio_mode) { icon = elm_progressbar_add(obj); elm_object_style_set(icon, "list_process"); evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, 0.5); evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_progressbar_pulse(icon, TRUE); } else { icon = elm_button_add(obj); assertm_if(NULL == icon, "NULL!!"); elm_object_style_set(icon, "reveal"); evas_object_smart_callback_add(icon, "clicked", (Evas_Smart_Cb)list_select_cb, gdata->device_info); evas_object_propagate_events_set(icon, EINA_FALSE); } } else { DEBUG_LOG(UG_NAME_NORMAL, "Invalid part name [%s]", part); } return icon; }
int viewer_list_destroy(void) { __COMMON_FUNC_ENTER__; assertm_if(NULL == viewer_list, "NULL!!"); viewer_list_item_clear(); g_slist_free(container); container = NULL; evas_object_del(viewer_list); viewer_list = NULL; __COMMON_FUNC_EXIT__; return TRUE; }