author | mickeyl <mickeyl> | 2003-10-30 13:18:08 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-30 13:18:08 (UTC) |
commit | 37414f207b147af4cf6778b323a0aa23127901bd (patch) (unidiff) | |
tree | b08c10043ab689b0a40425d268cd72226799b0cf /noncore/apps/checkbook/cfg.cpp | |
parent | d53637f46cf217fc760d7aac58b4596843a73803 (diff) | |
download | opie-37414f207b147af4cf6778b323a0aa23127901bd.zip opie-37414f207b147af4cf6778b323a0aa23127901bd.tar.gz opie-37414f207b147af4cf6778b323a0aa23127901bd.tar.bz2 |
apply patch to HEAD
Diffstat (limited to 'noncore/apps/checkbook/cfg.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/cfg.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/noncore/apps/checkbook/cfg.cpp b/noncore/apps/checkbook/cfg.cpp index 1e0ec5c..0d5d9ed 100644 --- a/noncore/apps/checkbook/cfg.cpp +++ b/noncore/apps/checkbook/cfg.cpp | |||
@@ -43,6 +43,7 @@ Cfg::Cfg() | |||
43 | _showLocks=FALSE; | 43 | _showLocks=FALSE; |
44 | _showBalances=FALSE; | 44 | _showBalances=FALSE; |
45 | _pCategories=new CategoryList(); | 45 | _pCategories=new CategoryList(); |
46 | _bDirty=false; | ||
46 | } | 47 | } |
47 | 48 | ||
48 | // --- readStringList --------------------------------------------------------- | 49 | // --- readStringList --------------------------------------------------------- |
@@ -52,8 +53,6 @@ Cfg::Cfg() | |||
52 | // entries. | 53 | // entries. |
53 | void Cfg::readStringList(Config &cfg, const char *sKey, QStringList &lst) | 54 | void Cfg::readStringList(Config &cfg, const char *sKey, QStringList &lst) |
54 | { | 55 | { |
55 | qDebug( "%s", sKey ); | ||
56 | |||
57 | QString sEntry; | 56 | QString sEntry; |
58 | int iCount; | 57 | int iCount; |
59 | 58 | ||
@@ -86,6 +85,7 @@ void Cfg::readConfig(Config &config) | |||
86 | _openLastBook = config.readBoolEntry( "OpenLastBook", FALSE ); | 85 | _openLastBook = config.readBoolEntry( "OpenLastBook", FALSE ); |
87 | _sLastBook = config.readEntry("LastBook", ""); | 86 | _sLastBook = config.readEntry("LastBook", ""); |
88 | _showLastTab = config.readBoolEntry( "ShowLastTab", FALSE ); | 87 | _showLastTab = config.readBoolEntry( "ShowLastTab", FALSE ); |
88 | _bSavePayees = config.readBoolEntry( "SavePayees", FALSE ); | ||
89 | 89 | ||
90 | // Account types | 90 | // Account types |
91 | readStringList(config, "AccType", _AccountTypes); | 91 | readStringList(config, "AccType", _AccountTypes); |
@@ -100,6 +100,9 @@ void Cfg::readConfig(Config &config) | |||
100 | config.write(); | 100 | config.write(); |
101 | } | 101 | } |
102 | 102 | ||
103 | // Payees | ||
104 | readStringList(config, "Payee", _Payees); | ||
105 | |||
103 | // Read Categories | 106 | // Read Categories |
104 | QStringList lst; | 107 | QStringList lst; |
105 | readStringList(config, "Category", lst); | 108 | readStringList(config, "Category", lst); |
@@ -131,6 +134,9 @@ void Cfg::readConfig(Config &config) | |||
131 | } else { | 134 | } else { |
132 | setCategories(lst); | 135 | setCategories(lst); |
133 | } | 136 | } |
137 | |||
138 | // not dirty | ||
139 | _bDirty=false; | ||
134 | } | 140 | } |
135 | 141 | ||
136 | 142 | ||
@@ -166,16 +172,21 @@ void Cfg::writeConfig(Config &config) | |||
166 | config.writeEntry( "OpenLastBook", _openLastBook ); | 172 | config.writeEntry( "OpenLastBook", _openLastBook ); |
167 | config.writeEntry( "LastBook", _sLastBook ); | 173 | config.writeEntry( "LastBook", _sLastBook ); |
168 | config.writeEntry( "ShowLastTab", _showLastTab ); | 174 | config.writeEntry( "ShowLastTab", _showLastTab ); |
175 | config.writeEntry( "SavePayees", _bSavePayees ); | ||
169 | 176 | ||
170 | // write account types | 177 | // write account types |
171 | writeStringList(config, "AccType", _AccountTypes); | 178 | writeStringList(config, "AccType", _AccountTypes); |
172 | 179 | ||
180 | // write payees | ||
181 | writeStringList(config, "Payee", _Payees); | ||
182 | |||
173 | // write categories | 183 | // write categories |
174 | QStringList lst=getCategories(); | 184 | QStringList lst=getCategories(); |
175 | writeStringList(config, "Category", lst ); | 185 | writeStringList(config, "Category", lst ); |
176 | 186 | ||
177 | // commit write | 187 | // commit write |
178 | config.write(); | 188 | config.write(); |
189 | _bDirty=false; | ||
179 | } | 190 | } |
180 | 191 | ||
181 | 192 | ||