Changeset View
Changeset View
Standalone View
Standalone View
src/lib/elementary/elm_list.c
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Line(s) | |||||
65 | static void _mouse_move_cb(void *, Evas *, Evas_Object *, void *); | 65 | static void _mouse_move_cb(void *, Evas *, Evas_Object *, void *); | ||
66 | static void _mouse_in_cb(void *, Evas *, Evas_Object *, void *); | 66 | static void _mouse_in_cb(void *, Evas *, Evas_Object *, void *); | ||
67 | static void _items_fix(Evas_Object *); | 67 | static void _items_fix(Evas_Object *); | ||
68 | 68 | | |||
69 | static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); | 69 | static Eina_Bool _key_action_move(Evas_Object *obj, const char *params); | ||
70 | static Eina_Bool _key_action_select(Evas_Object *obj, const char *params); | 70 | static Eina_Bool _key_action_select(Evas_Object *obj, const char *params); | ||
71 | static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); | 71 | static Eina_Bool _key_action_escape(Evas_Object *obj, const char *params); | ||
72 | 72 | | |||
73 | EOLIAN static Eina_Bool _elm_list_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_List_Item_Data *item); | 73 | EOLIAN static void _elm_list_item_elm_widget_item_del_pre(Eo *eo_item EINA_UNUSED, Elm_List_Item_Data *item); | ||
74 | static const Elm_Action key_actions[] = { | 74 | static const Elm_Action key_actions[] = { | ||
75 | {"move", _key_action_move}, | 75 | {"move", _key_action_move}, | ||
76 | {"select", _key_action_select}, | 76 | {"select", _key_action_select}, | ||
77 | {"escape", _key_action_escape}, | 77 | {"escape", _key_action_escape}, | ||
78 | {NULL, NULL} | 78 | {NULL, NULL} | ||
79 | }; | 79 | }; | ||
80 | 80 | | |||
81 | static Eina_Bool | 81 | static Eina_Bool | ||
▲ Show 20 Lines • Show All 1947 Lines • ▼ Show 20 Line(s) | |||||
2029 | } | 2029 | } | ||
2030 | 2030 | | |||
2031 | /* FIXME: this _item_del_pre_hook is called stupidly! | 2031 | /* FIXME: this _item_del_pre_hook is called stupidly! | ||
2032 | To fix this, | 2032 | To fix this, | ||
2033 | 1. it->walking concept should be adopted. | 2033 | 1. it->walking concept should be adopted. | ||
2034 | 2. elm_widget_item_del() should be called instead of the combination of | 2034 | 2. elm_widget_item_del() should be called instead of the combination of | ||
2035 | _elm_list_item_free() + elm_widget_item_free() | 2035 | _elm_list_item_free() + elm_widget_item_free() | ||
2036 | */ | 2036 | */ | ||
2037 | EOLIAN static Eina_Bool | 2037 | EOLIAN static void | ||
2038 | _elm_list_item_elm_widget_item_del_pre(Eo *eo_item, Elm_List_Item_Data *item) | 2038 | _elm_list_item_elm_widget_item_del_pre(Eo *eo_item, Elm_List_Item_Data *item) | ||
2039 | { | 2039 | { | ||
2040 | Evas_Object *obj = WIDGET(item); | 2040 | Evas_Object *obj = WIDGET(item); | ||
2041 | 2041 | | |||
2042 | ELM_LIST_DATA_GET(obj, sd); | 2042 | ELM_LIST_DATA_GET(obj, sd); | ||
2043 | 2043 | | |||
2044 | if (item->selected) | 2044 | if (item->selected) | ||
2045 | { | 2045 | { | ||
2046 | _item_unhighlight(item); | 2046 | _item_unhighlight(item); | ||
2047 | _item_unselect(item); | 2047 | _item_unselect(item); | ||
2048 | } | 2048 | } | ||
2049 | 2049 | | |||
2050 | if (sd->walking > 0) | 2050 | if (sd->walking > 0) | ||
2051 | { | 2051 | { | ||
2052 | if (item->deleted) return EINA_FALSE; | 2052 | if (item->deleted) return ; | ||
2053 | item->deleted = EINA_TRUE; | 2053 | item->deleted = EINA_TRUE; | ||
2054 | efl_ref(eo_item); | 2054 | efl_ref(eo_item); | ||
2055 | sd->to_delete = eina_list_append(sd->to_delete, item); | 2055 | sd->to_delete = eina_list_append(sd->to_delete, item); | ||
2056 | return EINA_FALSE; | 2056 | return ; | ||
2057 | } | 2057 | } | ||
2058 | 2058 | | |||
2059 | sd->items = eina_list_remove_list(sd->items, item->node); | 2059 | sd->items = eina_list_remove_list(sd->items, item->node); | ||
2060 | 2060 | | |||
2061 | evas_object_ref(obj); | 2061 | evas_object_ref(obj); | ||
2062 | _elm_list_walk(sd); | 2062 | _elm_list_walk(sd); | ||
2063 | 2063 | | |||
2064 | _elm_list_item_free(item); | 2064 | _elm_list_item_free(item); | ||
2065 | 2065 | | |||
2066 | _elm_list_unwalk(obj, sd); | 2066 | _elm_list_unwalk(obj, sd); | ||
2067 | evas_object_unref(obj); | 2067 | evas_object_unref(obj); | ||
2068 | | ||||
2069 | return EINA_TRUE; | | |||
2070 | } | 2068 | } | ||
2071 | 2069 | | |||
2072 | EOLIAN static void _elm_list_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_List_Item_Data *it, | 2070 | EOLIAN static void _elm_list_item_elm_widget_item_signal_emit(Eo *eo_it EINA_UNUSED, Elm_List_Item_Data *it, | ||
2073 | const char *emission, | 2071 | const char *emission, | ||
2074 | const char *source) | 2072 | const char *source) | ||
2075 | { | 2073 | { | ||
2076 | edje_object_signal_emit(VIEW(it), emission, source); | 2074 | edje_object_signal_emit(VIEW(it), emission, source); | ||
2077 | } | 2075 | } | ||
▲ Show 20 Lines • Show All 1194 Lines • Show Last 20 Lines |