author | andyq <andyq> | 2002-10-17 22:50:20 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-10-17 22:50:20 (UTC) |
commit | b61a21e46590228b6c5800d168fc57789ce733f6 (patch) (unidiff) | |
tree | da0732436919ccb19167eb124898615d499e5914 /noncore/settings/aqpkg/settingsimpl.cpp | |
parent | 51dbf76486cb81a7cb34c07483b344c8ea7a8a24 (diff) | |
download | opie-b61a21e46590228b6c5800d168fc57789ce733f6.zip opie-b61a21e46590228b6c5800d168fc57789ce733f6.tar.gz opie-b61a21e46590228b6c5800d168fc57789ce733f6.tar.bz2 |
Changed dlg to add linkToRoot checkbox to destinations tab
Diffstat (limited to 'noncore/settings/aqpkg/settingsimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 47 |
1 files changed, 39 insertions, 8 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; | |||
24 | #include <qtabwidget.h> | 24 | #include <qtabwidget.h> |
25 | #include <qcheckbox.h> | ||
26 | |||
27 | #ifdef QWS | ||
28 | #include <qpe/config.h> | ||
29 | #endif | ||
25 | 30 | ||
@@ -85,2 +90,3 @@ void SettingsImpl :: editServer( int sel ) | |||
85 | serverurl->setText( s->getServerUrl() ); | 90 | serverurl->setText( s->getServerUrl() ); |
91 | active->setChecked( s->isServerActive() ); | ||
86 | } | 92 | } |
@@ -93,2 +99,3 @@ void SettingsImpl :: newServer() | |||
93 | servername->setFocus(); | 99 | servername->setFocus(); |
100 | active->setChecked( true ); | ||
94 | } | 101 | } |
@@ -114,2 +121,4 @@ void SettingsImpl :: changeServerDetails() | |||
114 | s->setServerUrl( serverurl->text() ); | 121 | s->setServerUrl( serverurl->text() ); |
122 | s->setActive( active->isChecked() ); | ||
123 | |||
115 | 124 | ||
@@ -122,4 +131,4 @@ void SettingsImpl :: changeServerDetails() | |||
122 | // See if this server is the active server | 131 | // See if this server is the active server |
123 | if ( dataMgr->getActiveServer() == serverName ) | 132 | // if ( dataMgr->getActiveServer() == serverName ) |
124 | dataMgr->setActiveServer( newName ); | 133 | // dataMgr->setActiveServer( newName ); |
125 | 134 | ||
@@ -131,3 +140,5 @@ void SettingsImpl :: changeServerDetails() | |||
131 | { | 140 | { |
132 | dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) ); | 141 | Server s( newName, serverurl->text() ); |
142 | dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) ); | ||
143 | dataMgr->getServerList().end()->setActive( active->isChecked() ); | ||
133 | servers->insertItem( newName ); | 144 | servers->insertItem( newName ); |
@@ -143,6 +154,7 @@ void SettingsImpl :: editDestination( int sel ) | |||
143 | currentSelectedDestination = sel; | 154 | currentSelectedDestination = sel; |
144 | Destination *s = dataMgr->getDestination( destinations->currentText() ); | 155 | Destination *d = dataMgr->getDestination( destinations->currentText() ); |
145 | destinationName = s->getDestinationName(); | 156 | destinationName = d->getDestinationName(); |
146 | destinationname->setText( s->getDestinationName() ); | 157 | destinationname->setText( d->getDestinationName() ); |
147 | destinationurl->setText( s->getDestinationPath() ); | 158 | destinationurl->setText( d->getDestinationPath() ); |
159 | linkToRoot->setChecked( d->linkToRoot() ); | ||
148 | } | 160 | } |
@@ -155,2 +167,3 @@ void SettingsImpl :: newDestination() | |||
155 | destinationname->setFocus(); | 167 | destinationname->setFocus(); |
168 | linkToRoot->setChecked( true ); | ||
156 | } | 169 | } |
@@ -169,3 +182,8 @@ void SettingsImpl :: changeDestinationDetails() | |||
169 | 182 | ||
170 | QString newName = destinationname->text(); | 183 | #ifdef QWS |
184 | Config cfg( "aqpkg" ); | ||
185 | cfg.setGroup( "destinations" ); | ||
186 | #endif | ||
187 | |||
188 | QString newName = destinationname->text(); | ||
171 | if ( !newdestination ) | 189 | if ( !newdestination ) |
@@ -176,2 +194,3 @@ void SettingsImpl :: changeDestinationDetails() | |||
176 | d->setDestinationPath( destinationurl->text() ); | 194 | d->setDestinationPath( destinationurl->text() ); |
195 | d->linkToRoot( linkToRoot->isChecked() ); | ||
177 | 196 | ||
@@ -186,2 +205,8 @@ void SettingsImpl :: changeDestinationDetails() | |||
186 | } | 205 | } |
206 | #ifdef QWS | ||
207 | QString key = newName; | ||
208 | key += "_linkToRoot"; | ||
209 | int val = d->linkToRoot(); | ||
210 | cfg.writeEntry( key, val ); | ||
211 | #endif | ||
187 | } | 212 | } |
@@ -193,2 +218,8 @@ void SettingsImpl :: changeDestinationDetails() | |||
193 | newdestination = false; | 218 | newdestination = false; |
219 | |||
220 | #ifdef QWS | ||
221 | QString key = newName; | ||
222 | key += "_linkToRoot"; | ||
223 | cfg.writeEntry( key, true ); | ||
224 | #endif | ||
194 | } | 225 | } |