From 6f2f839faea27de44c2eb84de48f4b17a0b40e54 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Fri, 29 Mar 2013 15:53:05 +0900 Subject: [PATCH] Log: elementary/ctxpopup - ctxpopup will be dismissed when the language is changed. Author: hermet Date: 2013-02-11 22:58:05 -0800 (Mon, 11 Feb 2013) New Revision: 83841 Trac: http://trac.enlightenment.org/e/changeset/83841 Change-Id: Ic295d4148c977004db40bc25f42a7622a5cef07e --- src/lib/elc_ctxpopup.c | 10 ++++++++++ src/lib/elc_ctxpopup.h | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c index 6790017..18e3f9a 100644 --- a/src/lib/elc_ctxpopup.c +++ b/src/lib/elc_ctxpopup.c @@ -5,8 +5,11 @@ EAPI const char ELM_CTXPOPUP_SMART_NAME[] = "elm_ctxpopup"; static const char SIG_DISMISSED[] = "dismissed"; +static const char SIG_LANG_CHANGED[] = "language,changed"; + static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_DISMISSED, ""}, + {SIG_LANG_CHANGED, ""}, {NULL, NULL} }; @@ -15,6 +18,12 @@ EVAS_SMART_SUBCLASS_NEW Elm_Layout_Smart_Class, elm_layout_smart_class_get, _smart_callbacks); static Eina_Bool +_elm_ctxpopup_smart_translate(Evas_Object *obj) +{ + evas_object_hide(obj); +} + +static Eina_Bool _elm_ctxpopup_smart_focus_next(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next) @@ -1537,6 +1546,7 @@ _elm_ctxpopup_smart_set_user(Elm_Ctxpopup_Smart_Class *sc) ELM_WIDGET_CLASS(sc)->sub_object_add = _elm_ctxpopup_smart_sub_object_add; ELM_WIDGET_CLASS(sc)->focus_next = _elm_ctxpopup_smart_focus_next; ELM_WIDGET_CLASS(sc)->focus_direction = NULL; + ELM_WIDGET_CLASS(sc)->translate = _elm_ctxpopup_smart_translate; ELM_CONTAINER_CLASS(sc)->content_get = _elm_ctxpopup_smart_content_get; ELM_CONTAINER_CLASS(sc)->content_set = _elm_ctxpopup_smart_content_set; diff --git a/src/lib/elc_ctxpopup.h b/src/lib/elc_ctxpopup.h index ce6cc7c..12abb87 100644 --- a/src/lib/elc_ctxpopup.h +++ b/src/lib/elc_ctxpopup.h @@ -24,7 +24,9 @@ * * This widget emits the following signals, besides the ones sent from * @ref Layout: - * - @c "dismissed" - the ctxpopup was dismissed + * - @c "dismissed" - this is called when the outside of ctxpopup was clicked or + * it's parent area is changed or the language is changed. and then ctxpopup is + * dismissed. * * Default content parts of the ctxpopup widget that you can use for are: * @li "default" - A content of the ctxpopup -- 2.7.4