author | andyq <andyq> | 2002-11-21 18:13:00 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-21 18:13:00 (UTC) |
commit | a73b7fa027ccbcc8c4eabb93a167ba992440514b (patch) (side-by-side diff) | |
tree | 894a624647196869fb7b3aaf641363c5ad18d8f5 /noncore/settings/aqpkg | |
parent | 5e806f161bc0bde64d5058dab4850c45aeba2cdf (diff) | |
download | opie-a73b7fa027ccbcc8c4eabb93a167ba992440514b.zip opie-a73b7fa027ccbcc8c4eabb93a167ba992440514b.tar.gz opie-a73b7fa027ccbcc8c4eabb93a167ba992440514b.tar.bz2 |
Changed debug message slightly
-rw-r--r-- | noncore/settings/aqpkg/networkpkgmgr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp index cf94628..e8e2982 100644 --- a/noncore/settings/aqpkg/networkpkgmgr.cpp +++ b/noncore/settings/aqpkg/networkpkgmgr.cpp @@ -49,99 +49,100 @@ extern int compareVersions( const char *v1, const char *v2 ); NetworkPackageManager::NetworkPackageManager( DataManager *dataManager, QWidget *parent, const char *name) : QWidget(parent, name) { dataMgr = dataManager; #ifdef QWS // read download directory from config file Config cfg( "aqpkg" ); cfg.setGroup( "settings" ); currentlySelectedServer = cfg.readEntry( "selectedServer", "local" ); showJumpTo = cfg.readBoolEntry( "showJumpTo", "true" ); #endif showUninstalledPkgs = false; 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(); 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; +// cout << "Adding " << it->getServerName() << " to combobox" << endl; if ( !it->isServerActive() ) { + cout << it->getServerName() << " is not active" << endl; 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 ); break; } } serverSelected( 0 ); // Now set the check box of the selected package for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); item != 0 ; item = (QCheckListItem *)item->nextSibling() ) { if ( item->text().startsWith( pkg ) ) { item->setOn( true ); break; } } } void NetworkPackageManager :: initGui() { QLabel *l = new QLabel( "Servers", this ); serversList = new QComboBox( this ); packagesList = new QListView( this ); update = new QPushButton( "Refresh Lists", this ); download = new QPushButton( "Download", this ); |