Autoload modules for external widgets
authorsachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 24 Nov 2009 17:55:11 +0000 (17:55 +0000)
committersachiel <sachiel@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 24 Nov 2009 17:55:11 +0000 (17:55 +0000)
Patch by Fabiano Fidencio

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@43951 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc_handlers.c
src/lib/edje_load.c

index a604efa..ca1cb45 100644 (file)
@@ -517,6 +517,7 @@ New_Object_Handler object_handlers[] =
      {"spectra", NULL},
      {"spectra.spectrum", ob_spectrum},
      {"collections", ob_collections},
+     {"collections.externals", NULL}, /* dup */
      {"collections.images", NULL}, /* dup */
      {"collections.fonts", NULL}, /* dup */
      {"collections.styles", NULL}, /* dup */
@@ -527,6 +528,7 @@ New_Object_Handler object_handlers[] =
      {"collections.group.data", NULL},
      {"collections.group.script", ob_collections_group_script},
      {"collections.group.lua_script", ob_collections_group_lua_script},
+     {"collections.group.externals", NULL}, /* dup */
      {"collections.group.images", NULL}, /* dup */
      {"collections.group.fonts", NULL}, /* dup */
      {"collections.group.styles", NULL}, /* dup */
index 365a241..2d7b28e 100644 (file)
@@ -305,7 +305,18 @@ _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *g
    ed->group = eina_stringshare_add(group);
 
    ed->load_error = EDJE_LOAD_ERROR_NONE;
-  _edje_file_add(ed);
+   _edje_file_add(ed);
+
+   if (ed->file->external_dir)
+     {
+       const Edje_External_Directory_Entry *ext;
+       const Eina_List *n;
+
+       EINA_LIST_FOREACH(ed->file->external_dir->entries, n, ext)
+         {
+            edje_module_load(ext->entry);
+         }
+     }
 
    _edje_textblock_styles_add(ed);
    _edje_textblock_style_all_update(ed);