jaehyun pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=3ee3c6970701ee078113f91a0e159f6e72445d54

commit 3ee3c6970701ee078113f91a0e159f6e72445d54
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Fri Feb 24 17:01:40 2017 +0900

    text_setting: Fix to apply font style to text in text setting
    
    Previously, if a font style was selected and then re-open text setting,
    the selected font style was not applied to example text in text setting.
    
    Now, the selected font style is applied to example text when text
    setting is re-opened.
---
 src/bin/text_setting.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/bin/text_setting.c b/src/bin/text_setting.c
index 9c6e782..5a2181c 100644
--- a/src/bin/text_setting.c
+++ b/src/bin/text_setting.c
@@ -778,7 +778,10 @@ font_name_selected_cb(void *data, Evas_Object *obj,
 
    config_font_get(&font_name, &font_style);
 
+   //Initialize font style
    elm_list_clear(tsd->list_font_style);
+   eina_stringshare_del(tsd->font_style);
+   tsd->font_style = NULL;
 
    //Append Items of Font Style List
    Elm_Font_Properties *efp;
@@ -802,6 +805,7 @@ font_name_selected_cb(void *data, Evas_Object *obj,
                                                  NULL,
                                                  NULL, font_style_selected_cb,
                                                  tsd);
+
                        if (font_name && !strcmp(font_name, efp->name) &&
                            font_style && !strcmp(font_style, style))
                          font_style_it = it;
@@ -814,7 +818,6 @@ font_name_selected_cb(void *data, Evas_Object *obj,
    if (font_style_it) elm_list_item_selected_set(font_style_it, EINA_TRUE);
 
    eina_stringshare_replace(&tsd->font_name, sel_font_name);
-   eina_stringshare_replace(&tsd->font_style, NULL);
    text_setting_font_apply(tsd);
 }
 

-- 


Reply via email to