static void
_remove_item_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
- const char *del_icon_part, *del_conf_style;
+ const char *del_conf_style;
Elm_Genlist_Item *it = data;
if(_edit_mode_reset( it->wd ))
return;
_reorder_mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_info)
{
Elm_Genlist_Item *it = data;
- Evas_Event_Mouse_Up *ev = event_info;
Item_Block *itb;
EINA_INLIST_FOREACH(it->wd->blocks, itb)
Widget_Data *wd = it->wd;
if (!wd) return;
- Eina_List *realized_list = elm_genlist_realized_items_get(wd->obj);
-
if(!wd->selct_all)
edje_object_signal_emit(it->base, "elm,state,del_confirm", "elm");
else
it->pad_left = 0;
it->pad_right = 0;
Evas_Object *icon;
+ char buf[1024];
+
if( it->wd->edit_mode == ELM_GENLIST_EDIT_MODE_NONE && !it->edit_obj )
return;
_elm_config->scale);
evas_object_smart_member_add(it->edit_obj, it->wd->pan_smart);
elm_widget_sub_object_add(it->wd->obj, it->edit_obj);
- _elm_theme_object_set(it->wd->obj, it->edit_obj, "genlist", "item/edit_control", elm_widget_style_get(it->wd->obj));
+ if (it->flags & ELM_GENLIST_ITEM_SUBITEMS) strncpy(buf, "tree", sizeof(buf));
+ else strncpy(buf, "item", sizeof(buf));
+ if (it->wd->compress) strncat(buf, "_compress", sizeof(buf) - strlen(buf));
+ // if (in & 0x1) strncat(buf, "_odd", sizeof(buf) - strlen(buf));
+ strncat(buf, "/", sizeof(buf) - strlen(buf));
+
+ if(it->wd->ed->ec->item_style && strcmp(it->wd->ed->ec->item_style, "default"))
+ {
+ strncat(buf, it->wd->ed->ec->item_style, sizeof(buf) - strlen(buf));
+ _elm_theme_object_set(it->wd->obj, it->edit_obj, "genlist", buf, elm_widget_style_get(it->wd->obj));
+ }
+ else
+ {
+ _elm_theme_object_set(it->wd->obj, it->edit_obj, "genlist", "item/edit_control", elm_widget_style_get(it->wd->obj));
+ }
edje_object_signal_callback_add(it->edit_obj, "elm,action,edit,reset",
"elm", _edit_mode_reset, it);
else
edje_object_signal_emit(it->edit_obj, "elm,state,del,enable", "elm");
+ edje_object_signal_callback_del(it->edit_obj, "elm,action,item,delete",
+ "elm", _remove_item_cb );
+ edje_object_signal_callback_del(it->edit_obj, "elm,action,hide,del_confirm",
+ "elm", _hide_delete_confirm_object );
+
edje_object_signal_callback_add(it->edit_obj, "elm,action,item,delete",
"elm", _remove_item_cb, it);
edje_object_signal_callback_add(it->edit_obj, "elm,action,hide,del_confirm",
"elm", _hide_delete_confirm_object, it );
it->pad_left += pad;
- evas_object_event_callback_add(it->edit_obj, EVAS_CALLBACK_MOUSE_DOWN,
+ evas_object_event_callback_add(it->edit_obj, EVAS_CALLBACK_MOUSE_DOWN,
_reorder_mouse_down, it);
}
else
{
reorder_icon = edje_object_part_object_get(it->edit_obj, reorder_part );
+ evas_object_event_callback_del(it->edit_obj, EVAS_CALLBACK_MOUSE_DOWN,
+ _reorder_mouse_down);
+ evas_object_event_callback_del(it->edit_obj, EVAS_CALLBACK_MOUSE_UP,
+ _reorder_mouse_up);
+ evas_object_event_callback_del(it->edit_obj, EVAS_CALLBACK_MOUSE_MOVE,
+ _reorder_mouse_move);
+
evas_object_event_callback_add(it->edit_obj, EVAS_CALLBACK_MOUSE_DOWN,
_reorder_mouse_down, it);
evas_object_event_callback_add(it->edit_obj, EVAS_CALLBACK_MOUSE_UP,
if (wd->edit_mode & ELM_GENLIST_EDIT_MODE_SELECTALL)
{
- itc.item_style = "select_all";
+ if(edit_class->select_all_item_style && strcmp(edit_class->select_all_item_style, "default"))
+ itc.item_style = edit_class->select_all_item_style;
+ else
+ itc.item_style = "select_all";
itc.func.label_get = NULL;
itc.func.icon_get = NULL;
itc.func.del = NULL;
EAPI void
elm_genlist_edit_selected_items_del(Evas_Object *obj)
{
- Elm_Genlist_Item *it;
- Eina_List *l, *realized_list;
- Item_Block *itb;
+ Elm_Genlist_Item *it;
+ Eina_List *l;
+ Item_Block *itb = NULL;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
-
+ if(!wd->blocks) return;
+
EINA_INLIST_FOREACH(wd->blocks, itb)
{
- if (itb->realized)
+ if(!wd->blocks) break;
+
+ if (itb && itb->realized)
{
EINA_LIST_FOREACH(itb->items, l, it)
{
if (it->delete_check)
- elm_genlist_item_del( it );
+ {
+ if(!wd->selct_all)
+ {
+ itb->wd->minh -= it->h;
+ itb->wd->select_all_minh -= it->h;
+ }
+ elm_genlist_item_del( it );
+ }
}
}
}