1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 01:40:39 +02:00

Assign an icon for a given link only if it hasn't been done before

This commit is contained in:
Paul Cercueil 2012-10-23 06:20:03 +02:00
parent c94968f533
commit dec1a8956a

View File

@ -132,9 +132,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
updateSurfaces();
}
if (iconPath.empty())
searchIcon();
param = opk_read_param(pdata, "Exec");
if (!param)
ERROR("Missing \"Exec\" parameter\n");
@ -267,6 +264,9 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
}
const string &LinkApp::searchIcon() {
if (!iconPath.empty())
return iconPath;
string execicon = exec;
string::size_type pos = exec.rfind(".");
if (pos != string::npos) execicon = exec.substr(0,pos);