bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/misc/entrance.git/commit/?id=3e84b88c424f324daa008803bba24650c15ea445

commit 3e84b88c424f324daa008803bba24650c15ea445
Author: Marcel Hollerbach <[email protected]>
Date:   Thu May 22 14:01:39 2014 +0200

    entrance: the theme can be changed now.
---
 src/bin/entrance_gui.c | 36 ++++++++++++++++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/src/bin/entrance_gui.c b/src/bin/entrance_gui.c
index 07e6900..d808903 100644
--- a/src/bin/entrance_gui.c
+++ b/src/bin/entrance_gui.c
@@ -170,6 +170,34 @@ entrance_gui_init(const char *theme)
    return j;
 }
 
+static void
+_entrance_gui_theme_update(void)
+{
+   Eina_List *node;
+   Entrance_Screen *screen;
+   char buf[PATH_MAX];
+   snprintf(buf, sizeof(buf),
+            PACKAGE_DATA_DIR"/themes/%s.edj", _gui->theme);
+   EINA_LIST_FOREACH(_gui->screens, node, screen)
+     {
+        elm_layout_file_set(screen->transition, buf, 
"entrance/wallpaper/default");
+        elm_layout_file_set(screen->edj, buf, "entrance");
+        elm_layout_file_set(screen->login, buf, "entrance/login");
+        evas_object_smart_callback_add(
+                ENTRANCE_GUI_GET(screen->edj, "entrance.conf"),
+                "clicked",
+                _entrance_gui_conf_clicked_cb,
+                screen->transition);
+     }
+   _gui->theme_icon_pool =
+          _entrance_gui_theme_icons_cache_fill(_gui->win, _gui->theme);
+   _gui->theme_background_pool =
+           _entrance_gui_theme_background_cache_fill(_gui->win, _gui->theme);
+   _entrance_gui_actions_populate();
+   _entrance_gui_users_populate();
+
+}
+
 void
 entrance_gui_shutdown(void)
 {
@@ -499,7 +527,7 @@ entrance_gui_conf_set(const Entrance_Conf_Gui_Event *conf)
      }
    if (_gui->theme != conf->theme)
      {
-       _gui->theme = conf->theme;
+       entrance_gui_theme_name_set(conf->theme);
      }
    _gui->changed = ~(ENTRANCE_CONF_NONE);
    _entrance_gui_update();
@@ -541,7 +569,11 @@ entrance_gui_themes_get(void)
 void
 entrance_gui_theme_name_set(const char *theme)
 {
-   /* TODO */
+   if (!_gui->theme)
+     _gui->theme = eina_stringshare_add(theme);
+   else
+     eina_stringshare_replace(&_gui->theme, theme);
+   _entrance_gui_theme_update();
 }
 
 const char *

-- 


Reply via email to