yakov pushed a commit to branch master.

http://git.enlightenment.org/tools/erigo.git/commit/?id=feff7b47ee4186f9e82be3875227c89766e0601e

commit feff7b47ee4186f9e82be3875227c89766e0601e
Author: Yakov Goldberg <yako...@samsung.com>
Date:   Mon May 4 13:24:48 2015 +0300

    Add theme aplying to simulated project
---
 src/lib/simulator.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/lib/simulator.c b/src/lib/simulator.c
index fb46fad..9f4c661 100644
--- a/src/lib/simulator.c
+++ b/src/lib/simulator.c
@@ -191,6 +191,16 @@ _widget_add(Gui_Session *session, const Gui_Widget *wdg, 
void *data)
    if (!o) return EINA_FALSE;
    session_eo_set(session, wdg, o);
 
+   /* Apply theme to simulated project. */
+   Elm_Theme *theme = elm_theme_new();
+   const char *theme_name = 
gui_context_edit_theme_name_get(wdg_context_get(wdg));
+   char *str = malloc(strlen(theme_name) + 9);
+   sprintf(str, "%s:default", theme_name);
+   elm_theme_set(theme, str);
+   elm_object_theme_set(o, theme);
+   free(str);
+   elm_theme_free(theme);
+
    /* Add callback on Eo deletion, in order to set wdg as non-existent.
     * T.e. when, during simulation, object will be deleted, Eo for this widget 
will
     * be set to NULL in session. */

-- 


Reply via email to