From: ChunEon Park Date: Fri, 29 Mar 2013 07:07:51 +0000 (+0900) Subject: Log: X-Git-Tag: accepted/tizen/20130607.213307~94 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25ee5b1debf1e5d278265ade368bab575b79412b;p=profile%2Fmobile%2Felementary.git Log: elementary/gengrid - support language,changed smart callback Author: hermet Date: 2013-02-11 23:29:16 -0800 (Mon, 11 Feb 2013) New Revision: 83846 Trac: http://trac.enlightenment.org/e/changeset/83846 Change-Id: I702615f91d58a0198845079d839014ae8b490554 --- diff --git a/src/lib/elm_gengrid.c b/src/lib/elm_gengrid.c index 6957049..663fb43 100644 --- a/src/lib/elm_gengrid.c +++ b/src/lib/elm_gengrid.c @@ -52,6 +52,8 @@ static const char SIG_MOVED[] = "moved"; static const char SIG_INDEX_UPDATE[] = "index,update"; static const char SIG_HIGHLIGHTED[] = "highlighted"; static const char SIG_UNHIGHLIGHTED[] = "unhighlighted"; +static const char SIG_LANG_CHANGED[] = "language,changed"; + static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_ACTIVATED, ""}, {SIG_CLICKED_DOUBLE, ""}, @@ -79,6 +81,7 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = { {SIG_MOVED, ""}, {SIG_HIGHLIGHTED, ""}, {SIG_UNHIGHLIGHTED, ""}, + {SIG_LANG_CHANGED, ""}, {NULL, NULL} }; @@ -105,6 +108,14 @@ _elm_gengrid_pan_smart_pos_min_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y); +static Eina_Bool +_elm_gengrid_smart_translate(Evas_Object *obj) +{ + evas_object_smart_callback_call(obj, SIG_LANG_CHANGED, NULL); + + return EINA_TRUE; +} + static void _item_show_region(void *data) { @@ -1508,6 +1519,7 @@ _elm_gengrid_pan_smart_set_user(Elm_Gengrid_Pan_Smart_Class *sc) ELM_PAN_CLASS(sc)->pos_min_get = _elm_gengrid_pan_smart_pos_min_get; ELM_PAN_CLASS(sc)->content_size_get = _elm_gengrid_pan_smart_content_size_get; + } static Eina_Bool @@ -2636,6 +2648,7 @@ _elm_gengrid_smart_set_user(Elm_Gengrid_Smart_Class *sc) /* not a 'focus chain manager' */ ELM_WIDGET_CLASS(sc)->focus_next = NULL; ELM_WIDGET_CLASS(sc)->focus_direction = NULL; + ELM_WIDGET_CLASS(sc)->translate = _elm_gengrid_smart_translate; ELM_LAYOUT_CLASS(sc)->sizing_eval = _elm_gengrid_smart_sizing_eval; diff --git a/src/lib/elm_gengrid.h b/src/lib/elm_gengrid.h index 27e5d30..bc5719e 100644 --- a/src/lib/elm_gengrid.h +++ b/src/lib/elm_gengrid.h @@ -221,6 +221,9 @@ * The %c event_info parameter is the item that was highlighted. * - @c "unhighlighted" - an item in the list is unpressed and unhighlighted. * The %c event_info parameter is the item that was unhighlighted. +* - @c "language,changed" - This is called when the program's language is + * changed. Call the elm_gengrid_realized_items_update() if items text should + * be translated. * * Supported elm_object common APIs * @li elm_object_signal_emit()