1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-23 04:54:04 +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() { 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)) { if (fileExists(conffile)) {
ifstream inf(conffile.c_str(), ios_base::in); ifstream inf(conffile.c_str(), ios_base::in);
if (inf.is_open()) { if (inf.is_open()) {

View File

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