On Mon, Nov 12, 2012 at 11:05 AM, Enlightenment SVN
<[email protected]> wrote:
> Log:
> add support for and use eina_list_last_data_get
>
>
> Author: discomfitor
> Date: 2012-11-12 02:05:09 -0800 (Mon, 12 Nov 2012)
> New Revision: 79144
> Trac: http://trac.enlightenment.org/e/changeset/79144
>
> Modified:
> trunk/e/src/bin/e.h trunk/e/src/bin/e_flowlayout.c trunk/e/src/bin/e_fm.c
> trunk/e/src/bin/e_gadcon.c trunk/e/src/bin/e_randr_12_crtc.c
> trunk/e/src/bin/e_shelf.c trunk/e/src/bin/e_widget_toolbar.c
> trunk/e/src/modules/conf_randr/e_smart_monitor.c
> trunk/e/src/modules/gadman/e_mod_main.c trunk/e/src/modules/ibar/e_mod_main.c
> trunk/e/src/modules/quickaccess/e_mod_quickaccess.c
>
> Modified: trunk/e/src/bin/e.h
> ===================================================================
> --- trunk/e/src/bin/e.h 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e.h 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -239,6 +239,10 @@
> } \
> }
>
> +#ifndef eina_list_last_data_get
> +# define eina_list_last_data_get(X) eina_list_data_get(eina_list_last(X))
> +#endif
imho, that's bad. Better put a FIXME saying that after the release, we
should use that new API (which is missing @since, btw...), instead of
depending on using that new API, even if it is defined.
Vincent
> # define E_REMOTE_OPTIONS 1
> # define E_REMOTE_OUT 2
> # define E_WM_IN 3
>
> Modified: trunk/e/src/bin/e_flowlayout.c
> ===================================================================
> --- trunk/e/src/bin/e_flowlayout.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_flowlayout.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -323,7 +323,7 @@
> if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(NULL);
> sd = evas_object_smart_data_get(obj);
> if (!sd) return NULL;
> - return eina_list_data_get(eina_list_last(sd->items));
> + return eina_list_last_data_get(sd->items);
> }
>
> EAPI Evas_Object *
>
> Modified: trunk/e/src/bin/e_fm.c
> ===================================================================
> --- trunk/e/src/bin/e_fm.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_fm.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -4854,7 +4854,7 @@
> {
> E_Fm2_Icon *prev;
> if (ic->selected) return;
> - prev = eina_list_data_get(eina_list_last(ic->sd->selected_icons));
> + prev = eina_list_last_data_get(ic->sd->selected_icons);
> if (prev) prev->last_selected = EINA_FALSE;
> ic->selected = EINA_TRUE;
> ic->sd->last_selected = ic;
> @@ -5205,7 +5205,7 @@
> if (!sd->icons) return;
> if ((!add) || sd->config->selection.single)
> _e_fm2_icon_desel_any(obj);
> - ic = eina_list_data_get(eina_list_last(sd->icons));
> + ic = eina_list_last_data_get(sd->icons);
> _e_fm2_icon_select(ic);
> evas_object_smart_callback_call(sd->obj, "selection_change", NULL);
> _e_fm2_icon_make_visible(ic);
> @@ -6255,7 +6255,7 @@
> /* if there is a .order file - we can re-order files */
> if (sd->order_file)
> {
> - ic = eina_list_data_get(eina_list_last(sd->icons));
> + ic = eina_list_last_data_get(sd->icons);
> if (ic)
> {
> if (!ic->drag.dnd)
>
> Modified: trunk/e/src/bin/e_gadcon.c
> ===================================================================
> --- trunk/e/src/bin/e_gadcon.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_gadcon.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -1032,7 +1032,7 @@
> gcc->gadcon = gc;
> gcc->o_base = base_obj;
> if (gc->clients)
> - gcc->id =
> E_GADCON_CLIENT(eina_list_data_get(eina_list_last(gc->clients)))->id + 1;
> + gcc->id = E_GADCON_CLIENT(eina_list_last_data_get(gc->clients))->id + 1;
> gc->clients = eina_list_append(gc->clients, gcc);
> /* This must only be unique during runtime */
> if (gcc->o_base)
> @@ -5136,7 +5136,7 @@
> {
> int t;
>
> - bi = eina_list_data_get(eina_list_last(lc->items));
> + bi = eina_list_last_data_get(lc->items);
> bi2 = eina_list_data_get(lc2->items);
>
> bi2->gcc->config.pos = bi2->ask.pos = (bi2->x) = (bi->x);
>
> Modified: trunk/e/src/bin/e_randr_12_crtc.c
> ===================================================================
> --- trunk/e/src/bin/e_randr_12_crtc.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_randr_12_crtc.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -223,7 +223,7 @@
> }
>
> // get an initial value for ret
> - ret =
> (E_Randr_Crtc_Info*)eina_list_data_get(eina_list_last(possible_crtcs));
> + ret = (E_Randr_Crtc_Info*)eina_list_last_data_get(possible_crtcs);
>
> switch (policy)
> {
>
> Modified: trunk/e/src/bin/e_shelf.c
> ===================================================================
> --- trunk/e/src/bin/e_shelf.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_shelf.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -1162,7 +1162,7 @@
> e_config->shelves = eina_list_append(e_config->shelves, cfg);
> e_config_save_queue();
>
> - es_cf = eina_list_data_get(eina_list_last(e_config->shelves));
> + es_cf = eina_list_last_data_get(e_config->shelves);
> cfg->id = es_cf->id + 1;
> es = e_shelf_config_new(zone, cfg);
> if (es && es->gadcon)
>
> Modified: trunk/e/src/bin/e_widget_toolbar.c
> ===================================================================
> --- trunk/e/src/bin/e_widget_toolbar.c 2012-11-12 10:00:08 UTC (rev 79143)
> +++ trunk/e/src/bin/e_widget_toolbar.c 2012-11-12 10:05:09 UTC (rev 79144)
> @@ -512,7 +512,7 @@
> {
> if (it->selected)
> {
> - it2 = eina_list_data_get(eina_list_last(wd->items));
> + it2 = eina_list_last_data_get(wd->items);
> break;
> }
> }
>
> Modified: trunk/e/src/modules/conf_randr/e_smart_monitor.c
> ===================================================================
> --- trunk/e/src/modules/conf_randr/e_smart_monitor.c 2012-11-12 10:00:08
> UTC (rev 79143)
> +++ trunk/e/src/modules/conf_randr/e_smart_monitor.c 2012-11-12 10:05:09
> UTC (rev 79144)
> @@ -286,7 +286,7 @@
> sd->min.h = mode->height;
>
> /* get the max resolution for this monitor */
> - mode = eina_list_data_get(eina_list_last(sd->modes));
> + mode = eina_list_last_data_get(sd->modes);
> sd->max.w = mode->width;
> sd->max.h = mode->height;
> if (!crtc) sd->orig.mode = mode;
>
> Modified: trunk/e/src/modules/gadman/e_mod_main.c
> ===================================================================
> --- trunk/e/src/modules/gadman/e_mod_main.c 2012-11-12 10:00:08 UTC (rev
> 79143)
> +++ trunk/e/src/modules/gadman/e_mod_main.c 2012-11-12 10:05:09 UTC (rev
> 79144)
> @@ -221,7 +221,7 @@
> if (!Man->waiting) return ECORE_CALLBACK_RENEW;
> l = eina_list_data_find_list(Man->waiting, ev->gcc->gadcon);
> if (!l) return ECORE_CALLBACK_RENEW;
> - if (ev->gcc->cf !=
> eina_list_data_get(eina_list_last(ev->gcc->gadcon->cf->clients))) return
> ECORE_CALLBACK_RENEW;
> + if (ev->gcc->cf != eina_list_last_data_get(ev->gcc->gadcon->cf->clients))
> return ECORE_CALLBACK_RENEW;
> Man->drag_gcc[ev->gcc->gadcon->id - ID_GADMAN_LAYER_BASE] = ev->gcc;
> ev->gcc->cf->style =
> eina_stringshare_add(ev->gcc->client_class->default_style ?:
> E_GADCON_CLIENT_STYLE_INSET);
> ev->gcc->style = eina_stringshare_ref(ev->gcc->cf->style);
>
> Modified: trunk/e/src/modules/ibar/e_mod_main.c
> ===================================================================
> --- trunk/e/src/modules/ibar/e_mod_main.c 2012-11-12 10:00:08 UTC (rev
> 79143)
> +++ trunk/e/src/modules/ibar/e_mod_main.c 2012-11-12 10:05:09 UTC (rev
> 79144)
> @@ -1426,7 +1426,7 @@
> }
> else
> {
> - bn = eina_list_data_get(eina_list_last(tmpl));
> + bn = eina_list_last_data_get(tmpl);
> break;
> }
> }
> @@ -1517,7 +1517,7 @@
> ic2 = ic;
> }
> // wrap to end
> - if ((ic1) && (!ic2)) ic2 = eina_list_data_get(eina_list_last(b->icons));
> + if ((ic1) && (!ic2)) ic2 = eina_list_last_data_get(b->icons);
> if ((ic1) && (ic2) && (ic1 != ic2))
> _ibar_icon_unfocus_focus(ic1, ic2);
> }
>
> Modified: trunk/e/src/modules/quickaccess/e_mod_quickaccess.c
> ===================================================================
> --- trunk/e/src/modules/quickaccess/e_mod_quickaccess.c 2012-11-12 10:00:08
> UTC (rev 79143)
> +++ trunk/e/src/modules/quickaccess/e_mod_quickaccess.c 2012-11-12 10:05:09
> UTC (rev 79144)
> @@ -1041,7 +1041,7 @@
> _e_qa_help_timeout(NULL);
> return;
> }
> - entry = eina_list_data_get(eina_list_last(qa_config->transient_entries));
> + entry = eina_list_last_data_get(qa_config->transient_entries);
> entry->help_watch = EINA_TRUE;
> ecore_job_add(_e_qa_help4, NULL);
> e_object_del(qa_mod->help_dia);
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_nov
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_nov
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel