summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index 8d64cad..bf00102 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -55,13 +55,12 @@ MainWindow::MainWindow( QWidget* parent, const char* name, WFlags fl )
cbDir = Global::applicationFileName( "checkbook", "" );
lockIcon = Resource::loadPixmap( "locked" );
// Load configuration options
Config config( "checkbook" );
-qDebug( "Reading config" );
_cfg.readConfig( config );
// Build menu and tool bars
setToolBarsMovable( FALSE );
@@ -311,12 +310,18 @@ void MainWindow::openBook(QListViewItem *curritem)
if ( _cfg.getShowBalances() && cb->balance() != currbalance )
{
QString tempstr;
tempstr.sprintf( "%s%.2f", _cfg.getCurrencySymbol().latin1(), cb->balance() );
curritem->setText( posName + 1, tempstr );
}
+
+ // write config, if needed
+ if( _cfg.isDirty() ) {
+ Config config("checkbook");
+ _cfg.writeConfig( config );
+ }
}
delete currcb;
}
// --- slotDelete -------------------------------------------------------------
void MainWindow::slotDelete()