-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/aqpkg/server.cpp | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index 0814121..cf94628 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp @@ -64,57 +64,58 @@ NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget showInstalledPkgs = false; showUpgradedPkgs = false; categoryFilterEnabled = false; initGui(); setupConnections(); updateData(); } NetworkPackageManager::~NetworkPackageManager() { } void NetworkPackageManager :: timerEvent ( QTimerEvent * ) { killTimer( timerId ); // Add server names to listbox updateData(); } void NetworkPackageManager :: updateData() { - serversList->clear(); + serversList->clear(); packagesList->clear(); vector<Server>::iterator it; int activeItem = -1; int i; for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i ) { + cout << "Adding " << it->getServerName() << " to combobox" << endl; if ( !it->isServerActive() ) { i--; continue; } serversList->insertItem( it->getServerName() ); if ( it->getServerName() == currentlySelectedServer ) activeItem = i; } // set selected server to be active server if ( activeItem != -1 ) serversList->setCurrentItem( activeItem ); serverSelected( 0 ); } void NetworkPackageManager :: selectLocalPackage( const QString &pkg ) { // First select local server for ( int i = 0 ; i < serversList->count() ; ++i ) { if ( serversList->text( i ) == LOCAL_IPKGS ) { serversList->setCurrentItem( i ); diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index 726cf00..58407d5 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp @@ -24,48 +24,49 @@ #include <stdlib.h> #include <iostream> #include <fstream> using namespace std; #include "server.h" #include "datamgr.h" #ifdef QWS #include <qpe/global.h> #include <qpe/applnk.h> #include <qlist.h> #endif #include "utils.h" #include "global.h" Server :: Server( const char *name, const char *url ) { serverName = name; serverUrl = url; packageFile = IPKG_DIR; + active = true; packageFile += "lists/" + serverName; } Server :: ~Server() { cleanUp(); } void Server :: cleanUp() { packageList.clear(); } void Server :: readStatusFile( vector<Destination> &destList ) { cleanUp(); vector<Destination>::iterator dit; bool rootRead = false; for ( dit = destList.begin() ; dit != destList.end() ; ++dit ) { bool installingToRoot = false; QString path = dit->getDestinationPath(); |