Elm_Object_Select_Mode select_mode;
int walking;
int movements;
- struct {
+ struct
+ {
Evas_Coord x, y;
- } history[SWIPE_MOVES];
+ } history[SWIPE_MOVES];
Eina_Bool scr_minw : 1;
Eina_Bool scr_minh : 1;
Eina_Bool swipe : 1;
eina_stringshare_del(it->label);
if (it->swipe_timer) ecore_timer_del(it->swipe_timer);
+ it->swipe_timer = NULL;
if (it->long_timer) ecore_timer_del(it->long_timer);
+ it->long_timer = NULL;
if (it->icon) evas_object_del(it->icon);
if (it->end) evas_object_del(it->end);
}
/* TODO: fix logic for horizontal mode */
if ((!strcmp(ev->keyname, "Left")) ||
- (!strcmp(ev->keyname, "KP_Left")))
+ ((!strcmp(ev->keyname, "KP_Left")) && !ev->string))
{
if ((wd->h_mode) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
x -= step_x;
}
else if ((!strcmp(ev->keyname, "Right")) ||
- (!strcmp(ev->keyname, "KP_Right")))
+ ((!strcmp(ev->keyname, "KP_Right")) && !ev->string))
{
if ((wd->h_mode) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
x += step_x;
}
else if ((!strcmp(ev->keyname, "Up")) ||
- (!strcmp(ev->keyname, "KP_Up")))
+ ((!strcmp(ev->keyname, "KP_Up")) && !ev->string))
{
if ((!wd->h_mode) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
y -= step_y;
}
else if ((!strcmp(ev->keyname, "Down")) ||
- (!strcmp(ev->keyname, "KP_Down")))
+ ((!strcmp(ev->keyname, "KP_Down")) && !ev->string))
{
if ((!wd->h_mode) &&
(((evas_key_modifier_is_set(ev->modifiers, "Shift")) &&
y += step_y;
}
else if ((!strcmp(ev->keyname, "Home")) ||
- (!strcmp(ev->keyname, "KP_Home")))
+ ((!strcmp(ev->keyname, "KP_Home")) && !ev->string))
{
it = eina_list_data_get(wd->items);
elm_list_item_bring_in((Elm_Object_Item *)it);
return EINA_TRUE;
}
else if ((!strcmp(ev->keyname, "End")) ||
- (!strcmp(ev->keyname, "KP_End")))
+ ((!strcmp(ev->keyname, "KP_End")) && !ev->string))
{
it = eina_list_data_get(eina_list_last(wd->items));
elm_list_item_bring_in((Elm_Object_Item *)it);
return EINA_TRUE;
}
else if ((!strcmp(ev->keyname, "Prior")) ||
- (!strcmp(ev->keyname, "KP_Prior")))
+ ((!strcmp(ev->keyname, "KP_Prior")) && !ev->string))
{
if (wd->h_mode)
{
}
}
else if ((!strcmp(ev->keyname, "Next")) ||
- (!strcmp(ev->keyname, "KP_Next")))
+ ((!strcmp(ev->keyname, "KP_Next")) && !ev->string))
{
if (wd->h_mode)
{
_del_pre_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ const Eina_List *l;
+ Elm_List_Item *it;
+
+ evas_object_smart_callback_del(obj, "sub-object-del", _sub_del);
+
if (!wd) return;
+ EINA_LIST_FOREACH(wd->items, l, it)
+ {
+ if (it->icon)
+ evas_object_event_callback_del(it->icon,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints);
+ if (it->end)
+ evas_object_event_callback_del(it->end,
+ EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _changed_size_hints);
+ }
+
evas_object_event_callback_del(wd->scr,
EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints);
}
static void
-_item_content_set(Elm_Object_Item *it, const char *part, Evas_Object *content)
+_item_content_set_hook(Elm_Object_Item *it, const char *part, Evas_Object *content)
{
Elm_List_Item *item = (Elm_List_Item *)it;
Evas_Object **icon_p = NULL;
{
icon_p = &(item->icon);
dummy = item->dummy_icon;
- if (!content) item->dummy_icon = EINA_FALSE;
- else item->dummy_icon = EINA_TRUE;
+ if (!content) item->dummy_icon = EINA_TRUE;
+ else item->dummy_icon = EINA_FALSE;
}
else if (!strcmp(part, "end"))
{
icon_p = &(item->end);
dummy = item->dummy_end;
- if (!content) item->dummy_end = EINA_FALSE;
- else item->dummy_end = EINA_TRUE;
+ if (!content) item->dummy_end = EINA_TRUE;
+ else item->dummy_end = EINA_FALSE;
}
else
return;
}
static Evas_Object *
-_item_content_get(const Elm_Object_Item *it, const char *part)
+_item_content_get_hook(const Elm_Object_Item *it, const char *part)
{
Elm_List_Item *item = (Elm_List_Item *)it;
}
static Evas_Object *
-_item_content_unset(const Elm_Object_Item *it, const char *part)
+_item_content_unset_hook(const Elm_Object_Item *it, const char *part)
{
Elm_List_Item *item = (Elm_List_Item *)it;
if ((!part) || (!strcmp(part, "start")))
{
Evas_Object *obj = item->icon;
- _item_content_set((Elm_Object_Item *)it, part, NULL);
+ _item_content_set_hook((Elm_Object_Item *)it, part, NULL);
return obj;
}
else if (!strcmp(part, "end"))
{
Evas_Object *obj = item->end;
- _item_content_set((Elm_Object_Item *)it, part, NULL);
+ _item_content_set_hook((Elm_Object_Item *)it, part, NULL);
return obj;
}
return NULL;
}
static void
-_item_text_set(Elm_Object_Item *it, const char *part, const char *text)
+_item_text_set_hook(Elm_Object_Item *it, const char *part, const char *text)
{
Elm_List_Item *list_it = (Elm_List_Item *)it;
if (part && strcmp(part, "default")) return;
if (!eina_stringshare_replace(&list_it->label, text)) return;
if (VIEW(list_it))
- edje_object_part_text_set(VIEW(list_it), "elm.text", text);
+ edje_object_part_text_escaped_set(VIEW(list_it), "elm.text", text);
}
static const char *
-_item_text_get(const Elm_Object_Item *it, const char *part)
+_item_text_get_hook(const Elm_Object_Item *it, const char *part)
{
if (part && strcmp(part, "default")) return NULL;
return ((Elm_List_Item *)it)->label;
_changed_size_hints, obj);
}
elm_widget_item_disable_hook_set(it, _item_disable);
- elm_widget_item_content_set_hook_set(it, _item_content_set);
- elm_widget_item_content_get_hook_set(it, _item_content_get);
- elm_widget_item_content_unset_hook_set(it, _item_content_unset);
- elm_widget_item_text_set_hook_set(it, _item_text_set);
- elm_widget_item_text_get_hook_set(it, _item_text_get);
+ elm_widget_item_content_set_hook_set(it, _item_content_set_hook);
+ elm_widget_item_content_get_hook_set(it, _item_content_get_hook);
+ elm_widget_item_content_unset_hook_set(it, _item_content_unset_hook);
+ elm_widget_item_text_set_hook_set(it, _item_text_set_hook);
+ elm_widget_item_text_get_hook_set(it, _item_text_get_hook);
elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
return it;
}
else if (!strcmp(stacking, "above"))
evas_object_raise(VIEW(it));
}
- edje_object_part_text_set(VIEW(it), "elm.text", it->label);
+ edje_object_part_text_escaped_set(VIEW(it), "elm.text", it->label);
if ((!it->icon) && (minh[0] > 0))
{
Evas_Coord bx, by, bw, bh;
Evas_Coord x, y, w, h;
+ evas_smart_objects_calculate(evas_object_evas_get(wd->box));
evas_object_geometry_get(wd->box, &bx, &by, &bw, &bh);
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
x -= bx;
Evas_Coord bx, by, bw, bh;
Evas_Coord x, y, w, h;
+ evas_smart_objects_calculate(evas_object_evas_get(wd->box));
evas_object_geometry_get(wd->box, &bx, &by, &bw, &bh);
evas_object_geometry_get(VIEW(it), &x, &y, &w, &h);
x -= bx;