[UI] Sub texts in the network selection view removed. 74/116474/1
authorMichal Skorupinski <m.skorupinsk@samsung.com>
Fri, 24 Feb 2017 13:40:02 +0000 (14:40 +0100)
committerMichal Skorupinski <m.skorupinsk@samsung.com>
Fri, 24 Feb 2017 13:40:02 +0000 (14:40 +0100)
Change-Id: Ic7def2c29b88eba8a56b57cc2d3c6af8e6a700a8
Signed-off-by: Michal Skorupinski <m.skorupinsk@samsung.com>
setting-network/src/setting-network-select-network.c

index 528bbea80a6e81aefaeea22ec3db0fb11bd09751..942e3af9dc3c0603eef68799038223543f50c5e6 100644 (file)
@@ -179,8 +179,6 @@ void setting_network_update_sel_network(void *data)
                if (TAPI_NETWORK_SELECTIONMODE_AUTOMATIC == s_info.sel_net) {
                        char *sub_text = setting_customize_text(_(s_info.sel_network), 0, BLUE_COLOR, NULL);
                        SETTING_TRACE("sub_text:%s", sub_text);
-                       G_FREE(s_info.data_auto_network_item->sub_desc);
-                       s_info.data_auto_network_item->sub_desc = (char *)g_strdup(sub_text);
                        elm_object_item_data_set(s_info.data_auto_network_item->item, s_info.data_auto_network_item);
                        elm_genlist_item_update(s_info.data_auto_network_item->item);
                        elm_genlist_item_fields_update(s_info.data_auto_network_item->item, "*", ELM_GENLIST_ITEM_FIELD_TEXT);
@@ -203,14 +201,7 @@ void setting_network_update_sel_network(void *data)
                                        _(s_info.sel_network));
                }
 
-               /*SETTING_TRACE("sel_network_desc:%s", sel_network_desc); */
-
-               G_FREE(s_info.data_sel_net->sub_desc);
-               s_info.data_sel_net->sub_desc = (char *)g_strdup(
-                               _(sel_network_desc));
-
-               elm_object_item_data_set(s_info.data_sel_net->item,
-                               s_info.data_sel_net);
+               elm_object_item_data_set(s_info.data_sel_net->item, s_info.data_sel_net);
                elm_genlist_item_update(s_info.data_sel_net->item);
        }
        SETTING_TRACE_END;
@@ -351,9 +342,6 @@ void _register_network_automaticaly(Setting_GenGroupItem_Data *list_item)
                SETTING_TRACE("Registering popup failed");
 
        if (s_info.data_auto_network_item) {
-               char *sub_text = setting_customize_text("....", 0, BLUE_COLOR, NULL);
-               s_info.data_auto_network_item->sub_desc = (char *) g_strdup(sub_text);
-               FREE(sub_text);
                elm_object_item_data_set(s_info.data_auto_network_item->item, s_info.data_auto_network_item);
                elm_genlist_item_update(s_info.data_auto_network_item->item);
        }
@@ -579,14 +567,7 @@ static Eina_Bool _search_net_on_timer(void *data)
                /*elm_genlist_item_item_class_update(
                 * s_info.data_auto_network_item->item, &(itc_2text_1icon_7)); */
 
-               char *sub_text = setting_customize_text(
-                               s_info.data_auto_network_item->sub_desc, 0,
-                               GRAY_COLOR, NULL);
-               s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                               sub_text);
-               FREE(sub_text);
-               elm_object_item_data_set(s_info.data_auto_network_item->item,
-                               s_info.data_auto_network_item);
+               elm_object_item_data_set(s_info.data_auto_network_item->item, s_info.data_auto_network_item);
                elm_genlist_item_update(s_info.data_auto_network_item->item);
        }
 
@@ -734,10 +715,6 @@ static void _update_current_network_name(void)
                return;
        }
 
-       if (s_info.data_auto_network_item->sub_desc)
-               free(s_info.data_auto_network_item->sub_desc);
-
-       s_info.data_auto_network_item->sub_desc = setting_customize_text(_(network_name), 0, BLUE_COLOR, NULL);
        elm_genlist_item_update(s_info.data_auto_network_item->item);
 
        dlog_print(DLOG_DEBUG, LOG_TAG, "[%s:%d] <MS> Network name: %s", __FILE__, __LINE__, network_name);
