Fix runtime error when USB storage is connected. 21/37721/1
authorKim Tae Soo <taesoo46.kim@samsung.com>
Fri, 3 Apr 2015 05:01:06 +0000 (14:01 +0900)
committerKim Tae Soo <taesoo46.kim@samsung.com>
Fri, 3 Apr 2015 05:01:06 +0000 (14:01 +0900)
Change-Id: Id000f68b04c9b47d6a0aa99f0cb075141794c3eb
Signed-off-by: Kim Tae Soo <taesoo46.kim@samsung.com>
src/views/base-view.cpp

index 2ce9eb5..c099aa6 100644 (file)
@@ -436,29 +436,33 @@ void CMusicBaseView::m_OnShowLayoutIdler(void)
 
 Evas_Object *CMusicBaseView::m_CreateLoadingPopup(void)
 {
-       Evas_Object *popup = NULL, *label = NULL, *icon = NULL;
+       Evas_Object *popup = NULL, *label = NULL, *icon = NULL, *box = NULL;
        double scale;
        char buf[MAX_LENGTH];
 
+       scale = elm_config_scale_get();
+
        popup = elm_popup_add(m->base);
        if (!popup)
                return NULL;
 
-       elm_object_style_set(popup, MUSIC_STYLE_LOADING_POPUP);
        elm_popup_orient_set(popup, ELM_POPUP_ORIENT_TOP_RIGHT);
        elm_popup_timeout_set(popup, MAX_SHOW_TIME);
        evas_object_show(popup);
 
+       box = CCommonUI::AddBox(popup);
+       if (!box) {
+               evas_object_del(popup);
+               return NULL;
+       }
+
        label = elm_label_add(popup);
        if (!label) {
                evas_object_del(popup);
                return NULL;
        }
 
-       elm_object_style_set(label, MUSIC_STYLE_LOADING_LABEL);
        elm_object_text_set(label, _(MUSIC_TEXT_LOADING));
-       elm_object_content_set(popup, label);
-       scale = elm_config_scale_get();
 
        icon = elm_icon_add(popup);
        if (!icon) {
@@ -468,10 +472,19 @@ Evas_Object *CMusicBaseView::m_CreateLoadingPopup(void)
 
        snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, MUSIC_IMAGE_LOADING);
        elm_image_file_set(icon, buf, NULL);
-       elm_image_animated_set(icon, EINA_TRUE);
-       elm_image_animated_play_set(icon, EINA_TRUE);
        evas_object_size_hint_min_set(icon, 48 * scale, 48 * scale);
-       elm_object_part_content_set(popup, MUSIC_SWALLOW_ICON, icon);
+
+       elm_box_horizontal_set(box, EINA_TRUE);
+       elm_box_padding_set(box,
+               MUSIC_EDIT_BTNS_PADDING * elm_config_scale_get(), 0);
+
+       elm_box_pack_end(box, icon);
+       evas_object_show(icon);
+
+       elm_box_pack_end(box, label);
+       evas_object_show(label);
+
+       elm_object_content_set(popup, box);
 
        m->transit = elm_transit_add();
        if (!m->transit) {