mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 18:56:17 +02:00
Read config file(s) present on both system and user-specific directories.
This commit is contained in:
parent
7f08e854ea
commit
3d3e0fa566
@ -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()) {
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user