Date:2011-08-11 03:40:36 (12 years 7 months ago)
Author:Paul Cercueil
Commit:3d3e0fa5669e680e3545b0e8ebed17fca4c8ef6a
Message:Read config file(s) present on both system and user-specific directories.

Files: src/gmenu2x.cpp (1 diff)
src/gmenu2x.h (1 diff)

Change Details

src/gmenu2x.cpp
632632}
633633
634634void GMenu2X::readConfig() {
635    string conffile = getHome() + "/gmenu2x.conf";
635    string conffile = GMENU2X_SYSTEM_DIR "/gmenu2x.conf";
636    readConfig(conffile);
637
638    conffile = getHome() + "/gmenu2x.conf";
639    readConfig(conffile);
640}
641
642void GMenu2X::readConfig(string conffile) {
636643    if (fileExists(conffile)) {
637644        ifstream inf(conffile.c_str(), ios_base::in);
638645        if (inf.is_open()) {
src/gmenu2x.h
136136    string ip, defaultgw, lastSelectorDir;
137137    int lastSelectorElement;
138138    void readConfig();
139    void readConfig(string path);
139140    void readTmp();
140141
141142    void initServices();

Archive Download the corresponding diff file



interactive