efl_ui_popup: remove efl_ui_popup_position_set
authorJinYong Park <j4939.park@samsung.com>
Wed, 6 Sep 2017 02:09:08 +0000 (11:09 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Tue, 28 Nov 2017 08:15:42 +0000 (17:15 +0900)
Summary:
Remove efl_ui_popup_position_set.
Its functionality is replaced with efl_gfx_position_set.

Test Plan:
  1. elementary_test -to efluipopup

Reviewers: Jaehyun_Cho, herb, thiepha, woohyun, jpeg, cedric

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5129

src/bin/elementary/test_popup.c
src/lib/elementary/efl_ui_popup.c
src/lib/elementary/efl_ui_popup.eo

index afc29a5..2bb6ede 100644 (file)
@@ -1006,7 +1006,7 @@ static void
 _position_set_cb(void *data, Evas_Object *obj EINA_UNUSED,
                 void *event_info EINA_UNUSED)
 {
-   efl_ui_popup_position_set(data, 0, 0);
+   evas_object_move(data, 0, 0);
 }
 
 void
index a81ff67..5db1415 100644 (file)
@@ -26,6 +26,7 @@ _bg_clicked_cb(void *data,
 EOLIAN static void
 _efl_ui_popup_efl_gfx_position_set(Eo *obj, Efl_Ui_Popup_Data *pd EINA_UNUSED, Eina_Position2D pos)
 {
+   pd->align = EFL_UI_POPUP_ALIGN_NONE;
    efl_gfx_position_set(efl_super(obj, MY_CLASS), pos);
 }
 
@@ -52,19 +53,19 @@ _calc_align(Evas_Object *obj)
    switch (align)
      {
         case EFL_UI_POPUP_ALIGN_CENTER:
-           evas_object_move(obj, x + ((w - pw ) / 2), y + ((h - ph) / 2));
+           efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw ) / 2), y + ((h - ph) / 2)));
         break;
         case EFL_UI_POPUP_ALIGN_LEFT:
-           evas_object_move(obj, x, y + ((h - ph) / 2));
+           efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x, y + ((h - ph) / 2)));
         break;
         case EFL_UI_POPUP_ALIGN_RIGHT:
-           evas_object_move(obj, x + (w - pw), ((h - ph) / 2));
+           efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + (w - pw), ((h - ph) / 2)));
         break;
         case EFL_UI_POPUP_ALIGN_TOP:
-           evas_object_move(obj, x + ((w - pw) / 2), y);
+           efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y));
         break;
         case EFL_UI_POPUP_ALIGN_BOTTOM:
-           evas_object_move(obj, x + ((w - pw) / 2), y + (h - ph));
+           efl_gfx_position_set(efl_super(obj, MY_CLASS), EINA_POSITION2D(x + ((w - pw) / 2), y + (h - ph)));
         break;
         default:
         break;
@@ -120,13 +121,6 @@ _efl_ui_popup_parent_window_get(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd)
    return pd->win_parent;
 }
 
-EOLIAN void
-_efl_ui_popup_position_set(Eo *obj, Efl_Ui_Popup_Data *pd, int x, int y)
-{
-   evas_object_move(obj, x, y);
-   pd->align = EFL_UI_POPUP_ALIGN_NONE;
-}
-
 EOLIAN static void
 _efl_ui_popup_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Popup_Data *pd, Efl_Ui_Popup_Align type)
 {
index 14a30ca..a1a1664 100644 (file)
@@ -39,15 +39,6 @@ class Efl.Ui.Popup(Efl.Ui.Layout)
             repeat: bool; [[If $true, events are passed to lower objects.]]
          }
       }
-      @property position {
-        set {
-           [[Set the current popup position.]]
-        }
-        values {
-          x: int;
-          y: int;
-        }
-      }
       @property align {
          set {
             [[ Set the popup alignment.]]