summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-17 22:49:03 (UTC)
committer andyq <andyq>2002-10-17 22:49:03 (UTC)
commit943c09096f11827470b9cd3e311329ac422aaf20 (patch) (unidiff)
treecec58c8ee61f85a2ebf3944594962a42489255fb
parent63a3ca758c82a397f448cce88789bf12c492b294 (diff)
downloadopie-943c09096f11827470b9cd3e311329ac422aaf20.zip
opie-943c09096f11827470b9cd3e311329ac422aaf20.tar.gz
opie-943c09096f11827470b9cd3e311329ac422aaf20.tar.bz2
Read/Write out to config file whether a destination is set to linkToRoot
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp
index d929c39..089c3e3 100644
--- a/noncore/settings/aqpkg/datamgr.cpp
+++ b/noncore/settings/aqpkg/datamgr.cpp
@@ -18,6 +18,10 @@
18#include <iostream> 18#include <iostream>
19using namespace std; 19using namespace std;
20 20
21#ifdef QWS
22#include <qpe/config.h>
23#endif
24
21#include <stdio.h> 25#include <stdio.h>
22 26
23#include "datamgr.h" 27#include "datamgr.h"
@@ -70,6 +74,11 @@ void DataManager :: loadServers()
70 serverList.push_back( Server( LOCAL_SERVER, "" ) ); 74 serverList.push_back( Server( LOCAL_SERVER, "" ) );
71 serverList.push_back( Server( LOCAL_IPKGS, "" ) ); 75 serverList.push_back( Server( LOCAL_IPKGS, "" ) );
72 76
77#ifdef QWS
78 Config cfg( "aqpkg" );
79 cfg.setGroup( "destinations" );
80#endif
81
73 // Read file from /etc/ipkg.conf 82 // Read file from /etc/ipkg.conf
74 QString ipkg_conf = IPKG_CONF; 83 QString ipkg_conf = IPKG_CONF;
75 FILE *fp; 84 FILE *fp;
@@ -112,6 +121,14 @@ void DataManager :: loadServers()
112 char path[50]; 121 char path[50];
113 sscanf( lineStr, "%*[^ ] %s %s", alias, path ); 122 sscanf( lineStr, "%*[^ ] %s %s", alias, path );
114 Destination d( alias, path ); 123 Destination d( alias, path );
124 bool linkToRoot = true;
125#ifdef QWS
126 QString key = alias;
127 key += "_linkToRoot";
128 linkToRoot = cfg.readBoolEntry( key, true );
129#endif
130 d.linkToRoot( linkToRoot );
131
115 destList.push_back( d ); 132 destList.push_back( d );
116 } 133 }
117 } 134 }