From: Jean-Philippe Andre Date: Tue, 7 Jun 2016 08:43:45 +0000 (+0900) Subject: elm_win: Add back title_set as text.set X-Git-Tag: upstream/1.20.0~5888 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65818851280613b55a6a1fb18be9207928dd9dd8;p=platform%2Fupstream%2Fefl.git elm_win: Add back title_set as text.set Title and name are two different things. See 466d9fbaf1319db4df9d576bdbe196f2557f6. --- diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c index 08755ff..653a28b 100644 --- a/src/lib/elementary/elm_win.c +++ b/src/lib/elementary/elm_win.c @@ -4173,6 +4173,24 @@ _elm_win_eo_base_constructor(Eo *obj, Elm_Win_Data *_pd EINA_UNUSED) } EOLIAN static void +_elm_win_efl_text_text_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, const char *title) +{ + if (!title) return; + eina_stringshare_replace(&(sd->title), title); + if (sd->ee) + TRAP(sd, title_set, sd->title); + if (sd->frame_obj) + edje_object_part_text_escaped_set + (sd->frame_obj, "elm.text.title", sd->title); +} + +EOLIAN static const char* +_elm_win_efl_text_text_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) +{ + return sd->title; +} + +EOLIAN static void _elm_win_type_set(Eo *obj, Elm_Win_Data *sd, Elm_Win_Type type) { if (eo_finalized_get(obj)) @@ -6185,25 +6203,13 @@ elm_win_shaped_get(const Evas_Object *obj) EAPI void elm_win_title_set(Evas_Object *obj, const char *title) { - ELM_WIN_CHECK(obj); - ELM_WIN_DATA_GET_OR_RETURN(obj, sd); - - if (!title) return; - eina_stringshare_replace(&(sd->title), title); - if (sd->ee) - TRAP(sd, title_set, sd->title); - if (sd->frame_obj) - edje_object_part_text_escaped_set - (sd->frame_obj, "elm.text.title", sd->title); + efl_text_set(obj, title); } EAPI const char* elm_win_title_get(const Evas_Object *obj) { - ELM_WIN_CHECK(obj) NULL; - ELM_WIN_DATA_GET_OR_RETURN(obj, sd, NULL); - - return sd->title; + return efl_text_get(obj); } EAPI void diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo index 30644de..6ac31c1 100644 --- a/src/lib/elementary/elm_win.eo +++ b/src/lib/elementary/elm_win.eo @@ -149,7 +149,7 @@ enum Elm.Win.Urgent_Mode class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window, Elm.Interface.Atspi_Widget_Action, Efl.Pack, Efl.Input.State, Efl.Input.Interface, Efl.Screen, - Efl.Gfx.Size.Hint) + Efl.Gfx.Size.Hint, Efl.Text) { legacy_prefix: elm_win; eo_prefix: elm_obj_win; @@ -802,6 +802,8 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window, Efl.Gfx.Size.Hint.base.get; Efl.Gfx.Size.Hint.step.set; Efl.Gfx.Size.Hint.step.get; + Efl.Text.text.set; + Efl.Text.text.get; } constructors { .name;