mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-29 13:21:54 +02:00
Assign an icon for a given link only if it hasn't been done before
This commit is contained in:
parent
c94968f533
commit
dec1a8956a
@ -132,9 +132,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
|||||||
updateSurfaces();
|
updateSurfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iconPath.empty())
|
|
||||||
searchIcon();
|
|
||||||
|
|
||||||
param = opk_read_param(pdata, "Exec");
|
param = opk_read_param(pdata, "Exec");
|
||||||
if (!param)
|
if (!param)
|
||||||
ERROR("Missing \"Exec\" parameter\n");
|
ERROR("Missing \"Exec\" parameter\n");
|
||||||
@ -267,6 +264,9 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
|||||||
}
|
}
|
||||||
|
|
||||||
const string &LinkApp::searchIcon() {
|
const string &LinkApp::searchIcon() {
|
||||||
|
if (!iconPath.empty())
|
||||||
|
return iconPath;
|
||||||
|
|
||||||
string execicon = exec;
|
string execicon = exec;
|
||||||
string::size_type pos = exec.rfind(".");
|
string::size_type pos = exec.rfind(".");
|
||||||
if (pos != string::npos) execicon = exec.substr(0,pos);
|
if (pos != string::npos) execicon = exec.substr(0,pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user