summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/checkbook/mainwindow.cpp') (more/less context) (ignore 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 )
55 55
56 cbDir = Global::applicationFileName( "checkbook", "" ); 56 cbDir = Global::applicationFileName( "checkbook", "" );
57 lockIcon = Resource::loadPixmap( "locked" ); 57 lockIcon = Resource::loadPixmap( "locked" );
58 58
59 // Load configuration options 59 // Load configuration options
60 Config config( "checkbook" ); 60 Config config( "checkbook" );
61qDebug( "Reading config" );
62 _cfg.readConfig( config ); 61 _cfg.readConfig( config );
63 62
64 63
65 // Build menu and tool bars 64 // Build menu and tool bars
66 setToolBarsMovable( FALSE ); 65 setToolBarsMovable( FALSE );
67 66
@@ -311,12 +310,18 @@ void MainWindow::openBook(QListViewItem *curritem)
311 if ( _cfg.getShowBalances() && cb->balance() != currbalance ) 310 if ( _cfg.getShowBalances() && cb->balance() != currbalance )
312 { 311 {
313 QString tempstr; 312 QString tempstr;
314 tempstr.sprintf( "%s%.2f", _cfg.getCurrencySymbol().latin1(), cb->balance() ); 313 tempstr.sprintf( "%s%.2f", _cfg.getCurrencySymbol().latin1(), cb->balance() );
315 curritem->setText( posName + 1, tempstr ); 314 curritem->setText( posName + 1, tempstr );
316 } 315 }
316
317 // write config, if needed
318 if( _cfg.isDirty() ) {
319 Config config("checkbook");
320 _cfg.writeConfig( config );
321 }
317 } 322 }
318 delete currcb; 323 delete currcb;
319} 324}
320 325
321// --- slotDelete ------------------------------------------------------------- 326// --- slotDelete -------------------------------------------------------------
322void MainWindow::slotDelete() 327void MainWindow::slotDelete()