diff options
author | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-07-01 13:55:12 +0000 |
---|---|---|
committer | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2008-07-01 13:55:12 +0000 |
commit | 49a0abc7d2fccd8aeef55e893f785d1ebf4452f8 (patch) | |
tree | 5d27f49d2402d1fd521b4319c9eda80b87a9786b /navit/plugin.c | |
parent | 673c6a951921d3e41392a79b5a3b68117cca9b2b (diff) | |
download | navit-49a0abc7d2fccd8aeef55e893f785d1ebf4452f8.tar.gz |
Core:Fix:Fix ondemand loading for maps and osd
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1189 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/plugin.c')
-rw-r--r-- | navit/plugin.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/navit/plugin.c b/navit/plugin.c index cf2204797..5583a253b 100644 --- a/navit/plugin.c +++ b/navit/plugin.c @@ -238,7 +238,7 @@ plugins_destroy(struct plugins *pls) void * plugin_get_type(enum plugin_type type, const char *type_name, const char *name) { - dbg(0, "type=\"%s\", name=\"%s\"\n", type_name, name); + dbg(1, "type=\"%s\", name=\"%s\"\n", type_name, name); GList *l,*lpls; struct name_val *nv; struct plugin *pl; @@ -251,6 +251,8 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name) l=g_list_next(l); } lpls=pls->list; + if(!g_ascii_strcasecmp(type_name, "map")) + type_name="data"; while (lpls) { pl=lpls->data; if ((mod_name=g_strrstr(pl->name, "/"))) @@ -258,8 +260,9 @@ plugin_get_type(enum plugin_type type, const char *type_name, const char *name) else mod_name=pl->name; if (!g_ascii_strncasecmp(mod_name+3, type_name, strlen(type_name)) - && !g_ascii_strncasecmp(mod_name+4+strlen(type_name), name, strlen(name))) { - dbg(0, "pl->name=\"%s\"\n",pl->name) ; + && (!g_ascii_strncasecmp(mod_name+4+strlen(type_name), name, strlen(name)) + || (!g_ascii_strcasecmp(type_name, "osd") && !g_ascii_strncasecmp(mod_name+7, "core", 4) ))) { + dbg(1, "Loading module \"%s\"\n",pl->name) ; if (plugin_get_active(pl)) if (!plugin_load(pl)) plugin_set_active(pl, 0); |