diff options
Diffstat (limited to 'libtemplate/template.c')
| -rw-r--r-- | libtemplate/template.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libtemplate/template.c b/libtemplate/template.c index b5889ad..4edbe4a 100644 --- a/libtemplate/template.c +++ b/libtemplate/template.c @@ -53,7 +53,24 @@ bool cTemplate::ReadFromXML(void) { if (!parser.ParseView()) { return false; } - return true; + //read additional plugin templates + bool ok = true; + if (viewType == vtDisplayMenu) { + config.InitPluginIterator(); + map <int,string> *plugTemplates = NULL; + string plugName; + while ( plugTemplates = config.GetPluginTemplates(plugName) ) { + for (map <int,string>::iterator it = plugTemplates->begin(); it != plugTemplates->end(); it++) { + int templateNumber = it->first; + stringstream templateName; + templateName << "plug-" << plugName << "-" << it->second.c_str(); + if (parser.ReadPluginView(plugName, templateNumber, templateName.str())) { + ok = parser.ParsePluginView(plugName, templateNumber); + } + } + } + } + return ok; } void cTemplate::SetGlobals(cGlobals *globals) { |
