Fix the crash issue (TSAM-11668,11658) 03/113303/1 accepted/tizen/common/20170303.090630 accepted/tizen/mobile/20170302.121354 accepted/tizen/unified/20170309.031104 submit/tizen/20170220.233016 submit/tizen/20170302.014914 submit/tizen_unified/20170308.100403
authorLee Hyuk <hyuk0512.lee@samsung.com>
Fri, 16 Dec 2016 01:10:40 +0000 (10:10 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 7 Feb 2017 06:14:58 +0000 (15:14 +0900)
Change-Id: I24d228026c5fac0d14a88136f1da3cb5fd7079c9
Signed-off-by: Lee Hyuk <hyuk0512.lee@samsung.com>
src/bt-share-ui-view.c

index 36ba544..c380042 100644 (file)
@@ -267,8 +267,8 @@ static Eina_Bool __bt_back_button_cb(void *data, Elm_Object_Item *it)
        return EINA_FALSE;
 }
 
-static Evas_Object *__bt_tr_reusable_progress_icon_get(void *data, Evas_Object *obj,
-                                           const char *part, Evas_Object *old)
+static Evas_Object *__bt_tr_progress_icon_get(void *data, Evas_Object *obj,
+                                           const char *part)
 {
        FN_START;
 
@@ -285,37 +285,28 @@ static Evas_Object *__bt_tr_reusable_progress_icon_get(void *data, Evas_Object *
                char buff[BT_STR_PROGRESS_MAX_LEN] = { 0, };
                char *markup_text = NULL;
 
-               if (ad->progress_layout == NULL) {
-                       DBG("Creating new progress layout!!!");
-                       progress_layout = elm_layout_add(obj);
-                       elm_layout_file_set(progress_layout, EDJFILE, "popup_text_progressbar_view_layout");
-                       evas_object_size_hint_align_set(progress_layout, EVAS_HINT_FILL,
-                                                                               EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(progress_layout, EVAS_HINT_EXPAND,
-                                                                               EVAS_HINT_EXPAND);
-                       evas_object_show(progress_layout);
-                       ad->progress_layout = progress_layout;
-               } else {
-                       progress_layout = ad->progress_layout;
-               }
-
-               if (ad->progressbar == NULL) {
-                       DBG("Creating new progressbar!!!");
-                       progressbar = elm_progressbar_add(progress_layout);
-
-                       elm_progressbar_unit_format_set(progressbar, NULL);
-                       elm_progressbar_horizontal_set(progressbar, EINA_TRUE);
-                       evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL,
-                                       EVAS_HINT_FILL);
-                       evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
-                                       EVAS_HINT_EXPAND);
-                       elm_progressbar_pulse(progressbar, EINA_TRUE);
-
-                       evas_object_show(progressbar);
-                       ad->progressbar = progressbar;
-               } else {
-                       progressbar = ad->progressbar;
-               }
+               DBG("Creating new progress layout!!!");
+               progress_layout = elm_layout_add(obj);
+               elm_layout_file_set(progress_layout, EDJFILE, "popup_text_progressbar_view_layout");
+               evas_object_size_hint_align_set(progress_layout, EVAS_HINT_FILL,
+                               EVAS_HINT_FILL);
+               evas_object_size_hint_weight_set(progress_layout, EVAS_HINT_EXPAND,
+                               EVAS_HINT_EXPAND);
+               evas_object_show(progress_layout);
+
+               DBG("Creating new progressbar!!!");
+               progressbar = elm_progressbar_add(progress_layout);
+
+               elm_progressbar_unit_format_set(progressbar, NULL);
+               elm_progressbar_horizontal_set(progressbar, EINA_TRUE);
+               evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL,
+                               EVAS_HINT_FILL);
+               evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND,
+                               EVAS_HINT_EXPAND);
+               elm_progressbar_pulse(progressbar, EINA_TRUE);
+
+               evas_object_show(progressbar);
+               ad->progressbar = progressbar;
 
                markup_text = elm_entry_utf8_to_markup(transfer_info->filename);
                DBG_SECURE("Filename: %s", markup_text);
@@ -1321,7 +1312,7 @@ static Evas_Object *__bt_add_tr_data_genlist(Evas_Object *parent,
        if (ad->tr_progress_itc) {
                ad->tr_progress_itc->item_style = "full";
                ad->tr_progress_itc->func.text_get = NULL;
-               ad->tr_progress_itc->func.reusable_content_get = __bt_tr_reusable_progress_icon_get;
+               ad->tr_progress_itc->func.content_get = __bt_tr_progress_icon_get;
                ad->tr_progress_itc->func.state_get = NULL;
                ad->tr_progress_itc->func.del = NULL;
        }