forked from enlightenment/enlightenment
add support for and use eina_list_last_data_get
SVN revision: 79144
This commit is contained in:
parent
cd4c26b0f5
commit
e5903f4740
|
@ -239,6 +239,10 @@ typedef struct _E_Rect E_Rect;
|
|||
} \
|
||||
}
|
||||
|
||||
#ifndef eina_list_last_data_get
|
||||
# define eina_list_last_data_get(X) eina_list_data_get(eina_list_last(X))
|
||||
#endif
|
||||
|
||||
# define E_REMOTE_OPTIONS 1
|
||||
# define E_REMOTE_OUT 2
|
||||
# define E_WM_IN 3
|
||||
|
|
|
@ -323,7 +323,7 @@ e_flowlayout_pack_object_last(Evas_Object *obj)
|
|||
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 *
|
||||
|
|
|
@ -4854,7 +4854,7 @@ _e_fm2_icon_select(E_Fm2_Icon *ic)
|
|||
{
|
||||
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 @@ _e_fm2_icon_sel_last(Evas_Object *obj, Eina_Bool add)
|
|||
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 @@ _e_fm2_cb_dnd_move(void *data, const char *type, void *event)
|
|||
/* 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)
|
||||
|
|
|
@ -1032,7 +1032,7 @@ e_gadcon_client_new(E_Gadcon *gc, const char *name, const char *id __UNUSED__, c
|
|||
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 @@ _e_gadcon_layout_smart_containers_position_adjust(E_Smart_Data *sd, E_Layout_Ite
|
|||
{
|
||||
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);
|
||||
|
|
|
@ -223,7 +223,7 @@ _crtc_according_to_policy_get(E_Randr_Crtc_Info *but, Ecore_X_Randr_Output_Polic
|
|||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
|
@ -1162,7 +1162,7 @@ _e_shelf_new_dialog_ok(void *data, char *text)
|
|||
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)
|
||||
|
|
|
@ -512,7 +512,7 @@ _e_wid_cb_key_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED_
|
|||
{
|
||||
if (it->selected)
|
||||
{
|
||||
it2 = eina_list_data_get(eina_list_last(wd->items));
|
||||
it2 = eina_list_last_data_get(wd->items);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ e_smart_monitor_info_set(Evas_Object *obj, E_Randr_Output_Info *output, E_Randr_
|
|||
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;
|
||||
|
|
|
@ -221,7 +221,7 @@ gadman_gadget_add_handler(void *d __UNUSED__, int type __UNUSED__, E_Event_Gadco
|
|||
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);
|
||||
|
|
|
@ -1426,7 +1426,7 @@ _ibar_focused_prev_find(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
bn = eina_list_data_get(eina_list_last(tmpl));
|
||||
bn = eina_list_last_data_get(tmpl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1517,7 +1517,7 @@ _ibar_focus_prev(IBar *b)
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -1041,7 +1041,7 @@ _e_qa_help_qa_added_cb(void *data __UNUSED__)
|
|||
_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);
|
||||
|
|
Loading…
Reference in New Issue