1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-27 22:56:48 +02:00

Fixed misleading indentation in Menu::addActionLink

A reader might have concluded that the icon was always set.
This commit is contained in:
Maarten ter Huurne 2014-08-12 06:30:56 +02:00
parent 6492ab2fa2
commit cc38c8ec00

View File

@ -403,8 +403,12 @@ bool Menu::addActionLink(uint section, const string &title, function_t action, c
link->setSize(gmenu2x->skinConfInt["linkWidth"], gmenu2x->skinConfInt["linkHeight"]);
link->setTitle(title);
link->setDescription(description);
if (gmenu2x->sc.exists(icon) || (icon.substr(0,5)=="skin:" && !gmenu2x->sc.getSkinFilePath(icon.substr(5,icon.length())).empty()) || fileExists(icon))
link->setIcon(icon);
if (gmenu2x->sc.exists(icon)
|| (icon.substr(0,5)=="skin:"
&& !gmenu2x->sc.getSkinFilePath(icon.substr(5,icon.length())).empty())
|| fileExists(icon)) {
link->setIcon(icon);
}
sectionLinks(section)->push_back(link);
return true;