summaryrefslogtreecommitdiff
authordrw <drw>2002-12-08 23:52:11 (UTC)
committer drw <drw>2002-12-08 23:52:11 (UTC)
commit9c2b4d917af88b6051a3bc4273d6a50d124f65dd (patch) (side-by-side diff)
tree6bff583be5510315f516c43e0a1e1edefecce027
parentf6735fca221658fa6d638f7826f89eb8d79caa26 (diff)
downloadopie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.zip
opie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.tar.gz
opie-9c2b4d917af88b6051a3bc4273d6a50d124f65dd.tar.bz2
Fixed saving of new checkbooks and incorrect setting of notes.
Diffstat (more/less context) (ignore 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
@@ -83,25 +83,25 @@ void CBInfo::write()
f.remove();
}
Config *config = new Config(fn, Config::File);
// Save info
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;
for ( TranInfo *tran = tl->first(); tran; tran = tl->next() )
{
tran->write( config, i );
i++;
}
config->write();
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
@@ -195,24 +195,30 @@ void MainWindow::buildFilename( const QString &name )
tempFilename.append( name );
tempFilename.append( ".qcb" );
}
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;
}
void MainWindow::slotEdit()
{
QListViewItem *curritem = cbList->currentItem();
if ( !curritem )
{