Log:
authorChunEon Park <chuneon.park@samsung.com>
Fri, 29 Mar 2013 06:53:05 +0000 (15:53 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Tue, 2 Apr 2013 09:43:54 +0000 (18:43 +0900)
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
src/lib/elc_ctxpopup.h

index 6790017..18e3f9a 100644 (file)
@@ -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;
index ce6cc7c..12abb87 100644 (file)
@@ -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