author | andyq <andyq> | 2002-11-17 20:03:25 (UTC) |
---|---|---|
committer | andyq <andyq> | 2002-11-17 20:03:25 (UTC) |
commit | d94c9d39ab6e744f848a04c07eac03f20c91987c (patch) (unidiff) | |
tree | a9f32cca7c59ae565ab9caa3caf567100ed07cb4 /noncore/settings/aqpkg/datamgr.cpp | |
parent | a94877f543bf0ebc2ec9c4c931cb5f21713b7872 (diff) | |
download | opie-d94c9d39ab6e744f848a04c07eac03f20c91987c.zip opie-d94c9d39ab6e744f848a04c07eac03f20c91987c.tar.gz opie-d94c9d39ab6e744f848a04c07eac03f20c91987c.tar.bz2 |
Added filter by category, and added extra fields to package display (Section and size)
Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/datamgr.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index f342aff..1420242 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -23,19 +23,21 @@ using namespace std; | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #include <stdio.h> | 25 | #include <stdio.h> |
26 | 26 | ||
27 | #include "datamgr.h" | 27 | #include "datamgr.h" |
28 | #include "global.h" | 28 | #include "global.h" |
29 | 29 | ||
30 | 30 | ||
31 | QString DataManager::availableCategories = ""; | ||
31 | DataManager::DataManager() | 32 | DataManager::DataManager() |
32 | { | 33 | { |
33 | activeServer = ""; | 34 | activeServer = ""; |
35 | availableCategories = "#"; | ||
34 | } | 36 | } |
35 | 37 | ||
36 | DataManager::~DataManager() | 38 | DataManager::~DataManager() |
37 | { | 39 | { |
38 | } | 40 | } |
39 | 41 | ||
40 | Server *DataManager :: getServer( const char *name ) | 42 | Server *DataManager :: getServer( const char *name ) |
41 | { | 43 | { |
@@ -202,8 +204,16 @@ void DataManager :: writeOutIpkgConf() | |||
202 | while ( it2 != destList.end() ) | 204 | while ( it2 != destList.end() ) |
203 | { | 205 | { |
204 | out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; | 206 | out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; |
205 | it2++; | 207 | it2++; |
206 | } | 208 | } |
207 | 209 | ||
208 | out.close(); | 210 | out.close(); |
209 | } | 211 | } |
212 | |||
213 | |||
214 | void DataManager :: setAvailableCategories( QString section ) | ||
215 | { | ||
216 | section = section.lower(); | ||
217 | if ( availableCategories.find( "#" + section + "#" ) == -1 ) | ||
218 | availableCategories += section + "#"; | ||
219 | } | ||