diff options
Diffstat (limited to 'lib/common/ct-list-setting.c')
-rwxr-xr-x | lib/common/ct-list-setting.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lib/common/ct-list-setting.c b/lib/common/ct-list-setting.c index 2399a06..298544d 100755 --- a/lib/common/ct-list-setting.c +++ b/lib/common/ct-list-setting.c @@ -26,11 +26,12 @@ #include "contacts.h" #include "ct-common.h" -Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info) +Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_info, const char *title) { + char buf[CT_TEXT_MAX_LEN]; Evas_Object *popup; Evas_Object *layout; - Evas_Object *title; + Evas_Object *label; Evas_Object *progressbar; popup = elm_popup_add(parent); @@ -42,20 +43,21 @@ Evas_Object* ctui_progressbar_popup(Evas_Object *parent, ct_progress_info *p_inf evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); p_info->layout = layout; - title = elm_label_add(layout); - c_retvm_if(NULL == title, NULL, "elm_label_add() return NULL"); - elm_object_style_set(title, "popup_description/default"); - elm_label_line_wrap_set(title, EINA_TRUE); - evas_object_size_hint_weight_set(title, EVAS_HINT_EXPAND, 0.0); - evas_object_size_hint_align_set(title, EVAS_HINT_FILL, EVAS_HINT_FILL); - evas_object_show(title); - p_info->label = title; + label = elm_label_add(layout); + c_retvm_if(NULL == label, NULL, "elm_label_add() return NULL"); + snprintf(buf, sizeof(buf), "<align=middle>%s</>", title); + elm_object_text_set(label, buf); + elm_object_style_set(label, "popup_description/default"); + elm_label_line_wrap_set(label, EINA_TRUE); + evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(label); progressbar = elm_progressbar_add(layout); c_retvm_if(NULL == progressbar, NULL, "elm_progressbar_add() return NULL"); p_info->progressbar= progressbar; - elm_object_part_content_set(layout, "elm.swallow.content", title); + elm_object_part_content_set(layout, "elm.swallow.content", label); elm_object_part_content_set(layout, "elm.swallow.end", progressbar); if (0 < p_info->cnt_checked_total) { |