summaryrefslogtreecommitdiff
authorandyq <andyq>2002-11-21 18:11:40 (UTC)
committer andyq <andyq>2002-11-21 18:11:40 (UTC)
commit5e806f161bc0bde64d5058dab4850c45aeba2cdf (patch) (unidiff)
treee93f10fe052da154b1cfe42bdbf5f29ef8749bc4
parent5b0e9483f45967da95dc05d770197c631b959070 (diff)
downloadopie-5e806f161bc0bde64d5058dab4850c45aeba2cdf.zip
opie-5e806f161bc0bde64d5058dab4850c45aeba2cdf.tar.gz
opie-5e806f161bc0bde64d5058dab4850c45aeba2cdf.tar.bz2
Fixed bug where installed and local ipkg servers weren't shown (hopefully)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp3
-rw-r--r--noncore/settings/aqpkg/server.cpp1
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
@@ -82,21 +82,22 @@ void NetworkPackageManager :: timerEvent ( QTimerEvent * )
82 // Add server names to listbox 82 // Add server names to listbox
83 updateData(); 83 updateData();
84} 84}
85 85
86void NetworkPackageManager :: updateData() 86void NetworkPackageManager :: updateData()
87{ 87{
88 serversList->clear(); 88 serversList->clear();
89 packagesList->clear(); 89 packagesList->clear();
90 90
91 91
92 vector<Server>::iterator it; 92 vector<Server>::iterator it;
93 int activeItem = -1; 93 int activeItem = -1;
94 int i; 94 int i;
95 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i ) 95 for ( i = 0, it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it, ++i )
96 { 96 {
97 cout << "Adding " << it->getServerName() << " to combobox" << endl;
97 if ( !it->isServerActive() ) 98 if ( !it->isServerActive() )
98 { 99 {
99 i--; 100 i--;
100 continue; 101 continue;
101 } 102 }
102 serversList->insertItem( it->getServerName() ); 103 serversList->insertItem( it->getServerName() );
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
@@ -42,12 +42,13 @@ using namespace std;
42 42
43Server :: Server( const char *name, const char *url ) 43Server :: Server( const char *name, const char *url )
44{ 44{
45 serverName = name; 45 serverName = name;
46 serverUrl = url; 46 serverUrl = url;
47 packageFile = IPKG_DIR; 47 packageFile = IPKG_DIR;
48 active = true;
48 packageFile += "lists/" + serverName; 49 packageFile += "lists/" + serverName;
49} 50}
50 51
51Server :: ~Server() 52Server :: ~Server()
52{ 53{
53 cleanUp(); 54 cleanUp();