ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=38b76ca500d48703ce24c396af8818f55be16b6c

commit 38b76ca500d48703ce24c396af8818f55be16b6c
Author: Andy Williams <a...@andywilliams.me>
Date:   Thu Jun 8 18:52:35 2017 -0700

    popups: Move text to content to render in latest EFL
---
 src/bin/edi_main.c                        | 16 ++++++++++++----
 src/bin/editor/edi_editor_documentation.c |  6 +++++-
 src/bin/mainview/edi_mainview.c           |  7 +++++--
 src/bin/screens/edi_scm_screens.c         |  7 +++++--
 4 files changed, 27 insertions(+), 9 deletions(-)

diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c
index 6f3a6fd..3194b5f 100644
--- a/src/bin/edi_main.c
+++ b/src/bin/edi_main.c
@@ -561,11 +561,15 @@ _edi_popup_cancel_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 void
 edi_launcher_config_missing()
 {
-   Evas_Object *popup, *button;
+   Evas_Object *popup, *label, *button;
 
    popup = elm_popup_add(_edi_main_win);
    elm_object_part_text_set(popup, "title,text", "Unable to launch");
-   elm_object_text_set(popup, "No launch binary found, please configure in 
Settings");
+
+   label = elm_label_add(popup);
+   elm_object_text_set(label, "No launch binary found, please configure in 
Settings");
+   evas_object_show(label);
+   elm_object_content_set(popup, label);
 
    button = elm_button_add(popup);
    elm_object_text_set(button, "OK");
@@ -605,11 +609,15 @@ static void
 _edi_project_credentials_missing()
 
 {
-   Evas_Object *popup, *button;
+   Evas_Object *popup, *label, *button;
 
    popup = elm_popup_add(_edi_main_win);
    elm_object_part_text_set(popup, "title,text", "User information");
-   elm_object_text_set(popup, "No user information found, please configure in 
Settings");
+
+   label = elm_label_add(popup);
+   elm_object_text_set(label, "No user information found, please configure in 
Settings");
+   evas_object_show(label);
+   elm_object_content_set(popup, label);
 
    button = elm_button_add(popup);
    elm_object_text_set(button, "OK");
diff --git a/src/bin/editor/edi_editor_documentation.c 
b/src/bin/editor/edi_editor_documentation.c
index e0850f9..1437fb1 100644
--- a/src/bin/editor/edi_editor_documentation.c
+++ b/src/bin/editor/edi_editor_documentation.c
@@ -106,6 +106,7 @@ void
 edi_editor_doc_open(Edi_Editor *editor)
 {
    Edi_Language_Document *doc = NULL;
+   Evas_Object *label;
    const char *detail, *param, *ret, *see;
    char *display;
    int displen;
@@ -133,7 +134,10 @@ edi_editor_doc_open(Edi_Editor *editor)
      {
         elm_popup_timeout_set(editor->doc_popup, 1.5);
         elm_object_style_set(editor->doc_popup, "transparent");
-        elm_object_text_set(editor->doc_popup, "No help available for this 
term");
+        label = elm_label_add(editor->doc_popup);
+        elm_object_text_set(label, "No help available for this term");
+        evas_object_show(label);
+        elm_object_content_set(editor->doc_popup, label);
         evas_object_show(editor->doc_popup);
         return;
      }
diff --git a/src/bin/mainview/edi_mainview.c b/src/bin/mainview/edi_mainview.c
index c088435..603b037 100644
--- a/src/bin/mainview/edi_mainview.c
+++ b/src/bin/mainview/edi_mainview.c
@@ -399,12 +399,15 @@ _edi_popup_cancel_cb(void *data, Evas_Object *obj 
EINA_UNUSED,
 static void
 _edi_mainview_mime_content_safe_popup(void)
 {
-   Evas_Object *popup, *button;
+   Evas_Object *popup, *label, *button;
 
    popup = elm_popup_add(_main_win);
    elm_object_part_text_set(popup, "title,text",
                                    "Unrecognised file type");
-   elm_object_text_set(popup, "To force open, select this file in the file 
browser, and use \"open as\" menu options.");
+   label = elm_label_add(popup);
+   elm_object_text_set(label, "To force open, select this file in the file 
browser, and use \"open as\" menu options.");
+   evas_object_show(label);
+   elm_object_content_set(popup, label);
 
    button = elm_button_add(popup);
    elm_object_text_set(button, "OK");
diff --git a/src/bin/screens/edi_scm_screens.c 
b/src/bin/screens/edi_scm_screens.c
index 7c23ad7..66b27da 100644
--- a/src/bin/screens/edi_scm_screens.c
+++ b/src/bin/screens/edi_scm_screens.c
@@ -149,14 +149,17 @@ edi_scm_screens_commit(Evas_Object *parent)
 void
 edi_scm_screens_binary_missing(Evas_Object *parent, const char *binary)
 {
-   Evas_Object *popup, *button;
+   Evas_Object *popup, *label, *button;
    Eina_Strbuf *text = eina_strbuf_new();
 
    eina_strbuf_append_printf(text, "No %s binary found, please install %s.", 
binary, binary);
 
    popup = elm_popup_add(parent);
    elm_object_part_text_set(popup, "title,text", "SCM: Unable to launch");
-   elm_object_text_set(popup, eina_strbuf_string_get(text));
+   label = elm_label_add(popup);
+   elm_object_text_set(label, eina_strbuf_string_get(text));
+   evas_object_show(label);
+   elm_object_content_set(popup, label);
 
    eina_strbuf_free(text);
 

-- 


Reply via email to