From: Andy Williams Date: Sat, 17 Jun 2017 17:00:34 +0000 (+0100) Subject: elementary: Balance menu operations with an open method X-Git-Tag: upstream/1.20.0~502 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=81d01cfbd0e0d1753bc9e00e8fc962e1b5317cf0;p=platform%2Fupstream%2Fefl.git elementary: Balance menu operations with an open method --- diff --git a/src/bin/elementary/test_menu.c b/src/bin/elementary/test_menu.c index e9dafa9..ba174fb 100644 --- a/src/bin/elementary/test_menu.c +++ b/src/bin/elementary/test_menu.c @@ -211,7 +211,7 @@ _open_bt_clicked(void *data, Evas_Object *obj EINA_UNUSED, Evas_Object *mn = data; if (!mn) return; - evas_object_show(mn); + elm_menu_open(mn); } static void diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index b456644..2ffb59b 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -987,6 +987,12 @@ _elm_menu_move(Eo *obj, Elm_Menu_Data *sd, Evas_Coord x, Evas_Coord y) } EOLIAN static void +_elm_menu_open(Eo *obj, Elm_Menu_Data *sd) +{ + evas_object_show(obj); +} + +EOLIAN static void _elm_menu_close(Eo *obj, Elm_Menu_Data *sd) { _menu_hide(obj, sd->hv, NULL); diff --git a/src/lib/elementary/elm_menu.eo b/src/lib/elementary/elm_menu.eo index de428b0..b1e7031 100644 --- a/src/lib/elementary/elm_menu.eo +++ b/src/lib/elementary/elm_menu.eo @@ -32,6 +32,12 @@ class Elm.Menu (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Menu, @in data: const(void_ptr) @optional; [[Data sent by the callback.]] } } + open { + [[Oepn a closed menu + + Show the menu with no child sub-enus expanded.. + ]] + } close { [[Close a opened menu