1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-12-27 11:49:54 +02:00

Read config file(s) present on both system and user-specific directories.

This commit is contained in:
Ayla 2011-08-11 03:40:36 +02:00
parent 7f08e854ea
commit 3d3e0fa566
2 changed files with 9 additions and 1 deletions

View File

@ -632,7 +632,14 @@ void GMenu2X::viewLog() {
}
void GMenu2X::readConfig() {
string conffile = getHome() + "/gmenu2x.conf";
string conffile = GMENU2X_SYSTEM_DIR "/gmenu2x.conf";
readConfig(conffile);
conffile = getHome() + "/gmenu2x.conf";
readConfig(conffile);
}
void GMenu2X::readConfig(string conffile) {
if (fileExists(conffile)) {
ifstream inf(conffile.c_str(), ios_base::in);
if (inf.is_open()) {

View File

@ -136,6 +136,7 @@ private:
string ip, defaultgw, lastSelectorDir;
int lastSelectorElement;
void readConfig();
void readConfig(string path);
void readTmp();
void initServices();