2011/11/6 Enlightenment SVN <no-re...@enlightenment.org>:
> Log:
> From: Bluezery <ohpo...@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
>
>
>
> Author:       raster
> Date:         2011-11-05 23:11:57 -0700 (Sat, 05 Nov 2011)
> New Revision: 64794
> Trac:         http://trac.enlightenment.org/e/changeset/64794
>
> Modified:
>  trunk/elementary/AUTHORS trunk/elementary/src/bin/test_map.c 
> trunk/elementary/src/lib/elm_genlist.c trunk/elementary/src/lib/elm_map.c
>
> Modified: trunk/elementary/AUTHORS
> ===================================================================
> --- trunk/elementary/AUTHORS    2011-11-06 04:44:13 UTC (rev 64793)
> +++ trunk/elementary/AUTHORS    2011-11-06 06:11:57 UTC (rev 64794)
> @@ -49,3 +49,4 @@
>  Bluezery <ohpo...@gmail.com>
>  Nicolas Aguirre <aguirre.nico...@gmail.com>
>  Sanjeev BA <iamsanj...@gmail.com>
> +Bluezery <ohpo...@gmail.com>
>
> Modified: trunk/elementary/src/bin/test_map.c
> ===================================================================
> --- trunk/elementary/src/bin/test_map.c 2011-11-06 04:44:13 UTC (rev 64793)
> +++ trunk/elementary/src/bin/test_map.c 2011-11-06 06:11:57 UTC (rev 64794)
> @@ -711,7 +711,7 @@
>  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 @@
>    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 @@
>         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 @@
>
>         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);
>
> Modified: trunk/elementary/src/lib/elm_genlist.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_genlist.c      2011-11-06 04:44:13 UTC (rev 
> 64793)
> +++ trunk/elementary/src/lib/elm_genlist.c      2011-11-06 06:11:57 UTC (rev 
> 64794)
> @@ -3263,7 +3263,12 @@
>         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)
>           {

What's this doing here and why do I have the feeling you had rejected
something similar before?

>
> Modified: trunk/elementary/src/lib/elm_map.c
> ===================================================================
> --- trunk/elementary/src/lib/elm_map.c  2011-11-06 04:44:13 UTC (rev 64793)
> +++ trunk/elementary/src/lib/elm_map.c  2011-11-06 06:11:57 UTC (rev 64794)
> @@ -1284,9 +1284,9 @@
>         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++;
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> enlightenment-svn mailing list
> enlightenment-...@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to