ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND = (1 << 0),
ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT = (1 << 1),
ELM_GENLIST_ITEM_MOVE_EFFECT_EDIT_MODE = (1 << 2),
+ ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE = (1 << 3),
} Elm_Genlist_Item_Move_effect_Mode;
struct _Widget_Data
Elm_Genlist_Item *last_selected_item;
Eina_Inlist *item_cache;
Elm_Genlist_Item *anchor_item;
- Elm_Genlist_Item *reorder_it, *reorder_rel;
Evas_Coord anchor_y;
Elm_List_Mode mode;
Ecore_Timer *multi_timer;
Evas_Coord prev_x, prev_y, prev_mx, prev_my;
Evas_Coord cur_x, cur_y, cur_mx, cur_my;
- Evas_Coord reorder_start_y;
Eina_Bool mouse_down : 1;
Eina_Bool multi_down : 1;
Eina_Bool multi_timeout : 1;
Eina_Bool multitouched : 1;
- Ecore_Animator *item_moving_effect_timer;
- Evas_Object *alpha_bg;
- Elm_Genlist_Item *expand_item;
- Evas_Coord expand_item_end;
- Evas_Coord expand_item_gap;
Eina_Bool on_hold : 1;
Eina_Bool multi : 1;
Eina_Bool always_select : 1;
Eina_Bool homogeneous : 1;
Eina_Bool clear_me : 1;
Eina_Bool swipe : 1;
- Eina_Bool auto_scrolled : 1;
struct
{
Evas_Coord x, y;
int item_width;
int item_height;
int max_items_per_block;
- int move_effect_mode;
- unsigned int start_time;
double longpress_timeout;
// TODO : refactoring
Eina_Bool reorder_mode : 1;
Eina_Bool reorder_pan_move : 1;
+ Eina_Bool reorder_deleted : 1;
Eina_Bool effect_mode : 1;
Eina_Bool select_all_check : 1;
+ Eina_Bool auto_scrolled : 1;
int edit_mode;
Edit_Data *ed;
Eina_List *edit_field;
int total_num;
int group_item_width;
int group_item_height;
+ Elm_Genlist_Item *reorder_it, *reorder_rel;
+ Evas_Coord reorder_start_y;
+ Ecore_Animator *item_moving_effect_timer;
+ Evas_Object *alpha_bg;
+ Elm_Genlist_Item *expand_item;
+ Evas_Coord expand_item_end;
+ Evas_Coord expand_item_gap;
+ int move_effect_mode;
+ unsigned int start_time;
};
struct _Item_Block
EINA_INLIST;
int count;
int num;
- int reorder_offset;
Widget_Data *wd;
Eina_List *items;
Evas_Coord x, y, w, h, minw, minh;
Eina_Bool updateme : 1;
Eina_Bool showme : 1;
Eina_Bool must_recalc : 1;
+ int reorder_offset;
};
struct _Elm_Genlist_Item
Eina_List *labels, *icons, *states, *icon_objs;
Ecore_Timer *long_timer;
Ecore_Timer *swipe_timer;
- Ecore_Animator *item_moving_effect_timer;
Evas_Coord dx, dy;
Evas_Coord scrl_x, scrl_y;
- Evas_Coord old_scrl_x, old_scrl_y;
- Evas_Coord pad_left, pad_right;
Elm_Genlist_Item *rel;
int walking;
int expanded_depth;
int order_num_in;
- int list_expanded;
Eina_Bool before : 1;
// TODO: refactoring
Eina_Bool move_effect_me : 1;
Eina_Bool effect_done : 1;
- Eina_List *edit_icon_objs;
+ Eina_Bool reordering : 1;
+ Eina_Bool edit_select_check: 1;
+ Eina_Bool renamed : 1;
+ Eina_Bool effect_item_realized : 1;
+ Eina_Bool sweeped : 1;
+ Eina_Bool wassweeped : 1;
+ Eina_List *edit_icon_objs;
Evas_Object *edit_obj;
- Eina_Bool reordering : 1;
- Eina_Bool edit_select_check: 1;
- Eina_Bool renamed : 1;
- Eina_Bool effect_item_realized : 1;
- Eina_Bool sweeped : 1;
- Eina_Bool wassweeped : 1;
- Eina_List *sweep_labels, *sweep_icons, *sweep_icon_objs;
- int num;
+ Eina_List *sweep_labels, *sweep_icons, *sweep_icon_objs;
+ int num;
+ Ecore_Animator *item_moving_effect_timer;
+ Evas_Coord old_scrl_x, old_scrl_y;
+ Evas_Coord pad_left, pad_right;
+ int list_expanded;
};
struct _Item_Cache
static void _item_cache_zero(Widget_Data *wd);
static void _del_hook(Evas_Object *obj);
static void _theme_hook(Evas_Object *obj);
-//static void _show_region_hook(void *data, Evas_Object *obj);
+static void _show_region_hook(void *data, Evas_Object *obj);
static void _sizing_eval(Evas_Object *obj);
static void _item_unrealize(Elm_Genlist_Item *it);
static void _item_block_unrealize(Item_Block *itb);
void *event_info);
static Eina_Bool _deselect_all_items(Widget_Data *wd);
static void _pan_calculate(Evas_Object *obj);
+// TODO : refactoring
static Evas_Object* _create_tray_alpha_bg(const Evas_Object *obj);
static unsigned int current_time_get();
static Eina_Bool _item_moving_effect_timer_cb(void *data);
static int _item_flip_effect_show(Elm_Genlist_Item *it);
static void _effect_item_controls(Elm_Genlist_Item *it, int itx, int ity);
-static void _effect_item_realize(Elm_Genlist_Item *it);
+static void _effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on);
static void _effect_item_unrealize(Elm_Genlist_Item *it);
-
-// TODO : refactoring
static void _item_slide(Elm_Genlist_Item *it, Eina_Bool slide_to_right);
static void _sweep_finish(void *data, Evas_Object *o, const char *emission, const char *source);
static void _create_sweep_objs(Elm_Genlist_Item *it);
static void _effect_item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after);
static void _effect_item_move_before(Elm_Genlist_Item *it, Elm_Genlist_Item *before);
static void _group_items_recalc(void *data);
-static void _select_all_down_process(Elm_Genlist_Item *select_all_it, Eina_Bool checked);
+static void _select_all_down_process(Elm_Genlist_Item *select_all_it, Eina_Bool checked, Eina_Bool update_items);
static void _checkbox_item_select_process(Elm_Genlist_Item *it);
static void _item_auto_scroll(void *data);
_sizing_eval(obj);
}
-/*
- static void
- _show_region_hook(void *data, Evas_Object *obj)
- {
+static void
+_show_region_hook(void *data, Evas_Object *obj)
+{
Widget_Data *wd = elm_widget_data_get(data);
Evas_Coord x, y, w, h;
if (!wd) return;
elm_widget_show_region_get(obj, &x, &y, &w, &h);
- elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
- }
- */
+ x += wd->pan_x;
+ y += wd->pan_y;
+ if (y > 0) elm_smart_scroller_child_region_show(wd->scr, x, y, w, h);
+}
static void
_sizing_eval(Evas_Object *obj)
}
it->hilighted = EINA_TRUE;
if (it->wd->select_all_item) evas_object_raise(it->wd->select_all_item->base.view);
-
}
static void
itb->items = eina_list_remove(itb->items, it);
itb->count--;
itb->changed = EINA_TRUE;
- if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
- it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
+ if (!it->wd->reorder_deleted)
+ {
+ if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
+ it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
+ }
if (itb->count < 1)
{
il = EINA_INLIST_GET(itb);
if (it == it->wd->select_all_item)
{
if(it->wd->select_all_check)
- _select_all_down_process(it->wd->select_all_item, EINA_FALSE);
+ _select_all_down_process(it->wd->select_all_item, EINA_FALSE, EINA_TRUE);
else
- _select_all_down_process(it->wd->select_all_item, EINA_TRUE);
+ _select_all_down_process(it->wd->select_all_item, EINA_TRUE, EINA_TRUE);
return;
}
if (it->selected)
evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
if (it->wd->select_all_item)
sel_all_h = it->wd->select_all_item->h;
- if (it_y < oy + sel_all_h)
- {
- evas_object_move(it->base.view, it->scrl_x+it->pad_left,oy + sel_all_h);
- _effect_item_controls(it, it->scrl_x, oy + sel_all_h);
- }
- else if (it_y + it->wd->reorder_it->h > oy+oh)
- {
- evas_object_move(it->base.view, it->scrl_x+it->pad_left, oy + oh - it->wd->reorder_it->h);
- _effect_item_controls(it, it->scrl_x, oy + oh - it->wd->reorder_it->h);
- }
- else
- {
- evas_object_move(it->base.view, it->scrl_x+it->pad_left, it_y);
- _effect_item_controls(it, it->scrl_x, it_y);
- }
+ if (it_y < oy + sel_all_h) _effect_item_controls(it, it->scrl_x, oy + sel_all_h);
+ else if (it_y + it->wd->reorder_it->h > oy+oh) _effect_item_controls(it, it->scrl_x, oy + oh - it->wd->reorder_it->h);
+ else _effect_item_controls(it, it->scrl_x, it_y);
+
if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
}
static Eina_Bool
_long_press(void *data)
{
- Elm_Genlist_Item *it = data , *it_tmp;
+ Elm_Genlist_Item *it = data;
+ Elm_Genlist_Item *it_tmp;
static Eina_Bool done = EINA_FALSE;
//static Eina_Bool contracted = EINA_FALSE;
Eina_List *l;
{
it->wd->reorder_it = it;
it->wd->reorder_start_y = 0;
+ evas_object_raise(it->edit_obj);
elm_smart_scroller_hold_set(it->wd->scr, EINA_TRUE);
edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_start", "elm");
_effect_item_move_after(it->wd->reorder_it, it->wd->reorder_rel);
}
}
- it->wd->reorder_it = it->wd->reorder_rel = NULL;
- elm_smart_scroller_hold_set(it->wd->scr, EINA_FALSE);
- edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_end", "elm");
-
- if (it->wd->calc_job) ecore_job_del(it->wd->calc_job);
- it->wd->calc_job = ecore_job_add(_calc_job, it->wd);
- }
- }
+ it->wd->reorder_deleted = EINA_FALSE;
+ it->wd->reorder_it = it->wd->reorder_rel = NULL;
+ elm_smart_scroller_hold_set(it->wd->scr, EINA_FALSE);
+ edje_object_signal_emit(it->edit_obj, "elm,action,item,reorder_end", "elm");
+ }
+ }
if (it->wd->longpressed)
{
it->wd->longpressed = EINA_FALSE;
it->wd->item_cache_count++;
itc = calloc(1, sizeof(Item_Cache));
+ if (!itc) return;
it->wd->item_cache = eina_inlist_prepend(it->wd->item_cache,
EINA_INLIST_GET(itc));
itc->spacer = it->spacer;
int in,
int calc)
{
- if ((it->realized) || (it->delete_me)) return;
-
Elm_Genlist_Item *it2;
const char *stacking;
const char *treesize;
int depth, tsize = 20;
Item_Cache *itc = NULL;
+ if ((it->realized) || (it->delete_me)) return;
it->order_num_in = in;
-
+ if (it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) calc = EINA_FALSE;
if (it->nocache)
it->nocache = EINA_FALSE;
else
itc = _item_cache_find(it);
- if (!it->wd->effect_mode && itc)
+ if ((!it->wd->effect_mode) && (itc))
{
it->base.view = itc->base_view;
itc->base_view = NULL;
}
}
if (it->sweeped)
- {
- _create_sweep_objs(it);
- }
+ _create_sweep_objs(it);
if (!it->mincalcd)
{
Evas_Coord mw = -1, mh = -1;
if (itc) _item_cache_free(itc);
evas_object_smart_callback_call(it->base.widget, "realized", it);
-
- if ((it->wd->edit_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP) && (!calc)) _effect_item_realize(it);
+ if ((it->wd->edit_mode) && (it->flags != ELM_GENLIST_ITEM_GROUP) && ((!it->wd->select_all_item) || ((it->wd->select_all_item) && (it != it->wd->select_all_item))))
+ {
+ _effect_item_realize(it, EINA_FALSE);
+ edje_object_message_signal_process(it->edit_obj);
+ }
}
static void
if (!it->realized) return;
if (it->wd->reorder_it && it->wd->reorder_it == it) return;
-
+ if (!it->wd->edit_mode && it->hilighted) return;
evas_object_smart_callback_call(it->base.widget, "unrealized", it);
if (it->long_timer)
{
evas_object_del(it->spacer);
it->spacer = NULL;
}
- else
+ else
_item_cache_add(it);
elm_widget_stringlist_free(it->labels);
it->labels = NULL;
it->states = NULL;
it->realized = EINA_FALSE;
it->want_unrealize = EINA_FALSE;
-
+ if (it->wd->edit_field && it->renamed)
+ elm_genlist_item_rename_mode_set(it, EINA_FALSE);
if (it->wd->edit_mode != ELM_GENLIST_EDIT_MODE_NONE) _effect_item_unrealize(it);
}
down = EINA_FALSE;
}
- evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
- evas_object_move(it->base.view, it->scrl_x+it->pad_left, it->old_scrl_y);
- evas_object_show(it->base.view);
-
_effect_item_controls(it, it->scrl_x, it->old_scrl_y);
_group_items_recalc(it->wd);
if (!it->wd->reorder_it || it->wd->reorder_pan_move)
{
- it->old_scrl_y = it->scrl_y;
- it->move_effect_me = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
+ it->old_scrl_y = it->scrl_y;
+ it->move_effect_me = EINA_FALSE;
+ it->wd->item_moving_effect_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
if ((down && it->old_scrl_y >= it->scrl_y) || (!down && it->old_scrl_y <= it->scrl_y))
- {
- it->old_scrl_y = it->scrl_y;
- it->move_effect_me = EINA_FALSE;
- return ECORE_CALLBACK_CANCEL;
- }
+ {
+ it->old_scrl_y = it->scrl_y;
+ it->move_effect_me = EINA_FALSE;
+ it->wd->item_moving_effect_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
return ECORE_CALLBACK_RENEW;
}
Elm_Genlist_Item *it;
Elm_Genlist_Item *git;
Evas_Coord y = 0, ox, oy, ow, oh, cvx, cvy, cvw, cvh;
- int vis = 0, sel_all_h = 0;
+ int vis = 0;
+ int sel_all_h = 0;
Elm_Genlist_Item *select_all_item = NULL;
evas_object_geometry_get(itb->wd->pan_smart, &ox, &oy, &ow, &oh);
if (itb->wd->select_all_item &&
(itb->wd->edit_mode & ELM_GENLIST_EDIT_MODE_SELECT || itb->wd->edit_mode & ELM_GENLIST_EDIT_MODE_SELECTALL))
{
- if (itb->wd->select_all_check)
- edje_object_signal_emit(itb->wd->select_all_item->base.view, "elm,state,del_confirm", "elm");
- else
- edje_object_signal_emit(itb->wd->select_all_item->base.view, "elm,state,del,animated,enable", "elm");
+ if (itb->wd->select_all_check)
+ edje_object_signal_emit(itb->wd->select_all_item->base.view, "elm,state,sel_check", "elm");
+ else
+ edje_object_signal_emit(itb->wd->select_all_item->base.view, "elm,state,sel_uncheck", "elm");
select_all_item = itb->wd->select_all_item;
y = select_all_item->h;
sel_all_h = select_all_item->h;
}
-
+
EINA_LIST_FOREACH(itb->items, l, it)
{
if (it->delete_me) continue;
else if (it->wd->reorder_it && it->wd->reorder_it == it) continue;
-
+
it->x = 0;
it->y = y;
it->w = itb->w;
it->scrl_x = itb->x + it->x - it->wd->pan_x + ox;
it->scrl_y = itb->y + it->y - it->wd->pan_y + oy;
- if (it->flags != ELM_GENLIST_ITEM_GROUP || (it->wd->reorder_it ))
vis = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h,
cvx, cvy, cvw, cvh));
if (it->flags != ELM_GENLIST_ITEM_GROUP || (it->wd->reorder_it ))
it->move_effect_me = EINA_TRUE;
it->item_moving_effect_timer = ecore_animator_add(_reorder_item_moving_effect_timer_cb, it);
}
-
+
}
- if (!it->move_effect_me )
- if (!it->wd->effect_mode || (it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE) || (it->parent == it->wd->expand_item))
- {
- _effect_item_controls(it, it->scrl_x, it->scrl_y);
- evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
- evas_object_move(it->base.view, it->scrl_x+it->pad_left, it->scrl_y);
- if(!it->wd->effect_mode || (it->expanded_depth == 0) || (it->parent != it->wd->expand_item) || it->effect_done || (it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE))
- evas_object_show(it->base.view);
- else
- evas_object_hide(it->base.view);
- it->old_scrl_x = it->scrl_x;
- it->old_scrl_y = it->scrl_y;
- }
+ if (!it->move_effect_me )
+ if (!it->wd->effect_mode || it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE || ((it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE) && it->parent == it->wd->expand_item))
+ {
+ if (it->wd->edit_mode != ELM_GENLIST_EDIT_MODE_NONE)
+ {
+ _effect_item_controls(it, it->scrl_x, it->scrl_y);
+ }
+ else
+ {
+ evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
+ evas_object_move(it->base.view, it->scrl_x+it->pad_left, it->scrl_y);
+ if((!it->wd->effect_mode || it->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_NONE) || ((it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_NONE) && (it->old_scrl_y == it->scrl_y)))
+ evas_object_show(it->base.view);
+ else
+ evas_object_hide(it->base.view);
+ }
+ it->old_scrl_x = it->scrl_x;
+ it->old_scrl_y = it->scrl_y;
+ }
}
else
{
}
else
{
- if (vis) it->want_realize = EINA_TRUE;
+ if (vis) it->want_realize = EINA_TRUE;
}
y += it->h;
}
-
}
static void
itb->h = itb->minh;
y += itb->h;
in += itb->count;
- if ((showme) && (wd->show_item))
+ if ((showme) && (wd->show_item) && (!wd->show_item->queued))
{
wd->show_item->showme = EINA_FALSE;
if (wd->bring_in)
}
wd->realminw = minw;
if (minw < wd->w) minw = wd->w;
- if ((minw != wd->minw) || (minh != wd->minh)|| wd->select_all_item)
+ if ((minw != wd->minw) || (minh != wd->minh) || (wd->select_all_item))
{
wd->minw = minw;
wd->minh = minh;
if (wd->select_all_item)
wd->minh += wd->select_all_item->h;
- evas_object_smart_callback_call(wd->pan_smart, "changed", NULL);
+ if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
+ evas_object_smart_callback_call(wd->pan_smart, "changed", NULL);
_sizing_eval(wd->obj);
-#ifdef ANCHOR_ITEM
+#ifdef ANCHOR_ITEM
if ((wd->anchor_item) && (wd->anchor_item->block) && (!wd->auto_scrolled))
{
Elm_Genlist_Item *it;
Evas_Coord y)
{
Pan *sd = evas_object_smart_data_get(obj);
- Item_Block *itb;
+ //Item_Block *itb;
// Evas_Coord ow, oh;
// evas_object_geometry_get(obj, NULL, NULL, &ow, &oh);
}
done:
#endif
- evas_object_smart_changed(obj);
+ if(!sd->wd->item_moving_effect_timer) evas_object_smart_changed(obj);
}
static void
{
if (sd->wd->pan_y != old_pan_y) sd->wd->reorder_pan_move = EINA_TRUE;
else sd->wd->reorder_pan_move = EINA_FALSE;
- evas_object_raise(sd->wd->reorder_it->base.view);
+ evas_object_raise(sd->wd->reorder_it->edit_obj);
old_pan_y = sd->wd->pan_y;
}
if (sd->wd->effect_mode &&
- (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND || sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT))
+ ((sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND) ||
+ (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT) ||
+ (sd->wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)))
{
- _item_flip_effect_show(sd->wd->expand_item);
- evas_object_raise(sd->wd->alpha_bg);
- evas_object_show(sd->wd->alpha_bg);
- sd->wd->start_time = current_time_get();
- sd->wd->item_moving_effect_timer = ecore_animator_add(_item_moving_effect_timer_cb, sd->wd);
+ if (!sd->wd->item_moving_effect_timer)
+ {
+ if (sd->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
+ _item_flip_effect_show(sd->wd->expand_item);
+
+ evas_object_raise(sd->wd->alpha_bg);
+ evas_object_show(sd->wd->alpha_bg);
+ elm_smart_scroller_bounce_animator_disabled_set(sd->wd->scr, EINA_TRUE);
+ sd->wd->start_time = current_time_get();
+ sd->wd->item_moving_effect_timer = ecore_animator_add(_item_moving_effect_timer_cb, sd->wd);
+ }
}
else _item_auto_scroll(sd->wd);
if (sd->wd->select_all_item) evas_object_raise(sd->wd->select_all_item->base.view);
elm_widget_theme_hook_set(obj, _theme_hook);
elm_widget_can_focus_set(obj, EINA_TRUE);
elm_widget_event_hook_set(obj, _event_hook);
+ elm_widget_on_show_region_hook_set(obj, _show_region_hook, obj);
wd->scr = elm_smart_scroller_add(e);
elm_smart_scroller_widget_set(wd->scr, obj);
wd->item_cache_max = wd->max_items_per_block * 2;
wd->longpress_timeout = _elm_config->longpress_timeout;
//wd->effect_mode = _elm_config->effect_enable;
- //wd->effect_mode = EINA_TRUE;
-
+// wd->effect_mode = EINA_TRUE;
+
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
it->expanded_depth = 0;
if ((it->parent) && (it->parent->edit_select_check)) it->edit_select_check = EINA_TRUE;
if ((!it->parent) && (it->wd->select_all_item))
- _select_all_down_process(it->wd->select_all_item, EINA_FALSE);
+ _select_all_down_process(it->wd->select_all_item, EINA_FALSE, EINA_FALSE);
it->num = ++wd->total_num; // todo : remov
-
return it;
}
while (wd->items)
{
Elm_Genlist_Item *it = ELM_GENLIST_ITEM_FROM_INLIST(wd->items);
-
+ it->nocache = EINA_TRUE;
+ it->hilighted = EINA_FALSE;
#ifdef ANCHOR_ITEM
if (wd->anchor_item == it)
{
- wd->anchor_item = (Elm_Genlist_Item *)(EINA_INLIST_GET(it)->next);
+ wd->anchor_item = ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->next);
if (!wd->anchor_item)
wd->anchor_item =
- (Elm_Genlist_Item *)(EINA_INLIST_GET(it)->prev);
+ ELM_GENLIST_ITEM_FROM_INLIST(EINA_INLIST_GET(it)->prev);
}
#endif
wd->items = eina_inlist_remove(wd->items, wd->items);
if (it->flags & ELM_GENLIST_ITEM_GROUP)
it->wd->group_items = eina_list_remove(it->wd->group_items, it);
elm_widget_item_pre_notify_del(it);
+ if (it->effect_item_realized) _effect_item_unrealize(it);
if (it->realized) _item_unrealize(it);
if (it->itc->func.del)
- it->itc->func.del((void *)it->base.data, it->base.widget);
+ it->itc->func.del((void *)it->base.data, it->base.widget);
if (it->long_timer) ecore_timer_del(it->long_timer);
if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
elm_widget_item_del(it);
evas_object_del(editfield);
wd->edit_field = NULL;
}
+ if (wd->item_moving_effect_timer)
+ {
+ ecore_animator_del(wd->item_moving_effect_timer);
+ wd->item_moving_effect_timer = NULL;
+ }
+ if (wd->edit_mode)
+ {
+ wd->edit_mode = ELM_GENLIST_EDIT_MODE_NONE;
+ elm_genlist_edit_mode_set(wd->obj, ELM_GENLIST_EDIT_MODE_NONE, NULL);
+ }
wd->show_item = NULL;
wd->pan_x = 0;
wd->pan_y = 0;
_item_subitems_clear(it);
else
{
- if((!it->wd->item_moving_effect_timer) && (it->flags != ELM_GENLIST_ITEM_GROUP))
+ if((!it->wd->item_moving_effect_timer) && (it->flags != ELM_GENLIST_ITEM_GROUP) &&
+ it->wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE )
{
it->wd->expand_item = it;
_item_flip_effect_show(it);
if (!after) return;
if (it->wd->ed->ec->move)
- it->wd->ed->ec->move(it->base.widget, it, it->wd->ed->reorder_rel, EINA_TRUE);
+ it->wd->ed->ec->move(it->base.widget, it, after, EINA_TRUE);
// printf("MOVE AFTER : %d after = %d \n", (int)elm_genlist_item_data_get(it)+1, (int)elm_genlist_item_data_get(after)+1);
it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it));
+ it->wd->reorder_deleted = EINA_TRUE;
_item_block_del(it);
it->wd->items = eina_inlist_append_relative(it->wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(after));
if (!before) return;
if (it->wd->ed->ec->move)
- it->wd->ed->ec->move(it->base.widget, it, it->wd->ed->reorder_rel, EINA_TRUE);
+ it->wd->ed->ec->move(it->base.widget, it, before, EINA_FALSE);
// printf("MOVE BEFORE : %d before = %d \n", (int)elm_genlist_item_data_get(it)+1, (int)elm_genlist_item_data_get(before)+1);
it->wd->items = eina_inlist_remove(it->wd->items, EINA_INLIST_GET(it));
+ it->wd->reorder_deleted = EINA_TRUE;
_item_block_del(it);
it->wd->items = eina_inlist_prepend_relative(it->wd->items, EINA_INLIST_GET(it), EINA_INLIST_GET(before));
it->rel = before;
evas_object_geometry_get(wd->pan_smart, &ox, &oy, &ow, &oh);
evas_output_viewport_get(evas_object_evas_get(wd->pan_smart), &cvx, &cvy, &cvw, &cvh);
-
+ if (t > time) end = EINA_TRUE;
EINA_INLIST_FOREACH(wd->blocks, itb)
{
itb->w = wd->minw;
{
EINA_LIST_FOREACH(itb->items, l, it)
{
- it2 = it;
- check = EINA_FALSE;
- do {
- if(it2->parent == wd->expand_item) check = EINA_TRUE;
- it2 = it2->parent;
- } while(it2);
- if(check) continue;
-
- // printf("item : %p - ", it);
-
+ if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
+ {
+ it2 = it;
+ check = EINA_FALSE;
+ do {
+ if(it2->parent == wd->expand_item) check = EINA_TRUE;
+ it2 = it2->parent;
+ } while(it2);
+ if(check) continue;
+ }
dy = 0;
//printf(" s: %d %d ", oy, oh);
if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
if(wd->expand_item_end < it->old_scrl_y)
dy = wd->expand_item_gap;
}
- // printf(" dy - %d -", dy);
+ else if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE)
+ {
+ if (wd->expand_item_end < it->old_scrl_y)
+ dy = wd->expand_item_gap;
+ }
if (t <= time)
y = (1 * sin((t / time) * (M_PI / 2)) * dy);
else
end = EINA_TRUE;
y = dy;
}
- //printf("s : %d os : %d y : %d t : %2.2f time : %2.2f dy : %d\n", it->scrl_y, it->old_scrl_y, y, t, time, dy);
if (!it->old_scrl_y)
it->old_scrl_y = it->scrl_y;
- //printf(" %d | ", it->old_scrl_y + y);
if (it->old_scrl_y + y < oy + oh)
{
- // printf("%p in pan | ", it);
- //if (!it->realized) printf("%p is not realized %d :: \n", it, it->old_scrl_y + y);
-
if (!it->realized) _item_realize(it, in, 0);
}
- /* else if(first && wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
- {
- printf("1 . %p ::%d %d %d\n", it, it->old_scrl_y, (wd->expand_item_end + wd->expand_item_gap) , (oy + oh));
- it->old_scrl_y = it->old_scrl_y - ((wd->expand_item_end - wd->expand_item_gap) - (oy + oh));
- wd->expand_item_gap = wd->expand_item_gap + ((wd->expand_item_end - wd->expand_item_gap) - (oy + oh));
- printf("2 . %p ::%d %d %d\n", it, it->old_scrl_y, (wd->expand_item_end + wd->expand_item_gap) , (oy + oh));
- }*/
+ if (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE && it->old_scrl_y + y < it->scrl_y)
+ it->old_scrl_y = it->scrl_y - y;
in++;
- // printf("%p :: %d\n", it, it->old_scrl_y + y);
- evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
- evas_object_move(it->base.view, it->scrl_x+it->pad_left, it->old_scrl_y + y);
- evas_object_show(it->base.view);
- evas_object_raise(it->base.view);
+ if (wd->move_effect_mode != ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE ||
+ (wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE && it->old_scrl_y + y >= it->scrl_y))
+ {
+ if (wd->edit_mode) _effect_item_controls(it, it->scrl_x, it->old_scrl_y + y);
+ else
+ {
+ evas_object_resize(it->base.view, it->w-(it->pad_left+it->pad_right), it->h);
+ evas_object_move(it->base.view, it->scrl_x+it->pad_left, it->old_scrl_y + y);
+ evas_object_show(it->base.view);
+ evas_object_raise(it->base.view);
+ }
+
+ if(wd->select_all_item) evas_object_raise(wd->select_all_item->base.view);
+ if (it->group_item) evas_object_raise(it->group_item->base.view);
+ }
if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
{
evas_object_show(it2->base.view);
it2->effect_done = EINA_TRUE;
}
- break;
+ // break;
}
it2 = elm_genlist_item_prev_get(it2);
}
{
if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_CONTRACT)
_item_subitems_clear(wd->expand_item);
- wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_NONE;
EINA_INLIST_FOREACH(wd->blocks, itb)
{
EINA_LIST_FOREACH(itb->items, l, it)
_item_auto_scroll(wd);
evas_object_lower(wd->alpha_bg);
evas_object_hide(wd->alpha_bg);
-
if (wd->calc_job) ecore_job_del(wd->calc_job);
wd->calc_job = ecore_job_add(_calc_job, wd);
+ elm_smart_scroller_bounce_animator_disabled_set(wd->scr, EINA_FALSE);
+ wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_NONE;
+
+ evas_object_smart_callback_call(wd->pan_smart, "changed", NULL);
+ evas_object_smart_callback_call(wd->obj, "effect_done", NULL);
return ECORE_CALLBACK_CANCEL;
}
return ECORE_CALLBACK_RENEW;
{
if(wd->move_effect_mode == ELM_GENLIST_ITEM_MOVE_EFFECT_EXPAND)
{
- // edje_object_signal_emit(it2->base.view, "elm,state,expand_flip", "");
edje_object_signal_emit(it2->base.view, "flip_item", "");
if(check)
evas_object_move(it2->base.view, -9999, -9999);
{
if (it->edit_select_check)
{
- edje_object_signal_emit(it->edit_obj, "elm,state,del_confirm", "elm");
- edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_check", "elm");
}
else
{
- edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
- edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_uncheck", "elm");
}
}
if (edit_select_check_state)
{
it->edit_select_check = EINA_TRUE;
- edje_object_signal_emit(it->edit_obj, "elm,state,del_confirm", "elm");
- edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_check", "elm");
}
else
{
it->edit_select_check = EINA_FALSE;
- edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
- edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_uncheck", "elm");
}
if (it->wd->ed && it->wd->ed->ec && it->wd->ed->ec->item_selected)
it->wd->ed->ec->item_selected(it->base.data, it, it->edit_select_check);
}
static void
-_select_all_down_process(Elm_Genlist_Item *select_all_it, Eina_Bool checked)
+_select_all_down_process(Elm_Genlist_Item *select_all_it, Eina_Bool checked, Eina_Bool update_items)
{
if (!select_all_it || !select_all_it->wd) return;
wd->select_all_check = checked;
if (wd->select_all_check)
- edje_object_signal_emit(select_all_it->base.view, "elm,state,del_confirm", "elm");
+ edje_object_signal_emit(select_all_it->base.view, "elm,state,sel_check", "elm");
else
- edje_object_signal_emit(select_all_it->base.view, "elm,state,del,animated,enable", "elm");
+ edje_object_signal_emit(select_all_it->base.view, "elm,state,sel_uncheck", "elm");
- EINA_INLIST_FOREACH(wd->items, it)
+ if (update_items)
{
- old_check_state = it->edit_select_check;
- if (wd->select_all_check) it->edit_select_check = EINA_TRUE;
- else it->edit_select_check = EINA_FALSE;
+ EINA_INLIST_FOREACH(wd->items, it)
+ {
+ old_check_state = it->edit_select_check;
+ if (wd->select_all_check) it->edit_select_check = EINA_TRUE;
+ else it->edit_select_check = EINA_FALSE;
// TODO : check this
-// if (old_check_state != it->edit_select_check && it->wd->ed && it->wd->ed->ec && it->wd->ed->ec->item_selected)
-// it->wd->ed->ec->item_selected(it->base.data, it, it->edit_select_check);
+ // if (old_check_state != it->edit_select_check && it->wd->ed && it->wd->ed->ec && it->wd->ed->ec->item_selected)
+ // it->wd->ed->ec->item_selected(it->base.data, it, it->edit_select_check);
+ }
}
if (wd->ed->ec->item_selected)
if (it->wd->ed) it->wd->ed->del_item = it;
- if (it->edit_select_check)
- edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
- else
- edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
-
EINA_INLIST_FOREACH(it->wd->items, tmp_it)
{
if (tmp_it->edit_select_check) check_cnt++;
if (check_cnt == total_cnt)
{
it->wd->select_all_check = EINA_TRUE;
- edje_object_signal_emit(it->wd->select_all_item->base.view, "elm,state,del_confirm", "elm");
+ edje_object_signal_emit(it->wd->select_all_item->base.view, "elm,state,sel_check", "elm");
}
else
{
it->wd->select_all_check = EINA_FALSE;
- edje_object_signal_emit(it->wd->select_all_item->base.view, "elm,state,del,animated,enable", "elm");
+ edje_object_signal_emit(it->wd->select_all_item->base.view, "elm,state,sel_uncheck", "elm");
}
-
- if (old_check_state != it->wd->select_all_check && it->wd->ed && it->wd->ed->ec && it->wd->ed->ec->item_selected)
- it->wd->ed->ec->item_selected(it->wd->select_all_item->base.data, it->wd->select_all_item, it->wd->select_all_check);
}
}
Widget_Data *wd = select_all_it->wd;
if (!wd) return;
- _select_all_down_process(select_all_it, !wd->select_all_check);
+ _select_all_down_process(select_all_it, !wd->select_all_check, EINA_TRUE);
}
return;
evas_object_resize(it->edit_obj,it->w, it->h);
evas_object_move(it->edit_obj, itx, ity);
- evas_object_raise(it->edit_obj);
if (it->wd->select_all_check)
it->edit_select_check = EINA_TRUE;
{
if (it->edit_select_check)
{
- edje_object_signal_emit(it->base.view, "elm,state,disabled", "elm");
- edje_object_signal_emit(it->edit_obj, "elm,state,del_confirm", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_check", "elm");
}
else
{
- edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
- edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_uncheck", "elm");
}
}
}
static void
-_effect_item_realize(Elm_Genlist_Item *it)
+_effect_item_realize(Elm_Genlist_Item *it, Eina_Bool effect_on)
{
if ((it->effect_item_realized) || (it->delete_me)) return;
int itmode = 0, pad = 0;
if ((itmode & ELM_GENLIST_EDIT_MODE_DELETE) || (itmode & ELM_GENLIST_EDIT_MODE_SELECT))
{
- edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
- edje_object_signal_callback_del(it->edit_obj, "elm,action,item,delete",
+ if (effect_on) edje_object_signal_emit(it->edit_obj, "elm,state,sel,enable_effect", "elm");
+ else edje_object_signal_emit(it->edit_obj, "elm,state,sel,enable", "elm");
+
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_uncheck", "elm");
+ edje_object_signal_callback_del(it->edit_obj, "elm,action,item,select",
"elm", _checkbox_item_select_cb);
- edje_object_signal_callback_add(it->edit_obj, "elm,action,item,delete",
+ edje_object_signal_callback_add(it->edit_obj, "elm,action,item,select",
"elm", _checkbox_item_select_cb, it);
it->pad_left += pad * _elm_config->scale;
}
else
{
- edje_object_signal_emit(it->edit_obj, "elm,state,del,disable", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel,disable", "elm");
- edje_object_signal_callback_del(it->edit_obj, "elm,action,item,delete",
+ edje_object_signal_callback_del(it->edit_obj, "elm,action,item,select",
"elm", _checkbox_item_select_cb);
}
+ if (effect_on && itmode & ELM_GENLIST_EDIT_MODE_REORDER)
+ {
+ edje_object_signal_emit(it->edit_obj, "elm,state,reorder_enable_effect", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel,enable", "elm");
+ }
+ else if (itmode & ELM_GENLIST_EDIT_MODE_REORDER)
+ edje_object_signal_emit(it->edit_obj, "elm,state,reorder_enable", "elm");
+
if ((it->wd->edit_mode) || (!it->wd->edit_mode && it->renamed))
{
if (it->itc->func.icon_get)
}
}
}
-
+ edje_object_part_swallow(it->edit_obj, "original_edc", it->base.view);
_effect_item_controls(it,it->scrl_x, it->scrl_y);
evas_object_show(it->edit_obj);
static void
_effect_item_unrealize(Elm_Genlist_Item *it)
{
- Evas_Object *icon, *editfield;
+ Evas_Object *icon;
if (!it->effect_item_realized) return;
if (it->wd->reorder_it && it->wd->reorder_it == it) return;
it->pad_left = it->pad_right = 0;
+ edje_object_signal_emit(it->edit_obj, "elm,state,reorder_disable_effect", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel,disable", "elm");
+ edje_object_message_signal_process(it->edit_obj);
+ edje_object_part_unswallow(it->edit_obj, it->base.view);
+ evas_object_smart_member_add(it->base.view, it->wd->pan_smart);
+ elm_widget_sub_object_add(it->base.widget, it->base.view);
// evas_object_smart_callback_call(it->edit_obj, "unrealized", it);
// _item_cache_add(it);
evas_object_del(it->edit_obj);
EINA_LIST_FREE(it->edit_icon_objs, icon)
evas_object_del(icon);
- edje_object_signal_emit(it->edit_obj, "elm,state,edit_end,disable", "elm");
+// edje_object_signal_emit(it->edit_obj, "elm,state,edit_end,disable", "elm");
it->effect_item_realized = EINA_FALSE;
}
}
/**
+ * Get Genlist edit mode
+ *
+ * @param obj The genlist object
+ * @return The edit mode status
+ * (EINA_TRUE = edit mode, EINA_FALSE = normal mode
+ *
+ * @ingroup Genlist
+ */
+EAPI Eina_Bool
+elm_genlist_edit_mode_get(const Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+
+ if (wd->edit_mode) return EINA_TRUE;
+ else return EINA_FALSE;
+}
+
+/**
* Set Genlist edit mode
*
* This sets Genlist edit mode.
if (it->flags != ELM_GENLIST_ITEM_GROUP && it->realized)
{
it->pad_left = it->pad_right = 0;
- if (it->realized) _effect_item_unrealize(it);
- edje_object_signal_emit(it->base.view, "elm,state,enabled", "elm");
+ _effect_item_unrealize(it);
}
}
}
if (done) break;
}
}
+
+ EINA_INLIST_FOREACH(wd->items, it)
+ {
+ it->edit_select_check = EINA_FALSE;
+ }
if (wd->ed) free (wd->ed);
wd->ed = NULL;
wd->reorder_mode = EINA_FALSE;
if (wd->select_all_item)
{
wd->select_all_check = EINA_FALSE;
- edje_object_signal_callback_del(wd->select_all_item->base.view, "elm,action,select,press", "elm", _select_all_down);
+ edje_object_signal_callback_del(wd->select_all_item->base.view, "elm,action,select,click", "elm", _select_all_down);
elm_widget_item_pre_notify_del(wd->select_all_item);
_item_unrealize(wd->select_all_item);
elm_widget_item_del(wd->select_all_item);
-
- EINA_INLIST_FOREACH(wd->items, it)
- {
- if (wd->select_all_check) it->edit_select_check = EINA_TRUE;
- else it->edit_select_check = EINA_FALSE;
- }
}
wd->select_all_item = NULL;
if (wd->edit_field)
evas_object_del(editfield);
wd->edit_field = NULL;
}
+ _item_cache_zero(wd);
}
else
{
if (it->flags != ELM_GENLIST_ITEM_GROUP && it->realized)
{
if(it->selected) _item_unselect(it);
- _effect_item_realize(it);
+ _effect_item_realize(it, EINA_TRUE);
}
}
}
if (!wd->select_all_item) return;
_item_realize(wd->select_all_item, 0, 0);
-// edje_object_signal_callback_add(wd->select_all_item->base.view, "elm,action,select,press", "elm", _select_all_down, wd->select_all_item);
+ edje_object_signal_callback_add(wd->select_all_item->base.view, "elm,action,select,click", "elm", _select_all_down, wd->select_all_item);
wd->select_all_item->rel = NULL;
wd->select_all_item->block = NULL;
Elm_Genlist_Item *it;
Eina_List *edit_selected_list, *l;
int cnt = 0;
+ Item_Block *itb;
+
+ Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh;
+ int vis = 0;
+ if (wd->edit_field) return;
+ evas_object_geometry_get(wd->pan_smart, &ox, &oy, &ow, &oh);
+ evas_output_viewport_get(evas_object_evas_get(wd->obj), &cvx, &cvy,&cvw, &cvh);
+ EINA_INLIST_FOREACH(wd->blocks, itb)
+ {
+ if (ELM_RECTS_INTERSECT(itb->x - wd->pan_x + ox,
+ itb->y - wd->pan_y + oy,
+ itb->w, itb->h,
+ cvx, cvy, cvw, cvh))
+ EINA_LIST_FOREACH(itb->items, l, it)
+ {
+ it->old_scrl_y =itb->y + it->y - it->wd->pan_y + oy;
+ }
+ }
edit_selected_list = elm_genlist_edit_selected_items_get(obj);
cnt = eina_list_count(edit_selected_list);
// printf("elm_genlist_edit_selected_items_del items selected counts = %d \n", cnt);
+ wd->expand_item_gap = wd->expand_item_end = 0;
EINA_LIST_FOREACH(edit_selected_list, l, it)
{
- if (it->flags != ELM_GENLIST_ITEM_GROUP) elm_genlist_item_del(it);
+ if (it->flags != ELM_GENLIST_ITEM_GROUP)
+ {
+ it->wd->expand_item_gap += it->h * -1;
+ vis = (ELM_RECTS_INTERSECT(it->scrl_x, it->scrl_y, it->w, it->h,
+ cvx, cvy, cvw, cvh));
+ if (!it->wd->expand_item_end && vis ) it->wd->expand_item_end = it->old_scrl_y;
+ it->wd->expand_item = elm_genlist_item_prev_get(it);
+ elm_genlist_item_del(it);
+ }
}
+ wd->move_effect_mode = ELM_GENLIST_ITEM_MOVE_EFFECT_DELETE;
eina_list_free(edit_selected_list);
evas_render(evas_object_evas_get(wd->obj));
selected = !!selected;
if (it->edit_select_check == selected) return;
- if (it->wd->edit_mode)
- {
- it->edit_select_check = selected;
- _checkbox_item_select_process(it);
- }
+ it->edit_select_check = selected;
+ _checkbox_item_select_process(it);
}
// TODO : add comment
EAPI Evas_Object *
elm_genlist_item_rename_mode_set(Elm_Genlist_Item *it, int emode)
{
- if (!it) return;
+ if (!it) return NULL;
+ if (it->wd->queue_idler) return NULL;
const Eina_List *l, *list, *l2;
const char *label, *rename_swallow_part;
edje_object_signal_emit(it->edit_obj, "elm,state,edit_end,enable", "elm");
edje_object_signal_emit(it->edit_obj, "elm,state,rename,disable", "elm");
if (it->wd->edit_mode & ELM_GENLIST_EDIT_MODE_SELECT)
- edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
+ edje_object_signal_emit(it->edit_obj, "elm,state,sel_uncheck", "elm");
}
if(!it->wd->edit_mode) _effect_item_unrealize(it);
if (it->wd->edit_mode == ELM_GENLIST_EDIT_MODE_NONE)
{
it->wd->edit_mode = 0xF0;
- _effect_item_realize(it);
+ _effect_item_realize(it, EINA_TRUE);
it->wd->edit_mode = ELM_GENLIST_EDIT_MODE_NONE;
}
+ edje_object_signal_emit(it->edit_obj, "elm,state,rename,enable", "elm");
EINA_LIST_FOREACH(it->labels, list, label)
{
- edje_object_signal_emit(it->edit_obj, "elm,state,rename,enable", "elm");
- edje_object_signal_emit(it->edit_obj, "elm,state,ins,disable", "elm");
- edje_object_signal_emit(it->edit_obj, "elm,state,del,disable", "elm");
- edje_object_signal_emit(it->edit_obj, "elm,state,edit_end,disable", "elm");
-
if (it->itc->func.label_get)
{
swallow_part_cnt = 0;
{
entry = elm_editfield_entry_get(editfield);
elm_entry_entry_set(entry,s);
+ elm_entry_cursor_end_set(entry);
free(s);
}
else
}
label_cnt++;
}
- }
+ }
+ elm_widget_focused_object_clear(elm_widget_focused_object_get(it->wd->obj));
+ elm_widget_focus_set(editfield, EINA_TRUE);
}
return entry;
}
}
}
-}
-
+}
\ No newline at end of file