@@ -1034,23 +1011,6 @@ static void _network_main_gl_mouse_u(void *data, Evas *e, Evas_Object *obj, void
                                && ev->output.y <= (y + h)) {
                        return;
                }
-               if (s_info.data_auto_network_item->chk_status) {
-                       char *sub_text = setting_customize_text(
-                                       s_info.data_auto_network_item->sub_desc, 0,
-                                       BLUE_COLOR, NULL);
-                       FREE(s_info.data_auto_network_item->sub_desc);
-                       s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                                       sub_text);
-                       FREE(sub_text);
-               } else {
-                       char *sub_text = setting_customize_text(
-                                       s_info.data_auto_network_item->sub_desc, 0,
-                                       GRAY_COLOR, NULL);
-                       FREE(s_info.data_auto_network_item->sub_desc);
-                       s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                                       sub_text);
-                       FREE(sub_text);
-               }
 
                elm_genlist_item_fields_update(s_info.data_auto_network_item->item,
                                "*", ELM_GENLIST_ITEM_FIELD_TEXT);
@@ -1088,13 +1048,6 @@ static void _network_main_gl_mouse_down(void *data, Evas *e, Evas_Object *obj, v
                        return;
                }
 
-               char *sub_text = setting_customize_text(
-                               s_info.data_auto_network_item->sub_desc, 0,
-                               WHITE_COLOR, NULL);
-               FREE(s_info.data_auto_network_item->sub_desc);
-               s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                               sub_text);
-               FREE(sub_text);
                elm_genlist_item_fields_update(s_info.data_auto_network_item->item, "*", ELM_GENLIST_ITEM_FIELD_TEXT);
        }
 
@@ -1116,25 +1069,6 @@ static void _network_main_gl_mouse_move(void *data, Evas *e, Evas_Object *obj, v
        if (x_offset <= MIN_MOVE_DISTANCE && y_offset <= MIN_MOVE_DISTANCE)
                return;
 
-       /*SETTING_TRACE("xxxxxxxxxx"); */
-       if (s_info.data_auto_network_item->chk_status) {
-               char *sub_text = setting_customize_text(
-                               s_info.data_auto_network_item->sub_desc, 0,
-                               BLUE_COLOR, NULL);
-               FREE(s_info.data_auto_network_item->sub_desc);
-               s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                               sub_text);
-               FREE(sub_text);
-       } else {
-               char *sub_text = setting_customize_text(
-                               s_info.data_auto_network_item->sub_desc, 0,
-                               GRAY_COLOR, NULL);
-               FREE(s_info.data_auto_network_item->sub_desc);
-               s_info.data_auto_network_item->sub_desc = (char *)g_strdup(
-                               sub_text);
-               FREE(sub_text);
-       }
-
        elm_genlist_item_fields_update(s_info.data_auto_network_item->item, "*", ELM_GENLIST_ITEM_FIELD_TEXT);
 
        SETTING_TRACE_END;
@@ -1159,15 +1093,12 @@ static void _sim_selected_cb(void *data, Evas_Object *obj, void *event_info)
 Setting_GenGroupItem_Data *_add_item_to_list(char *title, setting_call_back_func on_click_cb)
 {
        SETTING_TRACE_BEGIN;
-       char *sub_text = setting_customize_text(_(s_info.sel_network), 0, BLUE_COLOR, NULL);
-
        Setting_GenGroupItem_Data *item = setting_create_Gendial_field_def(
                        s_info.genlist_sel_network, &itc_1text_1icon,
                        on_click_cb, NULL, SWALLOW_Type_INVALID,
-                       NULL, NULL, FALSE, title, sub_text,
+                       NULL, NULL, FALSE, title, NULL,
                        _select_network_chk_changed);
 
-       FREE(sub_text);
        setting_retvm_if(!item, NULL, "Failed to calloc memory");
 
        SETTING_TRACE_END;