summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2013-09-21 19:32:34 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2013-09-21 19:32:34 +0900
commit966a48eca89bbd184e2915a190e5f6a090fe9950 (patch)
treea366a1fd84fdee3e748f16ab2cb6e19b3bd202f4
parentd2028f692b4a61a93a07e5af9ca24b562c46af0d (diff)
elm_menu.c: use hover's dismissed callback instead of clicked callback for menu dismiss.
-rw-r--r--src/lib/elm_menu.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/elm_menu.c b/src/lib/elm_menu.c
index 9ccaafe61..f340180a1 100644
--- a/src/lib/elm_menu.c
+++ b/src/lib/elm_menu.c
@@ -381,9 +381,9 @@ _menu_hide(void *data,
381} 381}
382 382
383static void 383static void
384_hover_clicked_cb(void *data, 384_hover_dismissed_cb(void *data,
385 Evas_Object *obj, 385 Evas_Object *obj,
386 void *event_info) 386 void *event_info)
387{ 387{
388 _menu_hide(data, obj, event_info); 388 _menu_hide(data, obj, event_info);
389 evas_object_smart_callback_call(data, SIG_CLICKED, NULL); 389 evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
@@ -533,8 +533,8 @@ _item_submenu_obj_create(Elm_Menu_Item *item)
533 if (sd->menu_bar && !item->parent) 533 if (sd->menu_bar && !item->parent)
534 { 534 {
535 elm_object_style_set(hv, "main_menu_submenu"); 535 elm_object_style_set(hv, "main_menu_submenu");
536 evas_object_smart_callback_add(hv, "clicked", 536 evas_object_smart_callback_add(hv, "dismissed",
537 _hover_clicked_cb, WIDGET(item)); 537 _hover_dismissed_cb, WIDGET(item));
538 } 538 }
539 else 539 else
540 elm_object_style_set(hv, "submenu"); 540 elm_object_style_set(hv, "submenu");
@@ -595,7 +595,8 @@ _elm_menu_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
595 elm_widget_mirrored_set(priv->hv, EINA_FALSE); 595 elm_widget_mirrored_set(priv->hv, EINA_FALSE);
596 596
597 elm_object_style_set(priv->hv, "menu"); 597 elm_object_style_set(priv->hv, "menu");
598 evas_object_smart_callback_add(priv->hv, "clicked", _hover_clicked_cb, obj); 598 evas_object_smart_callback_add(priv->hv, "dismissed",
599 _hover_dismissed_cb, obj);
599 600
600 priv->bx = elm_box_add(obj); 601 priv->bx = elm_box_add(obj);
601 elm_widget_mirrored_set(priv->bx, EINA_FALSE); 602 elm_widget_mirrored_set(priv->bx, EINA_FALSE);
@@ -667,13 +668,14 @@ _elm_menu_menu_bar_set(Eo *obj, Eina_Bool menu_bar)
667 if (menu_bar) 668 if (menu_bar)
668 { 669 {
669 evas_object_smart_callback_add(item->submenu.hv, "clicked", 670 evas_object_smart_callback_add(item->submenu.hv, "clicked",
670 _hover_clicked_cb, WIDGET(item)); 671 _hover_dismissed_cb, WIDGET(item));
671 elm_object_style_set(item->submenu.hv, "main_menu_submenu"); 672 elm_object_style_set(item->submenu.hv, "main_menu_submenu");
672 } 673 }
673 else 674 else
674 { 675 {
675 evas_object_smart_callback_del_full(item->submenu.hv, "clicked", 676 evas_object_smart_callback_del_full(item->submenu.hv, "clicked",
676 _hover_clicked_cb, WIDGET(item)); 677 _hover_dismissed_cb,
678 WIDGET(item));
677 elm_object_style_set(item->submenu.hv, "submenu"); 679 elm_object_style_set(item->submenu.hv, "submenu");
678 } 680 }
679 } 681 }