From ebf6bcd9253bafe7155a16eff3e1039553e5b65b Mon Sep 17 00:00:00 2001 From: Shinwoo Kim Date: Tue, 29 Jan 2013 05:49:34 +0000 Subject: [PATCH] [access][popup] fix overwrite problem SVN revision: 83407 --- .../elementary/data/themes/widgets/popup.edc | 20 +++++++++++++++++++ legacy/elementary/src/lib/elc_popup.c | 18 ++++++++++++++--- 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/legacy/elementary/data/themes/widgets/popup.edc b/legacy/elementary/data/themes/widgets/popup.edc index 9c9ec424af..c3601c8ae6 100644 --- a/legacy/elementary/data/themes/widgets/popup.edc +++ b/legacy/elementary/data/themes/widgets/popup.edc @@ -227,6 +227,16 @@ group { name: "elm/popup/base/default"; visible: 1; } } + part { name: "access.title"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to: "elm.bg.title"; + rel2.to:"elm.bg.title"; + color: 0 0 0 0; + } + } part { name: "elm.swallow.content"; type: SWALLOW; scale : 1; @@ -268,6 +278,16 @@ group { name: "elm/popup/base/default"; } } } + part { name: "access.body"; + type: RECT; + repeat_events: 1; + description { state: "default" 0.0; + fixed: 1 1; + rel1.to: "elm.swallow.content"; + rel2.to: "elm.swallow.content"; + color: 0 0 0 0; + } + } part { name: "elm.bg.action_area"; type: RECT; scale : 1; diff --git a/legacy/elementary/src/lib/elc_popup.c b/legacy/elementary/src/lib/elc_popup.c index 62bc874c68..2b5357caf0 100644 --- a/legacy/elementary/src/lib/elc_popup.c +++ b/legacy/elementary/src/lib/elc_popup.c @@ -59,7 +59,7 @@ _timeout_cb(void *data, } static Evas_Object * -_access_object_get(Evas_Object *obj, const char* part) +_access_object_get(const Evas_Object *obj, const char* part) { Evas_Object *po, *ao; Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS); @@ -852,8 +852,14 @@ _title_text_set(Evas_Object *obj, /* access */ if (_elm_config->access_mode) { - _access_obj_process(obj, EINA_TRUE); ao = _access_object_get(obj, ACCESS_TITLE_PART); + if (!ao) + { + ao = _elm_access_edje_object_part_object_register + (obj, wd->resize_obj, ACCESS_TITLE_PART); + _elm_access_text_set(_elm_access_object_get(ao), + ELM_ACCESS_TYPE, E_("Popup Title")); + } _elm_access_text_set(_elm_access_object_get(ao), ELM_ACCESS_INFO, text); } @@ -919,8 +925,14 @@ _content_text_set(Evas_Object *obj, /* access */ if (_elm_config->access_mode) { - _access_obj_process(obj, EINA_TRUE); ao = _access_object_get(obj, ACCESS_BODY_PART); + if (!ao) + { + ao = _elm_access_edje_object_part_object_register + (obj, wd->resize_obj, ACCESS_BODY_PART); + _elm_access_text_set(_elm_access_object_get(ao), + ELM_ACCESS_TYPE, E_("Popup Body Text")); + } _elm_access_text_set(_elm_access_object_get(ao), ELM_ACCESS_INFO, text); }