summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Cho <jae_hyun.cho@samsung.com>2018-02-07 20:51:04 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-02-07 20:52:12 +0900
commit000d43b29e2cfff039e46c7de676f33dbdeb6949 (patch)
tree89602e509f4792673a53df0c43a6e085ba023642
parentfd8e9f9c4e8dbda6c379dc464f562f5b2c681d31 (diff)
elm_part_helper: Fix to use registered default text part
-rw-r--r--src/lib/elementary/efl_ui_button.c1
-rw-r--r--src/lib/elementary/efl_ui_frame.c1
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c1
-rw-r--r--src/lib/elementary/efl_ui_slider.c1
-rw-r--r--src/lib/elementary/elm_part_helper.h28
5 files changed, 18 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_button.c b/src/lib/elementary/efl_ui_button.c
index c14d4be44a..7f4f691386 100644
--- a/src/lib/elementary/efl_ui_button.c
+++ b/src/lib/elementary/efl_ui_button.c
@@ -400,6 +400,7 @@ _efl_ui_button_efl_access_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Efl
400/* Standard widget overrides */ 400/* Standard widget overrides */
401 401
402ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data) 402ELM_WIDGET_KEY_DOWN_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data)
403ELM_PART_TEXT_DEFAULT_GET(efl_ui_button, _text_aliases[0].real_part)
403ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data) 404ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data)
404ELM_PART_CONTENT_DEFAULT_GET(efl_ui_button, _content_aliases[0].real_part) 405ELM_PART_CONTENT_DEFAULT_GET(efl_ui_button, _content_aliases[0].real_part)
405ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data) 406ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_button, Efl_Ui_Button_Data)
diff --git a/src/lib/elementary/efl_ui_frame.c b/src/lib/elementary/efl_ui_frame.c
index d4f60eb9c9..d7dacda407 100644
--- a/src/lib/elementary/efl_ui_frame.c
+++ b/src/lib/elementary/efl_ui_frame.c
@@ -203,6 +203,7 @@ _efl_ui_frame_collapse_get(Eo *obj EINA_UNUSED, Efl_Ui_Frame_Data *sd)
203 203
204/* Default text (title) and content */ 204/* Default text (title) and content */
205 205
206ELM_PART_TEXT_DEFAULT_GET(efl_ui_frame, "elm.text")
206ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data) 207ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data)
207ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data) 208ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_frame, Efl_Ui_Frame_Data)
208ELM_PART_CONTENT_DEFAULT_GET(efl_ui_frame, "elm.swallow.content") 209ELM_PART_CONTENT_DEFAULT_GET(efl_ui_frame, "elm.swallow.content")
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 2654b1a850..b9000d6350 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -724,6 +724,7 @@ _efl_ui_progressbar_part_efl_ui_range_range_min_max_get(Eo *obj, void *_pd EINA_
724/* Efl.Part end */ 724/* Efl.Part end */
725 725
726/* Internal EO APIs and hidden overrides */ 726/* Internal EO APIs and hidden overrides */
727ELM_PART_TEXT_DEFAULT_GET(efl_ui_progressbar, _text_aliases[0].real_part)
727ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_progressbar, Efl_Ui_Progressbar_Data) 728ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_progressbar, Efl_Ui_Progressbar_Data)
728ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_progressbar, Efl_Ui_Progressbar_Data) 729ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_progressbar, Efl_Ui_Progressbar_Data)
729ELM_PART_CONTENT_DEFAULT_GET(efl_ui_progressbar, _content_aliases[0].real_part) 730ELM_PART_CONTENT_DEFAULT_GET(efl_ui_progressbar, _content_aliases[0].real_part)
diff --git a/src/lib/elementary/efl_ui_slider.c b/src/lib/elementary/efl_ui_slider.c
index ca38c46f31..b4a687f5b5 100644
--- a/src/lib/elementary/efl_ui_slider.c
+++ b/src/lib/elementary/efl_ui_slider.c
@@ -1395,6 +1395,7 @@ _efl_ui_slider_efl_access_widget_action_elm_actions_get(Eo *obj EINA_UNUSED, Efl
1395 1395
1396/* Standard widget overrides */ 1396/* Standard widget overrides */
1397 1397
1398ELM_PART_TEXT_DEFAULT_GET(efl_ui_slider, _text_aliases[0].real_part)
1398ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data) 1399ELM_PART_TEXT_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data)
1399ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data) 1400ELM_PART_MARKUP_DEFAULT_IMPLEMENT(efl_ui_slider, Efl_Ui_Slider_Data)
1400ELM_PART_CONTENT_DEFAULT_GET(efl_ui_slider, _content_aliases[0].real_part) 1401ELM_PART_CONTENT_DEFAULT_GET(efl_ui_slider, _content_aliases[0].real_part)
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
index 29b08a68d6..a77f3db078 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -174,38 +174,38 @@ _ ## full ## _efl_text_markup_markup_set(Eo *obj, void *_pd EINA_UNUSED, const c
174#define ELM_PART_OVERRIDE_MARKUP_GET(type, TYPE, typedata) \ 174#define ELM_PART_OVERRIDE_MARKUP_GET(type, TYPE, typedata) \
175 ELM_PART_OVERRIDE_TEXT_MARKUP_GET_FULL(type ## _part, type, TYPE, typedata) 175 ELM_PART_OVERRIDE_TEXT_MARKUP_GET_FULL(type ## _part, type, TYPE, typedata)
176 176
177#define ELM_PART_TEXT_DEFAULT_IMPLEMENT(type, Type) \ 177#define ELM_PART_TEXT_DEFAULT_IMPLEMENT(type, typedata) \
178EOLIAN static void \ 178EOLIAN static void \
179_ ## type ## _efl_text_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *text) \ 179_ ## type ## _efl_text_text_set(Eo *obj, typedata *sd, const char *text) \
180{ \ 180{ \
181 efl_text_set(efl_part(efl_super(obj, MY_CLASS), "elm.text"), text); \ 181 efl_text_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), text); \
182} \ 182} \
183EOLIAN static const char * \ 183EOLIAN static const char * \
184_ ## type ## _efl_text_text_get(Eo *obj, Type *pd EINA_UNUSED) \ 184_ ## type ## _efl_text_text_get(Eo *obj, typedata *sd) \
185{ \ 185{ \
186 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text")); \ 186 return efl_text_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd))); \
187} \ 187} \
188EOLIAN static void \ 188EOLIAN static void \
189_ ## type ## _efl_ui_translatable_translatable_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *label, const char *domain) \ 189_ ## type ## _efl_ui_translatable_translatable_text_set(Eo *obj, typedata *sd, const char *label, const char *domain) \
190{ \ 190{ \
191 efl_ui_translatable_text_set(efl_part(efl_super(obj, MY_CLASS), "elm.text"), label, domain); \ 191 efl_ui_translatable_text_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), label, domain); \
192} \ 192} \
193EOLIAN static const char * \ 193EOLIAN static const char * \
194_ ## type ## _efl_ui_translatable_translatable_text_get(Eo *obj, Type *pd EINA_UNUSED, const char **domain) \ 194_ ## type ## _efl_ui_translatable_translatable_text_get(Eo *obj, typedata *sd, const char **domain) \
195{ \ 195{ \
196 return efl_ui_translatable_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text"), domain); \ 196 return efl_ui_translatable_text_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), domain); \
197} 197}
198 198
199#define ELM_PART_MARKUP_DEFAULT_IMPLEMENT(type, Type) \ 199#define ELM_PART_MARKUP_DEFAULT_IMPLEMENT(type, typedata) \
200EOLIAN static const char * \ 200EOLIAN static const char * \
201_ ## type ## _efl_text_markup_markup_get(Eo *obj, Type *pd EINA_UNUSED) \ 201_ ## type ## _efl_text_markup_markup_get(Eo *obj, typedata *sd) \
202{ \ 202{ \
203 return efl_text_markup_get(efl_part(efl_super(obj, MY_CLASS), "elm.text")); \ 203 return efl_text_markup_get(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd))); \
204} \ 204} \
205EOLIAN static void \ 205EOLIAN static void \
206_ ## type ## _efl_text_markup_markup_set(Eo *obj, Type *pd EINA_UNUSED, const char *markup) \ 206_ ## type ## _efl_text_markup_markup_set(Eo *obj, typedata *sd, const char *markup) \
207{ \ 207{ \
208 efl_text_markup_set(efl_part(efl_super(obj, MY_CLASS), "elm.text"), markup); \ 208 efl_text_markup_set(efl_part(efl_super(obj, MY_CLASS), _ ## type ## _default_text_part_get(obj, sd)), markup); \
209} \ 209} \
210 210
211#endif 211#endif