author | drw <drw> | 2002-12-08 23:52:11 (UTC) |
---|---|---|
committer | drw <drw> | 2002-12-08 23:52:11 (UTC) |
commit | 9c2b4d917af88b6051a3bc4273d6a50d124f65dd (patch) (unidiff) | |
tree | 6bff583be5510315f516c43e0a1e1edefecce027 | |
parent | f6735fca221658fa6d638f7826f89eb8d79caa26 (diff) | |
download | opie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.zip opie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.tar.gz opie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.tar.bz2 |
Fixed saving of new checkbooks and incorrect setting of notes.
-rw-r--r-- | noncore/apps/checkbook/cbinfo.cpp | 2 | ||||
-rw-r--r-- | noncore/apps/checkbook/mainwindow.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/cbinfo.cpp b/noncore/apps/checkbook/cbinfo.cpp index 3a39317..9fdc6b2 100644 --- a/noncore/apps/checkbook/cbinfo.cpp +++ b/noncore/apps/checkbook/cbinfo.cpp | |||
@@ -89,13 +89,13 @@ void CBInfo::write() | |||
89 | config->setGroup( "Account" ); | 89 | config->setGroup( "Account" ); |
90 | config->writeEntryCrypt( "Password", pw ); | 90 | config->writeEntryCrypt( "Password", pw ); |
91 | config->writeEntry( "Type", t ); | 91 | config->writeEntry( "Type", t ); |
92 | config->writeEntry( "Bank", bn ); | 92 | config->writeEntry( "Bank", bn ); |
93 | config->writeEntryCrypt( "Number", a ); | 93 | config->writeEntryCrypt( "Number", a ); |
94 | config->writeEntryCrypt( "PINNumber", p ); | 94 | config->writeEntryCrypt( "PINNumber", p ); |
95 | config->writeEntry( "Notes", n ); | 95 | config->writeEntry( "Notes", nt ); |
96 | QString balstr; | 96 | QString balstr; |
97 | balstr.setNum( sb, 'f', 2 ); | 97 | balstr.setNum( sb, 'f', 2 ); |
98 | config->writeEntry( "Balance", balstr ); | 98 | config->writeEntry( "Balance", balstr ); |
99 | 99 | ||
100 | // Save transactions | 100 | // Save transactions |
101 | int i = 1; | 101 | int i = 1; |
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp index 68c6aee..cabd231 100644 --- a/noncore/apps/checkbook/mainwindow.cpp +++ b/noncore/apps/checkbook/mainwindow.cpp | |||
@@ -201,12 +201,18 @@ void MainWindow::slotNew() | |||
201 | CBInfo *cb = new CBInfo(); | 201 | CBInfo *cb = new CBInfo(); |
202 | 202 | ||
203 | Checkbook *currcb = new Checkbook( this, cb, currencySymbol ); | 203 | Checkbook *currcb = new Checkbook( this, cb, currencySymbol ); |
204 | currcb->showMaximized(); | 204 | currcb->showMaximized(); |
205 | if ( currcb->exec() == QDialog::Accepted ) | 205 | if ( currcb->exec() == QDialog::Accepted ) |
206 | { | 206 | { |
207 | // Save new checkbook | ||
208 | buildFilename( cb->name() ); | ||
209 | cb->setFilename( tempFilename ); | ||
210 | cb->write(); | ||
211 | |||
212 | // Add to listbox | ||
207 | checkbooks->inSort( cb ); | 213 | checkbooks->inSort( cb ); |
208 | addCheckbook( cb ); | 214 | addCheckbook( cb ); |
209 | } | 215 | } |
210 | delete currcb; | 216 | delete currcb; |
211 | } | 217 | } |
212 | 218 | ||