1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-23 02:11:54 +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::size_type position = line.find("=");
string name = trim(line.substr(0,position)); string name = trim(line.substr(0,position));
string value = trim(line.substr(position+1)); 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 #ifdef HAVE_LIBOPK
if (!opk) { if (!opk) {
#endif #endif
@ -164,22 +176,11 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
} else if (name == "selectorfilter") { } else if (name == "selectorfilter") {
setSelectorFilter( value ); setSelectorFilter( value );
#ifdef HAVE_LIBOPK #ifdef HAVE_LIBOPK
} } else
WARNING("Unrecognized option: '%s'\n", name.c_str());
#endif #endif
} else if (name == "clock") { } else
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 {
WARNING("Unrecognized option: '%s'\n", name.c_str()); WARNING("Unrecognized option: '%s'\n", name.c_str());
break;
}
} }
infile.close(); infile.close();