elementary: Balance menu operations with an open method
authorAndy Williams <andy@andywilliams.me>
Sat, 17 Jun 2017 17:00:34 +0000 (18:00 +0100)
committerAndy Williams <andy@andywilliams.me>
Sat, 17 Jun 2017 17:00:34 +0000 (18:00 +0100)
src/bin/elementary/test_menu.c
src/lib/elementary/elm_menu.c
src/lib/elementary/elm_menu.eo

index e9dafa9..ba174fb 100644 (file)
@@ -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
index b456644..2ffb59b 100644 (file)
@@ -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);
index de428b0..b1e7031 100644 (file)
@@ -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