summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-10-03 11:59:58 +0200
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2017-10-03 12:01:19 +0200
commit636b640d4e1fa24fac402133f3edc716abf6b04e (patch)
tree92c0ee9711d7174c25c9fb2c1db9654e51e68a48
parent3114a06fc0cf7fdaa578e2f529beed190c0a4225 (diff)
elm_dialog: text api!
-rw-r--r--src/bin/shortcuts.c4
-rw-r--r--src/widgets/dialog/elm_dialog.c17
-rw-r--r--src/widgets/dialog/elm_dialog.eo6
3 files changed, 13 insertions, 14 deletions
diff --git a/src/bin/shortcuts.c b/src/bin/shortcuts.c
index 6b9bf3c..2140ad4 100644
--- a/src/bin/shortcuts.c
+++ b/src/bin/shortcuts.c
@@ -160,7 +160,7 @@ _ask(Eina_List *passes, Efm_File *basic)
160 obj = efl_add(ELM_DIALOG_CLASS, NULL); 160 obj = efl_add(ELM_DIALOG_CLASS, NULL);
161 elm_win_title_set(obj, "Copy or Move"); 161 elm_win_title_set(obj, "Copy or Move");
162 elm_dialog_icon_set(obj, "dialog-question"); 162 elm_dialog_icon_set(obj, "dialog-question");
163 elm_object_text_set(obj, eina_strbuf_string_get(buf)); 163 elm_dialog_text_set(obj, eina_strbuf_string_get(buf));
164 efl_key_data_set(obj, "__passes", passes); 164 efl_key_data_set(obj, "__passes", passes);
165 efl_key_data_set(obj, "__file", basic); 165 efl_key_data_set(obj, "__file", basic);
166 bx = elm_dialog_control_box_get(obj); 166 bx = elm_dialog_control_box_get(obj);
@@ -251,4 +251,4 @@ static void
251window_close(void) 251window_close(void)
252{ 252{
253 elm_exit(); 253 elm_exit();
254} \ No newline at end of file 254}
diff --git a/src/widgets/dialog/elm_dialog.c b/src/widgets/dialog/elm_dialog.c
index a16fe76..38248d1 100644
--- a/src/widgets/dialog/elm_dialog.c
+++ b/src/widgets/dialog/elm_dialog.c
@@ -141,21 +141,16 @@ _elm_dialog_efl_object_finalize(Eo *obj, Elm_Dialog_Data *pd)
141} 141}
142 142
143EOLIAN static void 143EOLIAN static void
144_elm_dialog_elm_widget_part_text_set(Eo *obj EINA_UNUSED, Elm_Dialog_Data *pd, const char * part, const char *label) 144_elm_dialog_text_set(Eo *obj EINA_UNUSED, Elm_Dialog_Data *pd, const char *text)
145{ 145{
146 if (!part) 146 eina_stringshare_replace(&pd->main, text);
147 { 147 elm_object_text_set(pd->text, pd->main);
148 eina_stringshare_replace(&pd->main, label);
149 elm_object_text_set(pd->text, pd->main);
150 }
151} 148}
152 149
153
154EOLIAN static const char * 150EOLIAN static const char *
155_elm_dialog_elm_widget_part_text_get(Eo *obj EINA_UNUSED, Elm_Dialog_Data *pd, const char * part) 151_elm_dialog_text_get(Eo *obj EINA_UNUSED, Elm_Dialog_Data *pd)
156{ 152{
157 if (!part) return pd->main; 153 return pd->main;
158 return NULL;
159} 154}
160 155
161#include "elm_dialog.eo.x" \ No newline at end of file 156#include "elm_dialog.eo.x"
diff --git a/src/widgets/dialog/elm_dialog.eo b/src/widgets/dialog/elm_dialog.eo
index 7c37f1f..6487163 100644
--- a/src/widgets/dialog/elm_dialog.eo
+++ b/src/widgets/dialog/elm_dialog.eo
@@ -14,9 +14,13 @@ class Elm.Dialog (Efl.Ui.Win, Efl.Container) {
14 box : Efl.Ui.Box; 14 box : Efl.Ui.Box;
15 } 15 }
16 } 16 }
17 @property text {
18 values {
19 text : string;
20 }
21 }
17 } 22 }
18 implements { 23 implements {
19 Elm.Widget.part_text { set; get; }
20 Efl.Object.finalize; 24 Efl.Object.finalize;
21 Efl.Container.content { get; set; } 25 Efl.Container.content { get; set; }
22 Efl.Container.content_unset; 26 Efl.Container.content_unset;