diff options
author | deva <deva> | 2005-04-05 11:22:05 +0000 |
---|---|---|
committer | deva <deva> | 2005-04-05 11:22:05 +0000 |
commit | 55a7afdedc7cee2df9012f600dd51aff92ad1af3 (patch) | |
tree | db6568a6aab7cfdec0d0afcb9bd7566939a4a318 /src/mainwindow.cc | |
parent | 6f03a23e7876516d3ba011d23acf454138432654 (diff) |
Added validity checking on the conf parser.
Added error object to conf parser.
Cleaned up the configure.in script
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r-- | src/mainwindow.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 5da340b..8bfc53e 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -50,9 +50,15 @@ MainWindow::MainWindow( QWidget* parent, const char* name ) : QWidget( parent, name, WStyle_Customize | WStyle_NoBorder ) { - MiavConfig cfg("miav.conf"); + error = new Error(); + MiavConfig cfg("miav.conf", error); int resolution_w = cfg.readInt("pixel_width"); int resolution_h = cfg.readInt("pixel_height"); + while(error->hasError()) { + show(); + MessageBox(this, TXT_ERROR_TITLE, error->popErrorString().c_str(), + TYPE_OK, ICON_ERROR).exec(); + } unit = ((float)resolution_w / (float)(cfg.readFloat("screensize") * 3.1f)); move(0,0); |