elementary/ctxpopup - ctxpopup will be dismissed when the language is changed.
authorChunEon Park <hermet@hermet.pe.kr>
Tue, 12 Feb 2013 06:58:05 +0000 (06:58 +0000)
committerChunEon Park <hermet@hermet.pe.kr>
Tue, 12 Feb 2013 06:58:05 +0000 (06:58 +0000)
SVN revision: 83841

legacy/elementary/ChangeLog
legacy/elementary/NEWS
legacy/elementary/src/lib/elc_ctxpopup.c
legacy/elementary/src/lib/elc_ctxpopup.h

index f1ea848..a048e04 100644 (file)
 
         * GLview supports "language,changed" smart callback.
 
+2013-02-13  ChunEon Park (Hermet)
+
+        * Ctxpopup will be dismissed when elm language is changed.
+
index 6efa0fa..d721565 100644 (file)
@@ -62,6 +62,7 @@ Improvements:
    * Enhanced diskselector add and item_append time.
    * Expand elm_transit_tween_mode ELM_TRANSIT_TWEEN_MODE_DIVISOR_INTERP, ELM_TRANSIT_TWEEN_MODE_BOUNCE, ELM_TRANSIT_TWEEN_MODE_SPRING
    * Added new APIs elm_transit_tween_mode_facator_set()/get()
+   * Ctxpopup will be dismissed when language is changed.
 
 Fixes:
 
index e314481..a6183ba 100644 (file)
@@ -11,11 +11,22 @@ EAPI Eo_Op ELM_OBJ_CTXPOPUP_BASE_ID = EO_NOOP;
 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}
 };
 
+static void
+_elm_ctxpopup_smart_translate(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+{
+   Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+   evas_object_hide(obj);
+
+   if (ret) *ret = EINA_TRUE;
+}
 
 static void
 _elm_ctxpopup_smart_focus_next_manager_is(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, va_list *list)
@@ -1426,6 +1437,7 @@ _class_constructor(Eo_Class *klass)
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT_MANAGER_IS), _elm_ctxpopup_smart_focus_next_manager_is),
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_NEXT),  _elm_ctxpopup_smart_focus_next),
         EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_ctxpopup_smart_focus_direction_manager_is),
+        EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_TRANSLATE), _elm_ctxpopup_smart_translate),
 
         EO_OP_FUNC(ELM_OBJ_CONTAINER_ID(ELM_OBJ_CONTAINER_SUB_ID_CONTENT_SET), _elm_ctxpopup_smart_content_set),
         EO_OP_FUNC(ELM_OBJ_CONTAINER_ID(ELM_OBJ_CONTAINER_SUB_ID_CONTENT_GET), _elm_ctxpopup_smart_content_get),
index 2084310..afebbb4 100644 (file)
@@ -24,8 +24,9 @@
  *
  * This widget emits the following signals, besides the ones sent from
  * @ref Layout:
- * - @c "dismissed" - this is called when the outside of ctxpopup was clicked
- * and ctxpopup is 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