-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 22 | ||||
-rw-r--r-- | noncore/settings/aqpkg/datamgr.h | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 22 |
3 files changed, 25 insertions, 21 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 089c3e3..f342aff 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -135,26 +135,26 @@ void DataManager :: loadServers() | |||
135 | } | 135 | } |
136 | fclose( fp ); | 136 | fclose( fp ); |
137 | 137 | ||
138 | vector<Server>::iterator it; | 138 | reloadServerData( ); |
139 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) | ||
140 | reloadServerData( it->getServerName() ); | ||
141 | } | 139 | } |
142 | 140 | ||
143 | void DataManager :: reloadServerData( const char *serverName ) | 141 | void DataManager :: reloadServerData( ) |
142 | { | ||
143 | vector<Server>::iterator it = serverList.begin(); | ||
144 | for ( it = serverList.begin() ; it != serverList.end() ; ++it ) | ||
144 | { | 145 | { |
145 | Server *s = getServer( serverName ); | ||
146 | // Now we've read the config file in we need to read the servers | 146 | // Now we've read the config file in we need to read the servers |
147 | // The local server is a special case. This holds the contents of the | 147 | // The local server is a special case. This holds the contents of the |
148 | // status files the number of which depends on how many destinations | 148 | // status files the number of which depends on how many destinations |
149 | // we've set up | 149 | // we've set up |
150 | // The other servers files hold the contents of the server package list | 150 | // The other servers files hold the contents of the server package list |
151 | if ( s->getServerName() == LOCAL_SERVER ) | 151 | if ( it->getServerName() == LOCAL_SERVER ) |
152 | s->readStatusFile( destList ); | 152 | it->readStatusFile( destList ); |
153 | else if ( s->getServerName() == LOCAL_IPKGS ) | 153 | else if ( it->getServerName() == LOCAL_IPKGS ) |
154 | s->readLocalIpks( getServer( LOCAL_SERVER ) ); | 154 | it->readLocalIpks( getServer( LOCAL_SERVER ) ); |
155 | else | 155 | else |
156 | s->readPackageFile( getServer( LOCAL_SERVER ) ); | 156 | it->readPackageFile( getServer( LOCAL_SERVER ) ); |
157 | 157 | } | |
158 | } | 158 | } |
159 | 159 | ||
160 | void DataManager :: writeOutIpkgConf() | 160 | void DataManager :: writeOutIpkgConf() |
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index eb802b5..8c6fb0d 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h | |||
@@ -49,7 +49,7 @@ public: | |||
49 | Destination *getDestination( const char *name ); | 49 | Destination *getDestination( const char *name ); |
50 | 50 | ||
51 | void loadServers(); | 51 | void loadServers(); |
52 | void reloadServerData( const char *sn ); | 52 | void reloadServerData( ); |
53 | 53 | ||
54 | void writeOutIpkgConf(); | 54 | void writeOutIpkgConf(); |
55 | 55 | ||
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index 02e4e73..b5d7352 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp | |||
@@ -215,12 +215,12 @@ void NetworkPackageManager :: serverSelected( int ) | |||
215 | #endif | 215 | #endif |
216 | 216 | ||
217 | Server *s = dataMgr->getServer( serverName ); | 217 | Server *s = dataMgr->getServer( serverName ); |
218 | // dataMgr->setActiveServer( serverName ); | ||
219 | 218 | ||
220 | vector<Package> &list = s->getPackageList(); | 219 | vector<Package> &list = s->getPackageList(); |
221 | vector<Package>::iterator it; | 220 | vector<Package>::iterator it; |
222 | for ( it = list.begin() ; it != list.end() ; ++it ) | 221 | for ( it = list.begin() ; it != list.end() ; ++it ) |
223 | { | 222 | { |
223 | |||
224 | QString text = ""; | 224 | QString text = ""; |
225 | 225 | ||
226 | // If the local server, only display installed packages | 226 | // If the local server, only display installed packages |
@@ -235,6 +235,7 @@ void NetworkPackageManager :: serverSelected( int ) | |||
235 | // If a different version of package is available, postfix it with an * | 235 | // If a different version of package is available, postfix it with an * |
236 | if ( it->getVersion() != it->getInstalledVersion() ) | 236 | if ( it->getVersion() != it->getInstalledVersion() ) |
237 | { | 237 | { |
238 | |||
238 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) | 239 | if ( compareVersions( it->getInstalledVersion(), it->getVersion() ) == 1 ) |
239 | text += "*"; | 240 | text += "*"; |
240 | } | 241 | } |
@@ -264,12 +265,19 @@ void NetworkPackageManager :: serverSelected( int ) | |||
264 | else | 265 | else |
265 | new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() ); | 266 | new QCheckListItem( item, QString( "Filename - " ) + it->getFilename() ); |
266 | 267 | ||
268 | if ( serverName == LOCAL_SERVER ) | ||
269 | { | ||
270 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getVersion() ); | ||
271 | } | ||
272 | else | ||
273 | { | ||
267 | new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); | 274 | new QCheckListItem( item, QString( "V. Available - " ) + it->getVersion() ); |
268 | if ( it->getLocalPackage() ) | 275 | if ( it->getLocalPackage() ) |
269 | { | 276 | { |
270 | if ( it->isInstalled() ) | 277 | if ( it->isInstalled() ) |
271 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); | 278 | new QCheckListItem( item, QString( "V. Installed - " ) + it->getInstalledVersion() ); |
272 | } | 279 | } |
280 | } | ||
273 | packagesList->insertItem( item ); | 281 | packagesList->insertItem( item ); |
274 | } | 282 | } |
275 | 283 | ||
@@ -317,7 +325,7 @@ void NetworkPackageManager :: updateServer() | |||
317 | dlg.showDlg(); | 325 | dlg.showDlg(); |
318 | 326 | ||
319 | // Reload data | 327 | // Reload data |
320 | dataMgr->reloadServerData( serversList->currentText() ); | 328 | dataMgr->reloadServerData(); |
321 | serverSelected(-1); | 329 | serverSelected(-1); |
322 | // delete progDlg; | 330 | // delete progDlg; |
323 | } | 331 | } |
@@ -346,9 +354,7 @@ void NetworkPackageManager :: upgradePackages() | |||
346 | dlg.showDlg(); | 354 | dlg.showDlg(); |
347 | 355 | ||
348 | // Reload data | 356 | // Reload data |
349 | dataMgr->reloadServerData( LOCAL_SERVER ); | 357 | dataMgr->reloadServerData(); |
350 | |||
351 | dataMgr->reloadServerData( serversList->currentText() ); | ||
352 | serverSelected(-1); | 358 | serverSelected(-1); |
353 | } | 359 | } |
354 | } | 360 | } |
@@ -436,7 +442,7 @@ void NetworkPackageManager :: downloadPackage() | |||
436 | } | 442 | } |
437 | } | 443 | } |
438 | 444 | ||
439 | dataMgr->reloadServerData( LOCAL_IPKGS ); | 445 | dataMgr->reloadServerData(); |
440 | serverSelected( -1 ); | 446 | serverSelected( -1 ); |
441 | } | 447 | } |
442 | 448 | ||
@@ -477,9 +483,7 @@ void NetworkPackageManager :: applyChanges() | |||
477 | dlg.showDlg(); | 483 | dlg.showDlg(); |
478 | 484 | ||
479 | // Reload data | 485 | // Reload data |
480 | dataMgr->reloadServerData( LOCAL_SERVER ); | 486 | dataMgr->reloadServerData(); |
481 | |||
482 | dataMgr->reloadServerData( serversList->currentText() ); | ||
483 | serverSelected(-1); | 487 | serverSelected(-1); |
484 | 488 | ||
485 | #ifdef QWS | 489 | #ifdef QWS |