Ejemplo n.º 1
0
void show_graphic_popup(appdata_s *ad, char *text, int timeout){
	Evas_Object *popup, *layout, *progressbar;

	ad->popup = elm_popup_add(ad->win);
	elm_object_style_set(ad->popup, "circle");

	layout = elm_layout_add(ad->popup);
	elm_layout_file_set(layout, ELM_DEMO_EDJ, "popup_progressbar");
	elm_object_content_set(ad->popup, layout);
	elm_object_part_text_set(layout,"elm.text", text);
	evas_object_show(layout);

	progressbar = elm_progressbar_add(layout);
	elm_object_style_set(progressbar, "process/popup/small");
	evas_object_size_hint_align_set(progressbar, EVAS_HINT_FILL, 0.5);
	evas_object_size_hint_weight_set(progressbar, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	elm_progressbar_pulse(progressbar, EINA_TRUE);
	elm_object_part_content_set(layout, "elm.swallow.content", progressbar);
	evas_object_show(progressbar);

	evas_object_show(ad->popup);

	if(timeout>0){
		elm_popup_timeout_set(ad->popup, timeout);
		evas_object_smart_callback_add(ad->popup, "timeout", destroy_popup, ad);
	}else{
		evas_object_smart_callback_del(ad->popup, "timeout", destroy_popup);
	}
}
void
contact_list_add(struct ContactListData *list_data)
{
	Evas_Object *win;
	win = ui_utils_view_window_get(list_data->view);
	list_data->index = NULL;
	list_data->list = elm_genlist_add(win);
	elm_genlist_mode_set(list_data->list, ELM_LIST_LIMIT);
	elm_genlist_longpress_timeout_set(list_data->list, 0.5);
	//elm_genlist_multi_select_set(list_data->list, EINA_TRUE);
	evas_object_size_hint_align_set(list_data->list, 0.0, 0.0);
	elm_object_scale_set(list_data->list, 1.0);
	itc.item_style = "contact";
	itc.func.text_get = gl_text_get;
	itc.func.content_get = gl_content_get;
	itc.func.state_get = NULL;
	itc.func.del = gl_del;
	evas_object_show(list_data->list);
	if (list_data->layout) {
		elm_object_part_content_set(list_data->layout, "contacts_list",
				list_data->list);
	}
	list_data->progress = elm_progressbar_add(win);
	elm_object_style_set(list_data->progress, "wheel");
	elm_object_text_set(list_data->progress, D_("Loading..."));
	evas_object_size_hint_align_set(list_data->progress, EVAS_HINT_FILL, 0.5);
	evas_object_size_hint_weight_set(list_data->progress, EVAS_HINT_EXPAND,
	                                 EVAS_HINT_EXPAND);
	elm_object_part_content_set(list_data->layout, "loading_indicator", list_data->progress);
	evas_object_show(list_data->progress);
}
static Evas_Object *_item_content_get_default(void *data, Evas_Object *obj, const char *part)
{
    Evas_Object *ic = NULL;

    if (!strcmp(part, "elm.swallow.icon"))
    {
        ic = elm_icon_add(obj);
        elm_icon_standard_set(ic, "clock");
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }
    else if (!strcmp(part, "elm.swallow.content"))
    {
        ic = elm_icon_add(obj);
        elm_icon_standard_set(ic, "home");
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }
    else if (!strcmp(part, "elm.swallow.icon.1"))
    {
        ic = elm_icon_add(obj);
        elm_icon_standard_set(ic, "folder");
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }
    else if (!strcmp(part, "elm.swallow.icon.2"))
    {
        ic = elm_icon_add(obj);
        elm_icon_standard_set(ic, "home");
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }
    else if (!strcmp(part, "elm.swallow.bottom"))
    {
        ic = elm_progressbar_add(obj);
        evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, 0.5);
    }
    else if (!strcmp(part, "elm.swallow.end"))
    {
        ic = elm_check_add(obj);
        elm_object_focus_allow_set(ic, EINA_FALSE);
        evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }
    else
    {
        ic = elm_icon_add(obj);
        elm_icon_standard_set(ic, "home");
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }

    return ic;
}
Ejemplo n.º 4
0
static Evas_Object *_gl_content_get(void *data, Evas_Object *obj, const char *part)
{
	if (data == NULL) {
		return NULL;
	}

	devpkr_gl_data_t *gdata = (devpkr_gl_data_t *) data;

	Evas_Object* icon = NULL;

	if (!strncmp(part, "elm.icon.1", strlen(part))) {
		char *temp_str = NULL;
		Evas_Object *ic = elm_layout_add(obj);

		icon = elm_image_add(ic);
		elm_layout_theme_set(ic, "layout", "list/B/type.1", "default");

		temp_str = g_strdup_printf("%s.png", gdata->dev_info->ap_image_path);
		elm_image_file_set(icon, CUSTOM_EDITFIELD_PATH, temp_str);
		g_free(temp_str);

		if (gdata->highlighted == TRUE) {
			ea_theme_object_color_set(icon, "AO001P");
		} else {
			ea_theme_object_color_set(icon, "AO001");
		}
		evas_object_size_hint_align_set(icon, EVAS_HINT_FILL, EVAS_HINT_FILL);
		evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
		elm_layout_content_set(ic, "elm.swallow.content", icon);

		return ic;
	} else if (!strncmp(part, "elm.icon.2", strlen(part))) {
		switch (gdata->connection_mode) {
		case ITEM_CONNECTION_MODE_OFF:
			break;

		case ITEM_CONNECTION_MODE_CONNECTING:
			icon = elm_progressbar_add(obj);
			elm_object_style_set(icon, "process_medium");
			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);
			break;

		default:
			break;
		}
	}

	return icon;
}
Ejemplo n.º 5
0
static Evas_Object *_gl_content_title_get(void *data, Evas_Object *obj, const char *part)
{
	Evas_Object *title_progressbar = NULL;

	if (FALSE == wifi_devpkr_get_scan_status())
		return NULL;

	title_progressbar = elm_progressbar_add(obj);
	elm_object_style_set(title_progressbar, "process_small");
	elm_progressbar_horizontal_set(title_progressbar, EINA_TRUE);
	elm_progressbar_pulse(title_progressbar, EINA_TRUE);

	return title_progressbar;
}
static Evas_Object *_gl_content_title_get(void *data, Evas_Object *obj, const char *part)
{
	__COMMON_FUNC_ENTER__;
	Evas_Object *title_progressbar = NULL;
	if (HEADER_MODE_SEARCHING == viewer_manager_header_mode_get()) {
		if (!strcmp(part, "elm.icon")) {
			title_progressbar  = elm_progressbar_add(obj);
			elm_object_style_set(title_progressbar, "list_process_small");
			elm_progressbar_horizontal_set(title_progressbar, EINA_TRUE);
			elm_progressbar_pulse(title_progressbar, EINA_TRUE);
		}
	}
	__COMMON_FUNC_EXIT__;
	return title_progressbar;
}
static Evas_Object *_gl_header_content_get(void *data, Evas_Object *obj, const char *part)
{
	if (manager_object == NULL)
		return NULL;

	Evas_Object* ret = NULL;
	Evas_Object *toggle_btn = (Evas_Object *)data;
	Evas_Object *icon = NULL;

	__COMMON_FUNC_ENTER__;

	assertm_if(NULL == toggle_btn, "NULL!!");

	if (!strncmp(part, "elm.icon", strlen(part))) {
		switch (manager_object->header_mode) {
		case HEADER_MODE_OFF:
			/* Show WiFi off indication button */
			elm_check_state_set(toggle_btn, EINA_FALSE);
			ret = toggle_btn;
			break;

		case HEADER_MODE_ACTIVATING:
		case HEADER_MODE_DEACTIVATING:
			/* Dont display the WiFi on/off indication while it is Activating/Deactivating */
			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);
			ret = icon;
			break;

		default:	/* Show WiFi on indication button */
			elm_check_state_set(toggle_btn, EINA_TRUE);
			ret = toggle_btn;
			break;
		}
	}

	__COMMON_FUNC_EXIT__;
	return ret;
}
Ejemplo n.º 8
0
Upload *
upload_new(Evas_Object *parent)
{
   Evas_Object *bx, *lbl, *pb, *notify;
   Upload *ul;

   ul = calloc(1, sizeof(Upload));

   notify = elm_notify_add(parent);
   elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM_RIGHT);
   elm_win_resize_object_add(parent, notify);
   evas_object_size_hint_weight_set(notify, -1.0, -1.0);
   evas_object_size_hint_align_set(notify, -1.0, -1.0);

   bx = elm_box_add(parent);
   evas_object_size_hint_weight_set(bx, 1.0, 1.0);
   evas_object_size_hint_align_set(bx, -1.0, -1.0);
   evas_object_show(bx);
   elm_notify_content_set(notify, bx);

   lbl = elm_label_add(bx);
   elm_object_text_set(lbl, D_("Uploading ..."));
   evas_object_size_hint_weight_set(lbl, 1.0, 1.0);
   evas_object_size_hint_align_set(lbl, 1.0, 1.0);
   elm_box_pack_end(bx, lbl);
   evas_object_show(lbl);

   pb = elm_progressbar_add(bx);
   elm_object_text_set(pb, "Photo");
   evas_object_size_hint_weight_set(pb, 1.0, 1.0);
   evas_object_size_hint_align_set(pb, 1.0, 1.0);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);

   ul->main = notify;
   ul->lbl = lbl;
   ul->pb = pb;

   return ul;
}
Ejemplo n.º 9
0
Evas_Object *
flickr_sync_new(Evas_Object *win, Enlil_Album *album)
{
   Evas_Object *inwin, *pb, *bt, *tb;
   Enlil_Album_Data *album_data = enlil_album_user_data_get(album);

   //create inwin & file selector
   inwin = elm_win_inwin_add(win);
   album_data->netsync.inwin.win = inwin;
   elm_object_style_set(inwin, "minimal");
   evas_object_show(inwin);

   tb = elm_table_add(inwin);
   album_data->netsync.inwin.tb = tb;
   evas_object_size_hint_weight_set(tb, 1.0, 1.0);
   evas_object_size_hint_align_set(tb, 1.0, 1.0);
   evas_object_show(tb);
   elm_win_inwin_content_set(inwin, tb);

   bt = elm_button_add(inwin);
   elm_object_text_set(bt, D_("Close"));
   evas_object_size_hint_align_set(bt, 1.0, 0.5);
   evas_object_smart_callback_add(bt, "clicked", _close_cb, album);
   evas_object_show(bt);
   elm_table_pack(tb, bt, 1, 1, 1, 1);

   pb = elm_progressbar_add(inwin);
   album_data->netsync.inwin.pb = pb;
   evas_object_size_hint_align_set(pb, 0.5, 0.5);
   evas_object_size_hint_weight_set(pb, 1.0, 0.0);
   elm_progressbar_pulse_set(pb, EINA_TRUE);
   elm_object_text_set(pb, D_("Synchronising ..."));
   evas_object_hide(pb);
   elm_table_pack(tb, pb, 0, 1, 1, 1);

   flickr_sync_update(album);

   return inwin;
}
Ejemplo n.º 10
0
static Evas_Object*
create_main_box(interface *intf, Evas_Object *parent)
{
    /* Create a content box to display the content and the mini player */
    intf->main_box = elm_box_add(parent);
    elm_box_horizontal_set(intf->main_box, EINA_FALSE);

    /* Main View Naviframe */
    intf->nf_content = elm_naviframe_add(intf->main_box);

    /* Put the naviframe at the top of the content_box */
    evas_object_size_hint_weight_set(intf->nf_content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(intf->nf_content, EVAS_HINT_FILL, EVAS_HINT_FILL);
    elm_box_pack_end(intf->main_box, intf->nf_content);

    /* Library scan progress */
    intf->scan_progress = elm_progressbar_add(intf->main_box);
    elm_progressbar_unit_format_set(intf->scan_progress, "Scanning... %.0f%%");
    elm_progressbar_horizontal_set(intf->scan_progress, EINA_TRUE);
    evas_object_size_hint_weight_set(intf->scan_progress, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
    evas_object_size_hint_align_set(intf->scan_progress, EVAS_HINT_FILL, EVAS_HINT_FILL);
    evas_object_hide(intf->scan_progress);

    /* Mini Player creation */
    intf->mini_player_layout = elm_layout_add(intf->main_box);
    intf->p_mini_player = audio_player_create(intf, application_get_playback_service(intf->p_app), intf->mini_player_layout);
    evas_object_hide(intf->mini_player_layout);

    evas_object_size_hint_weight_set(intf->mini_player_layout, EVAS_HINT_FILL, 0.1);
    evas_object_size_hint_align_set(intf->mini_player_layout, EVAS_HINT_FILL, EVAS_HINT_FILL);

    /* */
    evas_object_show(intf->nf_content);

    /* Ask the global box to recalculate her current children display */
    elm_box_recalculate(intf->main_box);

    return intf->main_box;
}
static Evas_Object *_item_content_get_progress(void *data, Evas_Object *obj, const char *part)
{
    Evas_Object *ic = NULL;

    if (!strcmp(part, "elm.swallow.icon"))
    {
        ic = elm_progressbar_add(obj);
        elm_progressbar_span_size_set(ic, 200);
        evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        elm_object_style_set(ic, "default");
        evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, 0.5);
    }
    else if (!strcmp(part, "elm.swallow.end"))
    {
        ic = elm_check_add(obj);
        elm_object_focus_allow_set(ic, EINA_FALSE);
        evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
        evas_object_size_hint_align_set(ic, EVAS_HINT_FILL, EVAS_HINT_FILL);
        evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    }

    return ic;
}
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;
}
Ejemplo n.º 13
0
static void
_init_progressbar(Evas_Object *win)
{
   Evas_Object *bg, *bx, *pb;

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   bx = elm_box_add(win);
   elm_win_resize_object_add(win, bx);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bx);

   pb = elm_progressbar_add(win);
   elm_object_text_set(pb, progressbar_name);
   elm_progressbar_span_size_set(pb, 260);
   elm_progressbar_value_set(pb, progressbar_set);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);
}
void common_pswd_popup_pbc_popup_create(pswd_popup_t *pswd_popup_data, Evas_Smart_Cb cancel_cb, void *cancel_cb_data)
{
	if (!pswd_popup_data) {
		return;
	}
	Evas_Object *popup = NULL,*progressbar = NULL;
	Evas_Object *label = NULL, *timer_label = NULL;

	pbc_popup_t *pbc_popup_data = NULL;
	pbc_popup_data = g_malloc0(sizeof(pbc_popup_t));

	popup_btn_info_t popup_btn_data;
	memset(&popup_btn_data, 0, sizeof(popup_btn_data));
	popup_btn_data.btn1_txt = sc(pswd_popup_data->str_pkg_name, I18N_TYPE_Cancel);
	popup_btn_data.btn1_cb = cancel_cb;
	popup_btn_data.btn1_data = cancel_cb_data;
	popup = common_utils_show_info_popup(pswd_popup_data->win, &popup_btn_data);

	label = elm_label_add(popup);
	elm_object_style_set(label, "popup/default");
	elm_label_line_wrap_set(label, ELM_WRAP_MIXED);
	elm_object_text_set(label, sc(pswd_popup_data->str_pkg_name,I18N_TYPE_Press_WPS_On_Your_Wi_Fi_Access_Point));
	evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
	evas_object_size_hint_align_set(label, EVAS_HINT_FILL, EVAS_HINT_FILL);
	evas_object_show(label);

	progressbar = elm_progressbar_add(popup);
	elm_object_style_set(progressbar, "list_progress");
	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_value_set(progressbar, 0.0);

	timer_label = elm_label_add(popup);
	elm_object_style_set(timer_label, "label3");
	elm_label_line_wrap_set(timer_label, ELM_WRAP_MIXED);
	elm_object_text_set(timer_label, _("<font_size=40><align=center>02:00</align></font_size>"));
	evas_object_size_hint_weight_set(timer_label, EVAS_HINT_EXPAND, 0.0);
	evas_object_size_hint_align_set(timer_label, EVAS_HINT_FILL, EVAS_HINT_FILL);
	evas_object_show(timer_label);

	pbc_popup_data->checker = 0;
	pbc_popup_data->value = 0.0;
	pbc_popup_data->progressbar = progressbar;
	pbc_popup_data->timer_label = timer_label;
	pbc_popup_data->popup = popup;
	pbc_popup_data->timer = ecore_timer_add(1.0, _fn_pb_timer_bar, pswd_popup_data);
	evas_object_show(progressbar);

	Evas_Object *box = elm_box_add(popup);
	evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
	evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
	evas_object_show(box);
	elm_box_pack_end(box, label);
	elm_box_pack_end(box, progressbar);
	elm_box_pack_end(box, timer_label);

	evas_object_show(box);
	elm_object_content_set(popup, box);
	pswd_popup_data->pbc_popup_data = pbc_popup_data;

	/* Delete the password popup */
	evas_object_hide(pswd_popup_data->popup_conformant);
	evas_object_del(pswd_popup_data->popup_conformant);

	return;
}
Ejemplo n.º 15
0
Progressbar::Progressbar (Evasxx::Object &parent)
{
  o = elm_progressbar_add (parent.obj ());
  
  elmInit ();
}
Ejemplo n.º 16
0
PREFIX value ml_elm_progressbar_add(value v_parent)
{
    Evas_Object* obj = elm_progressbar_add((Evas_Object*) v_parent);
    if(obj == NULL) caml_failwith("elm_progressbar_add");
    return (value) obj;
}
Ejemplo n.º 17
0
void
flickr_sync_update(Enlil_Album *album)
{
   Enlil_Album_Data *album_data = enlil_album_user_data_get(album);
   Evas_Object *fr, *tb2, *lbl, *bt, *sep, *pb, *pager;
   Evas_Object *inwin = album_data->netsync.inwin.win;
   Evas_Object *tb = album_data->netsync.inwin.tb;
   int i = 0;
   Eina_List *l;
   Enlil_Photo *photo;
   int nb_photos;
   char buf[1024];

   if (album_data->netsync.inwin.fr) evas_object_del(
                                                     album_data->netsync.inwin.fr);

   //
   fr = elm_frame_add(inwin);
   album_data->netsync.inwin.fr = fr;
   elm_object_text_set(fr, D_("Synchronise an album with flickr"));
   evas_object_size_hint_weight_set(fr, 1.0, 1.0);
   evas_object_size_hint_align_set(fr, -1.0, -1.0);
   evas_object_show(fr);
   elm_table_padding_set(tb, 1, 1);
   elm_table_pack(tb, fr, 0, 0, 3, 1);

   tb2 = elm_table_add(inwin);
   evas_object_size_hint_weight_set(tb2, 1.0, 0.0);
   evas_object_size_hint_align_set(tb2, -1.0, 1.0);
   elm_table_padding_set(tb2, 15, 5);
   evas_object_show(tb2);
   elm_object_content_set(fr, tb2);
   //

   if (album_data->netsync.album_netsync_notuptodate)
   {
      lbl = elm_label_add(inwin);
      elm_object_text_set(lbl, D_("Update the flickr album header."));
      evas_object_show(lbl);
      elm_table_pack(tb2, lbl, 0, i, 1, 1);

      bt = elm_button_add(inwin);
      album_data->netsync.inwin.bt1 = bt;
      elm_object_text_set(bt, D_("Update"));
      evas_object_smart_callback_add(bt, "clicked", _netsync_notuptodate_cb,
                                     album);
      evas_object_size_hint_align_set(bt, 0.5, 0.5);
      evas_object_size_hint_weight_set(bt, 1.0, 0.0);

      evas_object_show(bt);
      elm_table_pack(tb2, bt, 1, i, 1, 1);

      i++;

      sep = elm_separator_add(inwin);
      evas_object_show(sep);
      elm_table_pack(tb2, sep, 0, i, 2, 1);
      i++;
   }

   if (album_data->netsync.album_notinnetsync)
   {
      lbl = elm_label_add(inwin);
      elm_object_text_set(lbl, D_("The album is not in Flickr."));
      evas_object_show(lbl);
      elm_table_pack(tb2, lbl, 0, i, 1, 1);

      bt = elm_button_add(inwin);
      album_data->netsync.inwin.bt2 = bt;
      elm_object_text_set(bt, D_("Add the album in Flickr"));
      evas_object_size_hint_align_set(bt, 0.5, 0.5);
      evas_object_size_hint_weight_set(bt, 1.0, 0.0);

      evas_object_smart_callback_add(bt, "clicked", _album_notinnetsync_cb,
                                     album);
      evas_object_show(bt);
      elm_table_pack(tb2, bt, 1, i, 1, 1);

      i++;

      sep = elm_separator_add(inwin);
      evas_object_show(sep);
      elm_table_pack(tb2, sep, 0, i, 2, 1);
      i++;
   }

   if (album_data->netsync.album_local_notuptodate)
   {
      lbl = elm_label_add(inwin);
      elm_object_text_set(lbl, D_("Update the local album header."));
      evas_object_show(lbl);
      elm_table_pack(tb2, lbl, 0, i, 1, 1);

      bt = elm_button_add(inwin);
      album_data->netsync.inwin.bt3 = bt;
      evas_object_size_hint_align_set(bt, 0.5, 0.5);
      evas_object_size_hint_weight_set(bt, 1.0, 0.0);

      evas_object_smart_callback_add(bt, "clicked", _local_notuptodate_cb,
                                     album);
      elm_object_text_set(bt, D_("Update"));
      evas_object_show(bt);
      elm_table_pack(tb2, bt, 1, i, 1, 1);

      i++;

      sep = elm_separator_add(inwin);
      evas_object_show(sep);
      elm_table_pack(tb2, sep, 0, i, 2, 1);
      i++;
   }

   if (album_data->netsync.photos_notinlocal)
   {
      lbl = elm_label_add(inwin);
      elm_object_text_set(lbl, D_("Some photos are not in the local album."));
      evas_object_show(lbl);
      elm_table_pack(tb2, lbl, 0, i, 1, 1);

      pager = elm_naviframe_add(inwin);
      album_data->netsync.inwin.notinlocal.pager = pager;
      evas_object_size_hint_align_set(pager, 0.5, 0.5);
      evas_object_size_hint_weight_set(pager, 1.0, 0.0);
      evas_object_show(pager);
      elm_table_pack(tb2, pager, 1, i, 1, 1);
      elm_object_style_set(pager, "fade_invisible");

      bt = elm_button_add(inwin);
      album_data->netsync.inwin.notinlocal.bt = bt;
      album_data->netsync.inwin.bt4 = bt;
      evas_object_size_hint_align_set(bt, -1.0, 0.5);
      evas_object_size_hint_weight_set(bt, 1.0, 0.0);
      elm_object_text_set(bt, D_("Download Them All"));
      evas_object_smart_callback_add(bt, "clicked", _photos_notinlocal_cb,
                                     album);
      evas_object_show(bt);
      elm_naviframe_item_simple_push(pager, bt);

      pb = elm_progressbar_add(inwin);
      album_data->netsync.inwin.notinlocal.pb = pb;
      evas_object_size_hint_align_set(pb, -1.0, 0.5);
      evas_object_size_hint_weight_set(pb, 1.0, 0.0);
      elm_progressbar_pulse_set(pb, EINA_TRUE);
      elm_object_text_set(pb, D_("Downloads in progress ..."));
      evas_object_show(pb);
      elm_naviframe_item_simple_push(pager, pb);
      evas_object_size_hint_max_set(pb, 0, 0);

      if (album_data->netsync.inwin.notinlocal.is_updating)
      {
         elm_progressbar_pulse(pb, EINA_TRUE);
         elm_naviframe_item_simple_promote(pager, pb);
      }
      else
         elm_naviframe_item_simple_promote(pager, bt);

      i++;

      sep = elm_separator_add(inwin);
      evas_object_show(sep);
      elm_table_pack(tb2, sep, 0, i, 2, 1);
      i++;
   }

   nb_photos = 0;
   EINA_LIST_FOREACH(enlil_album_photos_get(album), l, photo)
   {
      Enlil_Photo_Data *photo_data = enlil_photo_user_data_get(photo);
      if (photo_data && photo_data->netsync.state == PHOTO_FLICKR_NOTINFLICKR)
      {
         nb_photos++;
      }
   }
EAPI_MAIN int
elm_main(int    argc,
         char **argv)
{
   Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2;
   char buf[PATH_MAX];

   elm_app_info_set(elm_main, "elementary", "images/logo_small.png");
   win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC);
   elm_win_title_set(win, "Progress bar example");
   evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);

   bg = elm_bg_add(win);
   elm_win_resize_object_add(win, bg);
   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bg);

   bx = elm_box_add(win);
   elm_win_resize_object_add(win, bx);
   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_show(bx);

   /* pb with no label, default unit label and no icon */
   pb = elm_progressbar_add(win);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);
   example_data.pb1 = pb;

   /* pb with label, and set to pulse */
   pb = elm_progressbar_add(win);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_object_text_set(pb, "Infinite bounce");
   elm_progressbar_pulse_set(pb, EINA_TRUE);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);
   example_data.pb2 = pb;

   ic1 = elm_icon_add(win);
   snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
   elm_icon_file_set(ic1, buf, NULL);
   evas_object_size_hint_aspect_set(ic1, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);

   /* pb with label, icon, custom unit label and span size set */
   pb = elm_progressbar_add(win);
   elm_object_text_set(pb, "Label");
   elm_object_part_content_set(pb, "icon", ic1);
   elm_progressbar_inverted_set(pb, EINA_TRUE);
   elm_progressbar_unit_format_set(pb, "%1.1f units");
   elm_progressbar_span_size_set(pb, 200);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_box_pack_end(bx, pb);
   evas_object_show(ic1);
   evas_object_show(pb);
   example_data.pb3 = pb;

   hbx = elm_box_add(win);
   elm_box_horizontal_set(hbx, EINA_TRUE);
   evas_object_size_hint_weight_set(hbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(hbx, EVAS_HINT_FILL, EVAS_HINT_FILL);
   elm_box_pack_end(bx, hbx);
   evas_object_show(hbx);

   /* vertical pb */
   pb = elm_progressbar_add(win);
   elm_progressbar_horizontal_set(pb, EINA_FALSE);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_box_pack_end(hbx, pb);
   elm_object_text_set(pb, "percent");
   evas_object_show(pb);
   example_data.pb4 = pb;

   /* vertical pb, with pulse and custom (small) span size */
   pb = elm_progressbar_add(win);
   elm_progressbar_horizontal_set(pb, EINA_FALSE);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_progressbar_span_size_set(pb, 80);
   elm_progressbar_pulse_set(pb, EINA_TRUE);
   elm_progressbar_unit_format_set(pb, NULL);
   elm_object_text_set(pb, "Infinite bounce");
   elm_box_pack_end(hbx, pb);
   evas_object_show(pb);
   example_data.pb5 = pb;

   ic2 = elm_icon_add(win);
   elm_icon_file_set(ic2, buf, NULL);
   evas_object_size_hint_aspect_set(ic2, EVAS_ASPECT_CONTROL_HORIZONTAL, 1, 1);

   /* vertical pb, inverted, with custom unit format and icon*/
   pb = elm_progressbar_add(win);
   elm_progressbar_horizontal_set(pb, EINA_FALSE);
   elm_object_text_set(pb, "Label");
   elm_object_part_content_set(pb, "icon", ic2);
   elm_progressbar_inverted_set(pb, EINA_TRUE);
   elm_progressbar_unit_format_set(pb, "%1.2f%%");
   elm_progressbar_span_size_set(pb, 200);
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_box_pack_end(hbx, pb);
   evas_object_show(ic2);
   evas_object_show(pb);
   example_data.pb6 = pb;

   /* "wheel" style progress bar */
   pb = elm_progressbar_add(win);
   elm_object_style_set(pb, "wheel");
   elm_object_text_set(pb, "Style: wheel");
   evas_object_size_hint_align_set(pb, EVAS_HINT_FILL, 0.5);
   evas_object_size_hint_weight_set(pb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_box_pack_end(bx, pb);
   evas_object_show(pb);
   example_data.pb7 = pb;

   bt_bx = elm_box_add(win);
   elm_box_horizontal_set(bt_bx, EINA_TRUE);
   evas_object_size_hint_weight_set(bt_bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   elm_box_pack_end(bx, bt_bx);
   evas_object_show(bt_bx);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Start");
   evas_object_smart_callback_add(bt, "clicked", _progressbar_example_start,
                                  NULL);
   elm_box_pack_end(bt_bx, bt);
   evas_object_show(bt);

   bt = elm_button_add(win);
   elm_object_text_set(bt, "Stop");
   evas_object_smart_callback_add(bt, "clicked", _progressbar_example_stop,
                                  NULL);
   elm_box_pack_end(bt_bx, bt);
   evas_object_show(bt);

   evas_object_show(win);

   elm_run();
   elm_shutdown();

   return 0;
}