-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 | |||
@@ -76,33 +76,34 @@ NetworkPackageManager::~NetworkPackageManager() | |||
76 | } | 76 | } |
77 | 77 | ||
78 | void NetworkPackageManager :: timerEvent ( QTimerEvent * ) | 78 | void NetworkPackageManager :: timerEvent ( QTimerEvent * ) |
79 | { | 79 | { |
80 | killTimer( timerId ); | 80 | killTimer( timerId ); |
81 | 81 | ||
82 | // Add server names to listbox | 82 | // Add server names to listbox |
83 | updateData(); | 83 | updateData(); |
84 | } | 84 | } |
85 | 85 | ||
86 | void NetworkPackageManager :: updateData() | 86 | void 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() ); |
103 | if ( it->getServerName() == currentlySelectedServer ) | 104 | if ( it->getServerName() == currentlySelectedServer ) |
104 | activeItem = i; | 105 | activeItem = i; |
105 | } | 106 | } |
106 | 107 | ||
107 | // set selected server to be active server | 108 | // set selected server to be active server |
108 | if ( activeItem != -1 ) | 109 | if ( activeItem != -1 ) |
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 | |||
@@ -36,24 +36,25 @@ using namespace std; | |||
36 | #include <qlist.h> | 36 | #include <qlist.h> |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include "utils.h" | 39 | #include "utils.h" |
40 | 40 | ||
41 | #include "global.h" | 41 | #include "global.h" |
42 | 42 | ||
43 | Server :: Server( const char *name, const char *url ) | 43 | Server :: 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 | ||
51 | Server :: ~Server() | 52 | Server :: ~Server() |
52 | { | 53 | { |
53 | cleanUp(); | 54 | cleanUp(); |
54 | } | 55 | } |
55 | 56 | ||
56 | void Server :: cleanUp() | 57 | void Server :: cleanUp() |
57 | { | 58 | { |
58 | packageList.clear(); | 59 | packageList.clear(); |
59 | } | 60 | } |