1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-24 20:14:35 +02:00

Fix a bug where only some parameters were read from the links files.

This commit is contained in:
Paul Cercueil 2012-10-08 06:09:37 +02:00
parent cd4809343b
commit 876f2cff86

View File

@ -140,6 +140,18 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
string::size_type position = line.find("=");
string name = trim(line.substr(0,position));
string value = trim(line.substr(position+1));
if (name == "clock") {
setClock( atoi(value.c_str()) );
} else if (name == "selectordir") {
setSelectorDir( value );
} else if (name == "selectorbrowser") {
if (value=="true") selectorbrowser = true;
} else if (name == "selectorscreens") {
setSelectorScreens( value );
} else if (name == "selectoraliases") {
setAliasFile( value );
} else
#ifdef HAVE_LIBOPK
if (!opk) {
#endif
@ -164,22 +176,11 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
} else if (name == "selectorfilter") {
setSelectorFilter( value );
#ifdef HAVE_LIBOPK
}
} else
WARNING("Unrecognized option: '%s'\n", name.c_str());
#endif
} else if (name == "clock") {
setClock( atoi(value.c_str()) );
} else if (name == "selectordir") {
setSelectorDir( value );
} else if (name == "selectorbrowser") {
if (value=="true") selectorbrowser = true;
} else if (name == "selectorscreens") {
setSelectorScreens( value );
} else if (name == "selectoraliases") {
setAliasFile( value );
} else {
} else
WARNING("Unrecognized option: '%s'\n", name.c_str());
break;
}
}
infile.close();