fixed header icon for plugin menus

This commit is contained in:
louis 2015-02-12 18:56:41 +01:00
parent 4168dd5f29
commit f3ad276385
2 changed files with 21 additions and 1 deletions

View File

@ -201,3 +201,5 @@ Version 0.2.2
- added replay onpause view in blackhole skin
- implemented SetTitle() in displayreplay
- fixed header icon for plugin menus

View File

@ -206,7 +206,25 @@ string cImageCache::GetIconName(string label, eMenuCategory cat) {
case mcSetupRecord:
case mcSetupReplay:
return "standardicons/Recordings";
case mcPlugin:
case mcPlugin: {
//check for Plugins
for (int i = 0; ; i++) {
cPlugin *p = cPluginManager::GetPlugin(i);
if (p) {
const char *mainMenuEntry = p->MainMenuEntry();
if (mainMenuEntry) {
string plugMainEntry = mainMenuEntry;
try {
if (label.substr(0, plugMainEntry.size()) == plugMainEntry) {
return *cString::sprintf("pluginicons/%s", p->Name());
}
} catch (...) {}
}
} else
break;
}
return "standardicons/Plugins";
}
case mcPluginSetup:
case mcSetupPlugins:
return "standardicons/Plugins";