Changeset View
Changeset View
Standalone View
Standalone View
src/lib/elementary/efl_ui_image_zoomable.c
Show First 20 Lines • Show All 855 Lines • ▼ Show 20 Line(s) | 851 | { | |||
---|---|---|---|---|---|
856 | if (ev->button != 1) return; | 856 | if (ev->button != 1) return; | ||
857 | if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) sd->on_hold = EINA_TRUE; | 857 | if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) sd->on_hold = EINA_TRUE; | ||
858 | else sd->on_hold = EINA_FALSE; | 858 | else sd->on_hold = EINA_FALSE; | ||
859 | if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) | 859 | if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK) | ||
860 | { | 860 | { | ||
861 | if (elm_widget_is_legacy(data)) | 861 | if (elm_widget_is_legacy(data)) | ||
862 | evas_object_smart_callback_call(data, "clicked,double", NULL); | 862 | evas_object_smart_callback_call(data, "clicked,double", NULL); | ||
863 | else | 863 | else | ||
864 | efl_event_callback_call(data, EFL_UI_EVENT_CLICKED_DOUBLE, NULL); | 864 | { | ||
865 | Efl_Ui_Clickable_Clicked clicked; | ||||
866 | clicked.repeated = 1; | ||||
867 | clicked.button = 1; | ||||
868 | efl_event_callback_call(data, EFL_UI_EVENT_CLICKED, &clicked); | ||||
869 | } | ||||
segfaultxavi: Why don't you use the new `_press` and `_unpress` method from the mixin instead of manually… | |||||
Not Done ReplyThis code should be removed again in the efl_ui_image commit. This is just a temp solution. bu5hm4n: This code should be removed again in the efl_ui_image commit. This is just a temp solution. | |||||
865 | } | 870 | } | ||
866 | else | 871 | else | ||
867 | efl_event_callback_legacy_call(data, EFL_UI_IMAGE_ZOOMABLE_EVENT_PRESS, NULL); | 872 | efl_event_callback_legacy_call(data, EFL_UI_IMAGE_ZOOMABLE_EVENT_PRESS, NULL); | ||
868 | sd->longpressed = EINA_FALSE; | 873 | sd->longpressed = EINA_FALSE; | ||
869 | ecore_timer_del(sd->long_timer); | 874 | ecore_timer_del(sd->long_timer); | ||
870 | sd->long_timer = ecore_timer_add | 875 | sd->long_timer = ecore_timer_add | ||
871 | (_elm_config->longpress_timeout, _long_press_cb, data); | 876 | (_elm_config->longpress_timeout, _long_press_cb, data); | ||
872 | } | 877 | } | ||
▲ Show 20 Lines • Show All 2570 Lines • Show Last 20 Lines |
Why don't you use the new _press and _unpress method from the mixin instead of manually emitting the new event?