1
0
Fork 0
forked from len0rd/rockbox

fix Tab navigation in rbutil, and make it also look at other places for rbutil.ini.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13603 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dominik Wenger 2007-06-09 20:34:00 +00:00
parent f3145ba07c
commit 19cc9d063a
8 changed files with 103 additions and 384 deletions

View file

@ -123,20 +123,19 @@ bool rbutilFrmApp::ReadGlobalConfig(rbutilFrm* myFrame)
wxLogVerbose(wxT("=== begin rbutilFrmApp::ReadGlobalConfig(%p)"),
(void*) myFrame);
// Cross-platform compatibility: look for rbutil.ini in the same dir as the
// executable before trying the standard data directory. On Windows these
// are of course the same directory.
buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->AppDir.c_str() );
// Cross-platform compatibility: look for rbutil.ini in then in the app dir
// then in the user config dir (linux ~/) and
// then config dir (linux /etc/ )
// if (! wxFileExists(buf) )
// {
// gv->ResourceDir = gv->stdpaths->GetResourcesDir();
// buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"),
// gv->ResourceDir.c_str() );
// } else
// {
// gv->ResourceDir = gv->AppDir;
// }
buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->AppDir.c_str() );
if (! wxFileExists(buf) )
{
buf.Printf(wxT("%s" PATH_SEP ".rbutil" PATH_SEP "rbutil.ini"), gv->stdpaths->GetUserConfigDir().c_str() );
if (! wxFileExists(buf) )
{
buf.Printf(wxT("%s" PATH_SEP "rbutil.ini"), gv->stdpaths->GetConfigDir().c_str() );
}
}
wxFileInputStream* cfgis = new wxFileInputStream(buf);