Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index 81e89ed..9ee3a33 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp @@ -24,2 +24,7 @@ using namespace std; #include <qtabwidget.h> +#include <qcheckbox.h> + +#ifdef QWS +#include <qpe/config.h> +#endif @@ -85,2 +90,3 @@ void SettingsImpl :: editServer( int sel ) serverurl->setText( s->getServerUrl() ); + active->setChecked( s->isServerActive() ); } @@ -93,2 +99,3 @@ void SettingsImpl :: newServer() servername->setFocus(); + active->setChecked( true ); } @@ -114,2 +121,4 @@ void SettingsImpl :: changeServerDetails() s->setServerUrl( serverurl->text() ); + s->setActive( active->isChecked() ); + @@ -122,4 +131,4 @@ void SettingsImpl :: changeServerDetails() // See if this server is the active server - if ( dataMgr->getActiveServer() == serverName ) - dataMgr->setActiveServer( newName ); +// if ( dataMgr->getActiveServer() == serverName ) +// dataMgr->setActiveServer( newName ); @@ -131,3 +140,5 @@ void SettingsImpl :: changeServerDetails() { + Server s( newName, serverurl->text() ); dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) ); + dataMgr->getServerList().end()->setActive( active->isChecked() ); servers->insertItem( newName ); @@ -143,6 +154,7 @@ void SettingsImpl :: editDestination( int sel ) currentSelectedDestination = sel; - Destination *s = dataMgr->getDestination( destinations->currentText() ); - destinationName = s->getDestinationName(); - destinationname->setText( s->getDestinationName() ); - destinationurl->setText( s->getDestinationPath() ); + Destination *d = dataMgr->getDestination( destinations->currentText() ); + destinationName = d->getDestinationName(); + destinationname->setText( d->getDestinationName() ); + destinationurl->setText( d->getDestinationPath() ); + linkToRoot->setChecked( d->linkToRoot() ); } @@ -155,2 +167,3 @@ void SettingsImpl :: newDestination() destinationname->setFocus(); + linkToRoot->setChecked( true ); } @@ -169,2 +182,7 @@ void SettingsImpl :: changeDestinationDetails() +#ifdef QWS + Config cfg( "aqpkg" ); + cfg.setGroup( "destinations" ); +#endif + QString newName = destinationname->text(); @@ -176,2 +194,3 @@ void SettingsImpl :: changeDestinationDetails() d->setDestinationPath( destinationurl->text() ); + d->linkToRoot( linkToRoot->isChecked() ); @@ -186,2 +205,8 @@ void SettingsImpl :: changeDestinationDetails() } +#ifdef QWS + QString key = newName; + key += "_linkToRoot"; + int val = d->linkToRoot(); + cfg.writeEntry( key, val ); +#endif } @@ -193,2 +218,8 @@ void SettingsImpl :: changeDestinationDetails() newdestination = false; + +#ifdef QWS + QString key = newName; + key += "_linkToRoot"; + cfg.writeEntry( key, true ); +#endif } |