summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg/datamgr.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/aqpkg/datamgr.cpp') (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
@@ -17,8 +17,12 @@
#include <fstream>
#include <iostream>
using namespace std;
+#ifdef QWS
+#include <qpe/config.h>
+#endif
+
#include <stdio.h>
#include "datamgr.h"
#include "global.h"
@@ -69,8 +73,13 @@ void DataManager :: loadServers()
// the local config (which packages are installed)
serverList.push_back( Server( LOCAL_SERVER, "" ) );
serverList.push_back( Server( LOCAL_IPKGS, "" ) );
+#ifdef QWS
+ Config cfg( "aqpkg" );
+ cfg.setGroup( "destinations" );
+#endif
+
// Read file from /etc/ipkg.conf
QString ipkg_conf = IPKG_CONF;
FILE *fp;
fp = fopen( ipkg_conf, "r" );
@@ -111,8 +120,16 @@ void DataManager :: loadServers()
char alias[20];
char path[50];
sscanf( lineStr, "%*[^ ] %s %s", alias, path );
Destination d( alias, path );
+ bool linkToRoot = true;
+#ifdef QWS
+ QString key = alias;
+ key += "_linkToRoot";
+ linkToRoot = cfg.readBoolEntry( key, true );
+#endif
+ d.linkToRoot( linkToRoot );
+
destList.push_back( d );
}
}
}