-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index 68da712..f536f4e 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp @@ -248,98 +248,100 @@ void WellenreiterConfigWindow::load() OConfig* c = oApp->config(); c->setGroup( "Interface" ); QString interface = c->readEntry( "name", "<none>" ); if ( interface != "<none>" ) { #if QT_VERSION < 300 interfaceName->insertItem( interface, 0 ); interfaceName->setCurrentItem( 0 ); #else interfaceName->setCurrentText( interface ); #endif QString device = c->readEntry( "type", "<select>" ); #if QT_VERSION < 300 for ( int i = 0; i < deviceType->count(); ++i ) { if ( deviceType->text( i ) == device ) { deviceType->setCurrentItem( i ); break; } } #else deviceType->setCurrentText( device ); #endif } else { performAutodetection(); } prismHeader->setChecked( c->readBoolEntry( "prism", false ) ); hopChannels->setChecked( c->readBoolEntry( "hop", true ) ); hopInterval->setValue( c->readNumEntry( "interval", 250 ) ); adaptiveHopping->setChecked( c->readBoolEntry( "adaptive", true ) ); c->setGroup( "Capture" ); captureFileName->setText( c->readEntry( "filename", "/tmp/capture" ) ); c->setGroup( "UI" ); lookupVendor->setChecked( c->readBoolEntry( "lookupVendor", true ) ); openTree->setChecked( c->readBoolEntry( "openTree", true ) ); disablePM->setChecked( c->readBoolEntry( "disablePM", true ) ); c->setGroup( "GPS" ); enableGPS->setChecked( c->readBoolEntry( "use", false ) ); #if QT_VERSION < 300 gpsdHost->insertItem( c->readEntry( "host", "localhost" ), 0 ); gpsdHost->setCurrentItem( 0 ); #else gpsdHost->setCurrentText( c->readEntry( "host", "localhost" ) ); #endif gpsdPort->setValue( c->readNumEntry( "port", 2947 ) ); startGPS->setChecked( c->readBoolEntry( "start", false ) ); commandGPS->setText( c->readEntry( "command", "gpsd -p /dev/ttyS3 -s 57600" ) ); #endif } void WellenreiterConfigWindow::save() { #ifdef Q_WS_X11 #warning Persistent Configuration not yet implemented for standalone X11 build #else qDebug( "saving configuration settings..." ); /* This is dumb monkey typing stuff... We _need_ to do this automatically! */ OConfig* c = oApp->config(); c->setGroup( "Interface" ); c->writeEntry( "name", interfaceName->currentText() ); c->writeEntry( "type", deviceType->currentText() ); c->writeEntry( "prism", prismHeader->isChecked() ); c->writeEntry( "hop", hopChannels->isChecked() ); c->writeEntry( "interval", hopInterval->value() ); c->writeEntry( "adaptive", adaptiveHopping->isChecked() ); c->setGroup( "Capture" ); c->writeEntry( "filename", captureFileName->text() ); c->setGroup( "UI" ); c->writeEntry( "lookupVendor", lookupVendor->isChecked() ); c->writeEntry( "openTree", openTree->isChecked() ); c->writeEntry( "disablePM", disablePM->isChecked() ); c->setGroup( "GPS" ); c->writeEntry( "use", enableGPS->isChecked() ); c->writeEntry( "host", gpsdHost->currentText() ); c->writeEntry( "port", gpsdPort->value() ); c->writeEntry( "start", startGPS->isChecked() ); c->writeEntry( "command", commandGPS->text() ); + c->write(); + #endif } |