summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/cfg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook/cfg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/cfg.cpp15
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()
_showLocks=FALSE;
_showBalances=FALSE;
_pCategories=new CategoryList();
+ _bDirty=false;
}
// --- readStringList ---------------------------------------------------------
@@ -52,8 +53,6 @@ Cfg::Cfg()
// entries.
void Cfg::readStringList(Config &cfg, const char *sKey, QStringList &lst)
{
-qDebug( "%s", sKey );
-
QString sEntry;
int iCount;
@@ -86,6 +85,7 @@ void Cfg::readConfig(Config &config)
_openLastBook = config.readBoolEntry( "OpenLastBook", FALSE );
_sLastBook = config.readEntry("LastBook", "");
_showLastTab = config.readBoolEntry( "ShowLastTab", FALSE );
+ _bSavePayees = config.readBoolEntry( "SavePayees", FALSE );
// Account types
readStringList(config, "AccType", _AccountTypes);
@@ -100,6 +100,9 @@ void Cfg::readConfig(Config &config)
config.write();
}
+ // Payees
+ readStringList(config, "Payee", _Payees);
+
// Read Categories
QStringList lst;
readStringList(config, "Category", lst);
@@ -131,6 +134,9 @@ void Cfg::readConfig(Config &config)
} else {
setCategories(lst);
}
+
+ // not dirty
+ _bDirty=false;
}
@@ -166,16 +172,21 @@ void Cfg::writeConfig(Config &config)
config.writeEntry( "OpenLastBook", _openLastBook );
config.writeEntry( "LastBook", _sLastBook );
config.writeEntry( "ShowLastTab", _showLastTab );
+ config.writeEntry( "SavePayees", _bSavePayees );
// write account types
writeStringList(config, "AccType", _AccountTypes);
+ // write payees
+ writeStringList(config, "Payee", _Payees);
+
// write categories
QStringList lst=getCategories();
writeStringList(config, "Category", lst );
// commit write
config.write();
+ _bDirty=false;
}