From f0371f458eca8c09da4a790d656881cfabab0338 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Mon, 4 Nov 2013 22:17:03 +0900 Subject: [PATCH] Revert "popup: Added support for popup move. elm_popup_move." This reverts commit f67ecb2028dd663aa4b0d9fe78b2a392ac169e7e. Conflicts: ChangeLog NEWS src/bin/test_popup.c Sorry, Pend this to 1.8 after. Let's think about adding this API more carefully. --- legacy/elementary/ChangeLog | 11 +++-- legacy/elementary/NEWS | 3 +- legacy/elementary/src/bin/test_popup.c | 42 -------------------- legacy/elementary/src/lib/elc_popup.c | 41 ------------------- legacy/elementary/src/lib/elc_popup_eo.h | 14 ------- legacy/elementary/src/lib/elc_popup_legacy.h | 15 ------- 6 files changed, 9 insertions(+), 117 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 1cede7ac62..6c340ee3a5 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -1732,10 +1732,13 @@ * slider: Added elm_slider_step_get(), elm_slider_step_set(). -2013-10-03 Abhinandan Aryadipta (aryarockstar) - - * Popup - Added elm_popup_move() api. - 2013-10-03 Daniel Juyung Seo (SeoZ) * Genlist/Gengrid: Added multi select mode. + +2013-10-02 Ryuan Choi (ryuan) + + * genlist , gengrid: Add ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL. + It disallow multiple selection when clicked without control pressed although + multiple selection is enabled. + diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 23d93e304a..0e0d6bb30b 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -100,8 +100,9 @@ Additions: * Add signals "spinner,drag,start" and "spinner,drag,stop" to the spinner widget. * Add support for "clicked" callback on Return/space/KP_Enter key press for image. * Add elm_slider_step_get(), elm_slider_step_set() for slider. - * Add support elm_popup_move() for popup. * Add multi select mode for genlist/gengrid. + * Add ELM_OBJECT_MULTIPLE_SELECT_MODE_WITH_CONTROL select mode for genlist/gengrid. +>>>>>>> parent of f67ecb2... popup: Added support for popup move. elm_popup_move. Improvements: diff --git a/legacy/elementary/src/bin/test_popup.c b/legacy/elementary/src/bin/test_popup.c index e98a71c4f6..918ad5bfef 100644 --- a/legacy/elementary/src/bin/test_popup.c +++ b/legacy/elementary/src/bin/test_popup.c @@ -35,19 +35,6 @@ static Evas_Coord_Point _popup_point[POPUP_POINT_MAX] = { 0, 0 } // zero }; -static void -_popup_move_cb(void *data, Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - static int k = 0; - - elm_popup_move(data, _popup_point[k].x, _popup_point[k].y); - - k++; - if (k >= POPUP_POINT_MAX) - k = 0; -} - static void _g_popup_response_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) @@ -493,33 +480,6 @@ _popup_transparent_cb(void *data, Evas_Object *obj EINA_UNUSED, evas_object_show(popup); } -static void -_popup_transparent_move_cb(void *data, Evas_Object *obj EINA_UNUSED, - void *event_info EINA_UNUSED) -{ - Evas_Object *popup; - Evas_Object *btn, *btn1; - - popup = elm_popup_add(data); - elm_object_style_set(popup, "transparent"); - elm_object_text_set(popup, "This Popup has transparent background"); - - // popup buttons - btn = elm_button_add(popup); - elm_object_text_set(btn, "Move"); - elm_object_part_content_set(popup, "button1", btn); - evas_object_smart_callback_add(btn, "clicked", _popup_move_cb, popup); - - btn1 = elm_button_add(popup); - elm_object_text_set(btn1, "Close"); - elm_object_part_content_set(popup, "button2", btn1); - evas_object_smart_callback_add(btn1, "clicked", _popup_close_cb, popup); - - // popup show should be called after adding all the contents and the buttons - // of popup to set the focus into popup's contents correctly. - evas_object_show(popup); -} - static void _list_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { @@ -597,8 +557,6 @@ test_popup(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, _popup_center_text_3button_add_remove_button_cb, win); elm_list_item_append(list, "popup-transparent", NULL, NULL, _popup_transparent_cb, win); - elm_list_item_append(list, "popup-transparent-move", NULL, NULL, - _popup_transparent_move_cb, win); elm_list_item_append(list, "popup-center-title + list content + 1 button", NULL, NULL, _popup_center_title_list_content_1button_cb, win); diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c index c5b5c98eec..f873cff002 100644 --- a/legacy/elementary/src/lib/elc_popup.c +++ b/legacy/elementary/src/lib/elc_popup.c @@ -1754,45 +1754,6 @@ _orient_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list) *ret = (Elm_Popup_Orient)_elm_notify_orient_get(sd->notify); } -EAPI void -elm_popup_move(Evas_Object *obj, - Evas_Coord x, Evas_Coord y) -{ - ELM_POPUP_CHECK(obj); - eo_do(obj, elm_obj_popup_move(x, y)); -} - -static void -_move(Eo *obj, void *_pd, va_list *list) -{ - Evas_Coord x = va_arg(*list, Evas_Coord); - Evas_Coord y = va_arg(*list, Evas_Coord); - Evas_Coord tw, th, w, h; - Evas_Object *top; - Elm_Popup_Smart_Data *sd = _pd; - - top = elm_widget_top_get(obj); - if (!top) - { - ERR("The top parent is NULL! : popup=%p", obj); - return; - } - - evas_object_geometry_get(top, NULL, NULL, &tw, &th); - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - - if (x < 0) x = 0; - if (y < 0) y = 0; - if ((x > (tw - w)) && (tw - w > 0)) - x = tw - w; - if ((y > (th - h)) && (th - h > 0)) - y = th - h; - if ((x > tw) || (y > th) || (w > tw) || (h > th)) - elm_notify_align_set(sd->notify, 0.5, 0.5); - else - elm_notify_align_set(sd->notify, ((double)x/(double)tw), ((double)y/(double)th)); -} - EAPI void elm_popup_timeout_set(Evas_Object *obj, double timeout) @@ -1960,7 +1921,6 @@ _class_constructor(Eo_Class *klass) EO_OP_FUNC(ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_SET), _allow_events_set), EO_OP_FUNC(ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_GET), _allow_events_get), EO_OP_FUNC(ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_ITEM_APPEND), _item_append), - EO_OP_FUNC(ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_MOVE), _move), EO_OP_FUNC_SENTINEL }; eo_class_funcs_set(klass, func_desc); @@ -1977,7 +1937,6 @@ static const Eo_Op_Description op_desc[] = { EO_OP_DESCRIPTION(ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_SET, "Sets whether events should be passed to by a click outside."), EO_OP_DESCRIPTION(ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_GET, "Returns value indicating whether allow event is enabled or not."), EO_OP_DESCRIPTION(ELM_OBJ_POPUP_SUB_ID_ITEM_APPEND, "Add a new item to a Popup object."), - EO_OP_DESCRIPTION(ELM_OBJ_POPUP_SUB_ID_MOVE, "Move the popup relative to its top parent."), EO_OP_DESCRIPTION_SENTINEL }; static const Eo_Class_Description class_desc = { diff --git a/legacy/elementary/src/lib/elc_popup_eo.h b/legacy/elementary/src/lib/elc_popup_eo.h index 75bf885e96..6d09109379 100644 --- a/legacy/elementary/src/lib/elc_popup_eo.h +++ b/legacy/elementary/src/lib/elc_popup_eo.h @@ -20,7 +20,6 @@ enum ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_SET, ELM_OBJ_POPUP_SUB_ID_ALLOW_EVENTS_GET, ELM_OBJ_POPUP_SUB_ID_ITEM_APPEND, - ELM_OBJ_POPUP_SUB_ID_MOVE, ELM_OBJ_POPUP_SUB_ID_LAST }; @@ -139,19 +138,6 @@ enum * @see elm_popup_item_append */ #define elm_obj_popup_item_append(label, icon, func, data, ret) ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_ITEM_APPEND), EO_TYPECHECK(const char *, label), EO_TYPECHECK(Evas_Object *, icon), EO_TYPECHECK(Evas_Smart_Cb, func), EO_TYPECHECK(const void *, data), EO_TYPECHECK(Elm_Object_Item **, ret) - -/** - * @def elm_obj_popup_move - * @since 1.8 - * - * @brief Move the popup relative to its top parent - * - * @param[in] x - * @param[in] y - * - * @see elm_popup_move - */ -#define elm_obj_popup_move(x, y) ELM_OBJ_POPUP_ID(ELM_OBJ_POPUP_SUB_ID_MOVE), EO_TYPECHECK(Evas_Coord, x), EO_TYPECHECK(Evas_Coord, y) /** * @} */ diff --git a/legacy/elementary/src/lib/elc_popup_legacy.h b/legacy/elementary/src/lib/elc_popup_legacy.h index 2530ba05f5..0f2d08f527 100644 --- a/legacy/elementary/src/lib/elc_popup_legacy.h +++ b/legacy/elementary/src/lib/elc_popup_legacy.h @@ -136,18 +136,3 @@ EAPI Eina_Bool elm_popup_allow_events_get(const Evas_Object *obj); * and item(s) can be there in a popup content area. */ EAPI Elm_Object_Item *elm_popup_item_append(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Smart_Cb func, const void *data) EINA_ARG_NONNULL(1); - -/** - * @since 1.8 - * - * @brief Move the popup relative to its top parent - * - * @param obj popup object - * @param x X position to move the popup object to, in canvas units, - * with relative to its top parent object. - * @param y Y position to move the popup object to, in canvas units, - * with relative to its top parent object. - * - * @ingroup Popup - */ -EAPI void elm_popup_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);