summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/cbinfo.cpp2
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp6
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()
config->setGroup( "Account" );
config->writeEntryCrypt( "Password", pw );
config->writeEntry( "Type", t );
config->writeEntry( "Bank", bn );
config->writeEntryCrypt( "Number", a );
config->writeEntryCrypt( "PINNumber", p );
- config->writeEntry( "Notes", n );
+ config->writeEntry( "Notes", nt );
QString balstr;
balstr.setNum( sb, 'f', 2 );
config->writeEntry( "Balance", balstr );
// Save transactions
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()
CBInfo *cb = new CBInfo();
Checkbook *currcb = new Checkbook( this, cb, currencySymbol );
currcb->showMaximized();
if ( currcb->exec() == QDialog::Accepted )
{
+ // Save new checkbook
+ buildFilename( cb->name() );
+ cb->setFilename( tempFilename );
+ cb->write();
+
+ // Add to listbox
checkbooks->inSort( cb );
addCheckbook( cb );
}
delete currcb;
}