From: Bluezery <ohpowel@gmail.com>

Subject: [E-devel] [elm_map] ecore_file_download_full() should be used
properly

elm_map only checked that returned job is NULL.
But ecore_file_download_full() returns EINA_FALSE when error occurred.
So return value should be checked for proper usage.
Please review this simple bug fix



SVN revision: 64794
This commit is contained in:
Bluezery 2011-11-06 06:11:57 +00:00 committed by Carsten Haitzler
parent 6d00462910
commit 84f0b47a95
4 changed files with 35 additions and 6 deletions

View File

@ -49,3 +49,4 @@ Kim Yunhan <spbear@gmail.com>
Bluezery <ohpowel@gmail.com>
Nicolas Aguirre <aguirre.nicolas@gmail.com>
Sanjeev BA <iamsanjeev@gmail.com>
Bluezery <ohpowel@gmail.com>

View File

@ -711,7 +711,7 @@ _map_mouse_up(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj __U
void
test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *map;
Evas_Object *win, *bg, *map, *tab, *r, *en;
int idx = 0;
win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
@ -723,6 +723,19 @@ test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
elm_win_resize_object_add(win, bg);
evas_object_show(bg);
tab = elm_table_add(win);
evas_object_size_hint_weight_set(tab, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, tab);
evas_object_show(tab);
r = evas_object_rectangle_add(evas_object_evas_get(win));
evas_object_color_set(r, 20, 40, 60, 255);
evas_object_size_hint_min_set(r, 200, 200);
evas_object_size_hint_weight_set(r, EVAS_HINT_EXPAND, 0);
evas_object_size_hint_fill_set(r, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tab, r, 0, 0, 1, 1);
evas_object_show(r);
map = elm_map_add(win);
if (map)
{
@ -736,7 +749,9 @@ test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
printf("]\n");
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, map);
evas_object_size_hint_fill_set(map, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tab, map, 0, 2, 1, 1);
// elm_win_resize_object_add(win, map);
evas_object_data_set(map, "window", win);
//
@ -827,6 +842,14 @@ test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
evas_object_show(map);
}
en = elm_entry_add(win);
elm_entry_scrollable_set(en, EINA_TRUE);
elm_entry_single_line_set(en, 1);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, 0.1);
elm_table_pack(tab, en, 0, 1, 1, 1);
evas_object_show(en);
evas_object_resize(win, 800, 800);
evas_object_show(win);

View File

@ -3263,7 +3263,12 @@ _queue_process(Widget_Data *wd)
it = wd->queue->data;
wd->queue = eina_list_remove_list(wd->queue, wd->queue);
it->item->queued = EINA_FALSE;
_item_block_add(wd, it);
if (!wd->blocks)
{
_item_block_add(wd, it);
_item_block_realize(it->item->block);
}
else _item_block_add(wd, it);
t = ecore_time_get();
if (it->item->block->changed)
{

View File

@ -1284,9 +1284,9 @@ _process_download_list(Evas_Object *obj)
if (gi->wd->download_num >= MAX_CONCURRENT_DOWNLOAD)
break;
ecore_file_download_full(gi->source, gi->file, _tile_downloaded, NULL, gi, &(gi->job), wd->ua);
if (!gi->job)
DBG("Can't start to download %s to %s", gi->source, gi->file);
Eina_Bool ret = ecore_file_download_full(gi->source, gi->file, _tile_downloaded, NULL, gi, &(gi->job), wd->ua);
if (!ret || !gi->job)
WRN("Can't start to download %s to %s", gi->source, gi->file);
else
{
gi->wd->download_num++;