summaryrefslogtreecommitdiff
authorandyq <andyq>2002-12-12 00:18:40 (UTC)
committer andyq <andyq>2002-12-12 00:18:40 (UTC)
commit1d044ba4d276240b60bc98d18365a80183960751 (patch) (unidiff)
tree98f69f03bb7ff4a904c02322be6480c54b6a7e08
parentfe063bdf069cd33def6347777624798e4f3a7059 (diff)
downloadopie-1d044ba4d276240b60bc98d18365a80183960751.zip
opie-1d044ba4d276240b60bc98d18365a80183960751.tar.gz
opie-1d044ba4d276240b60bc98d18365a80183960751.tar.bz2
Added proxy support
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/datamgr.cpp28
-rw-r--r--noncore/settings/aqpkg/datamgr.h18
-rw-r--r--noncore/settings/aqpkg/settings.ui1135
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp21
-rw-r--r--noncore/settings/aqpkg/settingsimpl.h2
5 files changed, 743 insertions, 461 deletions
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp
index 96c28c0..3933a22 100644
--- a/noncore/settings/aqpkg/datamgr.cpp
+++ b/noncore/settings/aqpkg/datamgr.cpp
@@ -37,219 +37,239 @@ DataManager::DataManager()
37 37
38DataManager::~DataManager() 38DataManager::~DataManager()
39{ 39{
40} 40}
41 41
42vector<Server>::iterator DataManager :: getServer( const char *name ) 42vector<Server>::iterator DataManager :: getServer( const char *name )
43{ 43{
44 vector<Server>::iterator it = serverList.begin(); 44 vector<Server>::iterator it = serverList.begin();
45 while ( it != serverList.end() ) 45 while ( it != serverList.end() )
46 { 46 {
47 if ( it->getServerName() == name ) 47 if ( it->getServerName() == name )
48 return it; 48 return it;
49 49
50 ++it; 50 ++it;
51 } 51 }
52 52
53 return serverList.end(); 53 return serverList.end();
54} 54}
55 55
56vector<Destination>::iterator DataManager :: getDestination( const char *name ) 56vector<Destination>::iterator DataManager :: getDestination( const char *name )
57{ 57{
58 vector<Destination>::iterator it = destList.begin(); 58 vector<Destination>::iterator it = destList.begin();
59 while ( it != destList.end() ) 59 while ( it != destList.end() )
60 { 60 {
61 if ( it->getDestinationName() == name ) 61 if ( it->getDestinationName() == name )
62 return it; 62 return it;
63 63
64 ++it; 64 ++it;
65 } 65 }
66 66
67 return destList.end(); 67 return destList.end();
68} 68}
69 69
70void DataManager :: loadServers() 70void DataManager :: loadServers()
71{ 71{
72 // First add our local server - not really a server but 72 // First add our local server - not really a server but
73 // the local config (which packages are installed) 73 // the local config (which packages are installed)
74 serverList.push_back( Server( LOCAL_SERVER, "" ) ); 74 serverList.push_back( Server( LOCAL_SERVER, "" ) );
75 serverList.push_back( Server( LOCAL_IPKGS, "" ) ); 75 serverList.push_back( Server( LOCAL_IPKGS, "" ) );
76 76
77#ifdef QWS 77#ifdef QWS
78 Config cfg( "aqpkg" ); 78 Config cfg( "aqpkg" );
79 cfg.setGroup( "destinations" ); 79 cfg.setGroup( "destinations" );
80#endif 80#endif
81 81
82 // Read file from /etc/ipkg.conf 82 // Read file from /etc/ipkg.conf
83 QString ipkg_conf = IPKG_CONF; 83 QString ipkg_conf = IPKG_CONF;
84 FILE *fp; 84 FILE *fp;
85 fp = fopen( ipkg_conf, "r" ); 85 fp = fopen( ipkg_conf, "r" );
86 char line[130]; 86 char line[130];
87 QString lineStr; 87 QString lineStr;
88 if ( fp == NULL ) 88 if ( fp == NULL )
89 { 89 {
90 cout << "Couldn't open " << ipkg_conf << "! err = " << fp << endl; 90 cout << "Couldn't open " << ipkg_conf << "! err = " << fp << endl;
91 return; 91 return;
92 } 92 }
93 else 93 else
94 { 94 {
95 while ( fgets( line, sizeof line, fp) != NULL ) 95 while ( fgets( line, sizeof line, fp) != NULL )
96 { 96 {
97 lineStr = line; 97 lineStr = line;
98 if ( lineStr.startsWith( "src" ) || lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) ) 98 if ( lineStr.startsWith( "src" ) || lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) )
99 { 99 {
100 char alias[20]; 100 char alias[20];
101 char url[100]; 101 char url[100];
102 102
103 // Looks a little wierd but read up to the r of src (throwing it away), 103 // Looks a little wierd but read up to the r of src (throwing it away),
104 // then read up to the next space and throw that away, the alias 104 // then read up to the next space and throw that away, the alias
105 // is next. 105 // is next.
106 // Should Handle #src, # src, src, and combinations of 106 // Should Handle #src, # src, src, and combinations of
107 sscanf( lineStr, "%*[^r]%*[^ ] %s %s", alias, url ); 107 sscanf( lineStr, "%*[^r]%*[^ ] %s %s", alias, url );
108 Server s( alias, url ); 108 Server s( alias, url );
109 if ( lineStr.startsWith( "src" ) ) 109 if ( lineStr.startsWith( "src" ) )
110 s.setActive( true ); 110 s.setActive( true );
111 else 111 else
112 s.setActive( false ); 112 s.setActive( false );
113 113
114 serverList.push_back( s ); 114 serverList.push_back( s );
115 115
116 } 116 }
117 else if ( lineStr.startsWith( "dest" ) ) 117 else if ( lineStr.startsWith( "dest" ) )
118 { 118 {
119 char alias[20]; 119 char alias[20];
120 char path[50]; 120 char path[50];
121 sscanf( lineStr, "%*[^ ] %s %s", alias, path ); 121 sscanf( lineStr, "%*[^ ] %s %s", alias, path );
122 Destination d( alias, path ); 122 Destination d( alias, path );
123 bool linkToRoot = true; 123 bool linkToRoot = true;
124#ifdef QWS 124#ifdef QWS
125 QString key = alias; 125 QString key = alias;
126 key += "_linkToRoot"; 126 key += "_linkToRoot";
127 linkToRoot = cfg.readBoolEntry( key, true ); 127 linkToRoot = cfg.readBoolEntry( key, true );
128#endif 128#endif
129 d.linkToRoot( linkToRoot ); 129 d.linkToRoot( linkToRoot );
130 130
131 destList.push_back( d ); 131 destList.push_back( d );
132 } 132 }
133 else if ( lineStr.startsWith( "option" ) ) 133 else if ( lineStr.startsWith( "option" ) || lineStr.startsWith( "#option" ) )
134 { 134 {
135 char type[20]; 135 char type[20];
136 char val[100]; 136 char val[100];
137 sscanf( lineStr, "%*[^ ] %s %s", type, val ); 137 sscanf( lineStr, "%*[^ ] %s %s", type, val );
138 if ( stricmp( type, "http_proxy" ) == 0 ) 138 if ( stricmp( type, "http_proxy" ) == 0 )
139 {
139 httpProxy = val; 140 httpProxy = val;
141 if ( lineStr.startsWith( "#" ) )
142 httpProxyEnabled = false;
143 else
144 httpProxyEnabled = true;
145 }
140 if ( stricmp( type, "ftp_proxy" ) == 0 ) 146 if ( stricmp( type, "ftp_proxy" ) == 0 )
147 {
141 ftpProxy = val; 148 ftpProxy = val;
149 if ( lineStr.startsWith( "#" ) )
150 ftpProxyEnabled = false;
151 else
152 ftpProxyEnabled = true;
153 }
142 if ( stricmp( type, "proxy_username" ) == 0 ) 154 if ( stricmp( type, "proxy_username" ) == 0 )
143 proxyUsername = val; 155 proxyUsername = val;
144 if ( stricmp( type, "proxy_password" ) == 0 ) 156 if ( stricmp( type, "proxy_password" ) == 0 )
145 proxyPassword = val; 157 proxyPassword = val;
146 } 158 }
147 } 159 }
148 } 160 }
149 fclose( fp ); 161 fclose( fp );
150 162
151 reloadServerData( ); 163 reloadServerData( );
152} 164}
153 165
154void DataManager :: reloadServerData( ) 166void DataManager :: reloadServerData( )
155{ 167{
156 vector<Server>::iterator it = serverList.begin(); 168 vector<Server>::iterator it = serverList.begin();
157 for ( it = serverList.begin() ; it != serverList.end() ; ++it ) 169 for ( it = serverList.begin() ; it != serverList.end() ; ++it )
158 { 170 {
159 // Now we've read the config file in we need to read the servers 171 // Now we've read the config file in we need to read the servers
160 // The local server is a special case. This holds the contents of the 172 // The local server is a special case. This holds the contents of the
161 // status files the number of which depends on how many destinations 173 // status files the number of which depends on how many destinations
162 // we've set up 174 // we've set up
163 // The other servers files hold the contents of the server package list 175 // The other servers files hold the contents of the server package list
164 if ( it->getServerName() == LOCAL_SERVER ) 176 if ( it->getServerName() == LOCAL_SERVER )
165 it->readStatusFile( destList ); 177 it->readStatusFile( destList );
166 else if ( it->getServerName() == LOCAL_IPKGS ) 178 else if ( it->getServerName() == LOCAL_IPKGS )
167 it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) ); 179 it->readLocalIpks( &( *getServer( LOCAL_SERVER ) ) );
168 else 180 else
169 it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) ); 181 it->readPackageFile( &( *getServer( LOCAL_SERVER ) ) );
170 } 182 }
171} 183}
172 184
173void DataManager :: writeOutIpkgConf() 185void DataManager :: writeOutIpkgConf()
174{ 186{
175 QString ipkg_conf = IPKG_CONF; 187 QString ipkg_conf = IPKG_CONF;
176 ofstream out( ipkg_conf ); 188 ofstream out( ipkg_conf );
177 189
178 out << "# Written by AQPkg" << endl; 190 out << "# Written by AQPkg" << endl;
179 out << "# Must have one or more source entries of the form:" << endl; 191 out << "# Must have one or more source entries of the form:" << endl;
180 out << "#" << endl; 192 out << "#" << endl;
181 out << "# src <src-name> <source-url>" << endl; 193 out << "# src <src-name> <source-url>" << endl;
182 out << "#" << endl; 194 out << "#" << endl;
183 out << "# and one or more destination entries of the form:" << endl; 195 out << "# and one or more destination entries of the form:" << endl;
184 out << "#" << endl; 196 out << "#" << endl;
185 out << "# dest <dest-name> <target-path>" << endl; 197 out << "# dest <dest-name> <target-path>" << endl;
186 out << "#" << endl; 198 out << "#" << endl;
187 out << "# where <src-name> and <dest-names> are identifiers that" << endl; 199 out << "# where <src-name> and <dest-names> are identifiers that" << endl;
188 out << "# should match [a-zA-Z0-9._-]+, <source-url> should be a" << endl; 200 out << "# should match [a-zA-Z0-9._-]+, <source-url> should be a" << endl;
189 out << "# URL that points to a directory containing a Familiar" << endl; 201 out << "# URL that points to a directory containing a Familiar" << endl;
190 out << "# Packages file, and <target-path> should be a directory" << endl; 202 out << "# Packages file, and <target-path> should be a directory" << endl;
191 out << "# that exists on the target system." << endl << endl; 203 out << "# that exists on the target system." << endl << endl;
192 204
193 // Write out servers 205 // Write out servers
194 vector<Server>::iterator it = serverList.begin(); 206 vector<Server>::iterator it = serverList.begin();
195 while ( it != serverList.end() ) 207 while ( it != serverList.end() )
196 { 208 {
197 QString alias = it->getServerName(); 209 QString alias = it->getServerName();
198 // Don't write out local as its a dummy 210 // Don't write out local as its a dummy
199 if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS ) 211 if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS )
200 { 212 {
201 QString url = it->getServerUrl();; 213 QString url = it->getServerUrl();;
202 214
203 if ( !it->isServerActive() ) 215 if ( !it->isServerActive() )
204 out << "#"; 216 out << "#";
205 out << "src " << alias << " " << url << endl; 217 out << "src " << alias << " " << url << endl;
206 } 218 }
207 219
208 it++; 220 it++;
209 } 221 }
210 222
211 out << endl; 223 out << endl;
212 224
213 // Write out destinations 225 // Write out destinations
214 vector<Destination>::iterator it2 = destList.begin(); 226 vector<Destination>::iterator it2 = destList.begin();
215 while ( it2 != destList.end() ) 227 while ( it2 != destList.end() )
216 { 228 {
217 out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl; 229 out << "dest " << it2->getDestinationName() << " " << it2->getDestinationPath() << endl;
218 it2++; 230 it2++;
219 } 231 }
220 232
233 out << endl;
221 out << "# Proxy Support" << endl; 234 out << "# Proxy Support" << endl;
222 out << "#" << endl;
223 235
224 if ( httpProxy == "" ) 236 if ( !httpProxyEnabled && httpProxy == "" )
225 out << "#option http_proxy http://proxy.tld:3128" << endl; 237 out << "#option http_proxy http://proxy.tld:3128" << endl;
226 else 238 else
239 {
240 if ( !httpProxyEnabled )
241 out << "#";
227 out << "option http_proxy " << httpProxy << endl; 242 out << "option http_proxy " << httpProxy << endl;
243 }
228 244
229 if ( ftpProxy == "" ) 245 if ( !ftpProxyEnabled && ftpProxy == "" )
230 out << "#option ftp_proxy http://proxy.tld:3128" << endl; 246 out << "#option ftp_proxy http://proxy.tld:3128" << endl;
231 else 247 else
248 {
249 if ( !ftpProxyEnabled )
250 out << "#";
232 out << "option ftp_proxy " << ftpProxy << endl; 251 out << "option ftp_proxy " << ftpProxy << endl;
252 }
233 if ( proxyUsername == "" ) 253 if ( proxyUsername == "" )
234 out << "#option proxy_username <username>" << endl; 254 out << "#option proxy_username <username>" << endl;
235 else 255 else
236 out << "option proxy_username " << proxyUsername << endl; 256 out << "option proxy_username " << proxyUsername << endl;
237 if ( proxyPassword == "" ) 257 if ( proxyPassword == "" )
238 out << "#option proxy_password <password>" << endl << endl; 258 out << "#option proxy_password <password>" << endl << endl;
239 else 259 else
240 out << "option proxy_password " << proxyPassword << endl<< endl; 260 out << "option proxy_password " << proxyPassword << endl<< endl;
241 261
242 out << "# Offline mode (for use in constructing flash images offline)" << endl; 262 out << "# Offline mode (for use in constructing flash images offline)" << endl;
243 out << "#option offline_root target" << endl; 263 out << "#option offline_root target" << endl;
244 264
245 265
246 out.close(); 266 out.close();
247} 267}
248 268
249 269
250void DataManager :: setAvailableCategories( QString section ) 270void DataManager :: setAvailableCategories( QString section )
251{ 271{
252 section = section.lower(); 272 section = section.lower();
253 if ( availableCategories.find( "#" + section + "#" ) == -1 ) 273 if ( availableCategories.find( "#" + section + "#" ) == -1 )
254 availableCategories += section + "#"; 274 availableCategories += section + "#";
255} 275}
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h
index 41833df..0a7467f 100644
--- a/noncore/settings/aqpkg/datamgr.h
+++ b/noncore/settings/aqpkg/datamgr.h
@@ -1,73 +1,91 @@
1/*************************************************************************** 1/***************************************************************************
2 datamgr.h - description 2 datamgr.h - description
3 ------------------- 3 -------------------
4 begin : Thu Aug 29 2002 4 begin : Thu Aug 29 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#ifndef DATAMGR_H 18#ifndef DATAMGR_H
19#define DATAMGR_H 19#define DATAMGR_H
20 20
21#include <map> 21#include <map>
22using namespace std; 22using namespace std;
23 23
24#include <qstring.h> 24#include <qstring.h>
25 25
26#include "server.h" 26#include "server.h"
27#include "destination.h" 27#include "destination.h"
28 28
29 #define LOCAL_SERVER "Installed Pkgs" 29 #define LOCAL_SERVER "Installed Pkgs"
30 #define LOCAL_IPKGS "local IPKG" 30 #define LOCAL_IPKGS "local IPKG"
31 31
32/** 32/**
33 *@author Andy Qua 33 *@author Andy Qua
34 */ 34 */
35 35
36 36
37class DataManager 37class DataManager
38{ 38{
39public: 39public:
40 DataManager(); 40 DataManager();
41 ~DataManager(); 41 ~DataManager();
42 42
43 void setActiveServer( const QString &act ) { activeServer = act; } 43 void setActiveServer( const QString &act ) { activeServer = act; }
44 QString &getActiveServer( ) { return activeServer; } 44 QString &getActiveServer( ) { return activeServer; }
45 45
46 Server *getLocalServer() { return &( *getServer( LOCAL_SERVER ) ); } 46 Server *getLocalServer() { return &( *getServer( LOCAL_SERVER ) ); }
47 vector<Server> &getServerList() { return serverList; } 47 vector<Server> &getServerList() { return serverList; }
48 vector<Server>::iterator getServer( const char *name ); 48 vector<Server>::iterator getServer( const char *name );
49 49
50 vector<Destination> &getDestinationList() { return destList; } 50 vector<Destination> &getDestinationList() { return destList; }
51 vector<Destination>::iterator getDestination( const char *name ); 51 vector<Destination>::iterator getDestination( const char *name );
52 52
53 void loadServers(); 53 void loadServers();
54 void reloadServerData( ); 54 void reloadServerData( );
55 55
56 void writeOutIpkgConf(); 56 void writeOutIpkgConf();
57 57
58 static QString getAvailableCategories() { return availableCategories; } 58 static QString getAvailableCategories() { return availableCategories; }
59 static void setAvailableCategories( QString section ); 59 static void setAvailableCategories( QString section );
60 60
61 QString getHttpProxy() { return httpProxy; }
62 QString getFtpProxy() { return ftpProxy; }
63 QString getProxyUsername() { return proxyUsername; }
64 QString getProxyPassword() { return proxyPassword; }
65
66 bool getHttpProxyEnabled() { return httpProxyEnabled; }
67 bool getFtpProxyEnabled() { return ftpProxyEnabled; }
68
69 void setHttpProxy( QString proxy ) { httpProxy = proxy; }
70 void setFtpProxy( QString proxy ) { ftpProxy = proxy; }
71 void setProxyUsername( QString name ) { proxyUsername = name; }
72 void setProxyPassword( QString pword ) { proxyPassword = pword; }
73
74 void setHttpProxyEnabled( bool val ) { httpProxyEnabled = val; }
75 void setFtpProxyEnabled( bool val ) { ftpProxyEnabled = val; }
61private: 76private:
62 static QString availableCategories; 77 static QString availableCategories;
63 QString activeServer; 78 QString activeServer;
64 QString httpProxy; 79 QString httpProxy;
65 QString ftpProxy; 80 QString ftpProxy;
66 QString proxyUsername; 81 QString proxyUsername;
67 QString proxyPassword; 82 QString proxyPassword;
68 83
84 bool httpProxyEnabled;
85 bool ftpProxyEnabled;
86
69 vector<Server> serverList; 87 vector<Server> serverList;
70 vector<Destination> destList; 88 vector<Destination> destList;
71}; 89};
72 90
73#endif 91#endif
diff --git a/noncore/settings/aqpkg/settings.ui b/noncore/settings/aqpkg/settings.ui
index 44e8fd9..b39d358 100644
--- a/noncore/settings/aqpkg/settings.ui
+++ b/noncore/settings/aqpkg/settings.ui
@@ -1,650 +1,871 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>SettingsBase</class> 2<class>SettingsBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>Settings</cstring> 7 <cstring>Settings</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>235</width> 14 <width>211</width>
15 <height>390</height> 15 <height>390</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Package Servers</string> 20 <string>Package Servers</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <grid> 28 <widget>
29 <class>QTabWidget</class>
29 <property stdset="1"> 30 <property stdset="1">
30 <name>margin</name> 31 <name>name</name>
31 <number>11</number> 32 <cstring>TabWidget</cstring>
32 </property> 33 </property>
33 <property stdset="1"> 34 <property stdset="1">
34 <name>spacing</name> 35 <name>enabled</name>
35 <number>6</number> 36 <bool>true</bool>
36 </property> 37 </property>
37 <widget row="0" column="0" > 38 <property stdset="1">
38 <class>QTabWidget</class> 39 <name>geometry</name>
40 <rect>
41 <x>11</x>
42 <y>11</y>
43 <width>209</width>
44 <height>368</height>
45 </rect>
46 </property>
47 <property>
48 <name>layoutMargin</name>
49 </property>
50 <property>
51 <name>layoutSpacing</name>
52 </property>
53 <widget>
54 <class>QWidget</class>
39 <property stdset="1"> 55 <property stdset="1">
40 <name>name</name> 56 <name>name</name>
41 <cstring>TabWidget</cstring> 57 <cstring>tab</cstring>
42 </property>
43 <property stdset="1">
44 <name>enabled</name>
45 <bool>true</bool>
46 </property> 58 </property>
47 <property> 59 <attribute>
48 <name>layoutMargin</name> 60 <name>title</name>
49 </property> 61 <string>Servers</string>
50 <property> 62 </attribute>
51 <name>layoutSpacing</name> 63 <grid>
52 </property>
53 <widget>
54 <class>QWidget</class>
55 <property stdset="1"> 64 <property stdset="1">
56 <name>name</name> 65 <name>margin</name>
57 <cstring>tab</cstring> 66 <number>11</number>
58 </property> 67 </property>
59 <attribute> 68 <property stdset="1">
60 <name>title</name> 69 <name>spacing</name>
61 <string>Servers</string> 70 <number>6</number>
62 </attribute> 71 </property>
63 <grid> 72 <widget row="0" column="0" >
64 <property stdset="1"> 73 <class>QLayoutWidget</class>
65 <name>margin</name>
66 <number>11</number>
67 </property>
68 <property stdset="1"> 74 <property stdset="1">
69 <name>spacing</name> 75 <name>name</name>
70 <number>6</number> 76 <cstring>Layout2</cstring>
71 </property> 77 </property>
72 <widget row="0" column="0" > 78 <hbox>
73 <class>QLayoutWidget</class> 79 <property stdset="1">
80 <name>margin</name>
81 <number>0</number>
82 </property>
74 <property stdset="1"> 83 <property stdset="1">
75 <name>name</name> 84 <name>spacing</name>
76 <cstring>Layout2</cstring> 85 <number>6</number>
77 </property> 86 </property>
78 <hbox> 87 <widget>
88 <class>QLabel</class>
79 <property stdset="1"> 89 <property stdset="1">
80 <name>margin</name> 90 <name>name</name>
81 <number>0</number> 91 <cstring>Servers</cstring>
82 </property> 92 </property>
83 <property stdset="1"> 93 <property stdset="1">
84 <name>spacing</name> 94 <name>text</name>
85 <number>6</number> 95 <string>Servers</string>
86 </property> 96 </property>
87 <widget> 97 </widget>
88 <class>QLabel</class> 98 <spacer>
89 <property stdset="1"> 99 <property>
90 <name>name</name> 100 <name>name</name>
91 <cstring>Servers</cstring> 101 <cstring>Spacer2</cstring>
92 </property> 102 </property>
93 <property stdset="1"> 103 <property stdset="1">
94 <name>text</name> 104 <name>orientation</name>
95 <string>Servers</string> 105 <enum>Horizontal</enum>
96 </property> 106 </property>
97 </widget> 107 <property stdset="1">
98 <spacer> 108 <name>sizeType</name>
99 <property> 109 <enum>Expanding</enum>
100 <name>name</name> 110 </property>
101 <cstring>Spacer2</cstring> 111 <property>
102 </property> 112 <name>sizeHint</name>
103 <property stdset="1"> 113 <size>
104 <name>orientation</name> 114 <width>20</width>
105 <enum>Horizontal</enum> 115 <height>20</height>
106 </property> 116 </size>
107 <property stdset="1"> 117 </property>
108 <name>sizeType</name> 118 </spacer>
109 <enum>Expanding</enum> 119 </hbox>
110 </property> 120 </widget>
111 <property> 121 <widget row="1" column="0" >
112 <name>sizeHint</name> 122 <class>QLayoutWidget</class>
113 <size> 123 <property stdset="1">
114 <width>20</width> 124 <name>name</name>
115 <height>20</height> 125 <cstring>Layout8</cstring>
116 </size> 126 </property>
117 </property> 127 <grid>
118 </spacer> 128 <property stdset="1">
119 </hbox> 129 <name>margin</name>
120 </widget> 130 <number>0</number>
121 <widget row="1" column="0" > 131 </property>
122 <class>QLayoutWidget</class>
123 <property stdset="1"> 132 <property stdset="1">
124 <name>name</name> 133 <name>spacing</name>
125 <cstring>Layout8</cstring> 134 <number>6</number>
126 </property> 135 </property>
127 <grid> 136 <widget row="0" column="0" rowspan="1" colspan="2" >
137 <class>QListBox</class>
128 <property stdset="1"> 138 <property stdset="1">
129 <name>margin</name> 139 <name>name</name>
130 <number>0</number> 140 <cstring>servers</cstring>
131 </property> 141 </property>
132 <property stdset="1"> 142 <property stdset="1">
133 <name>spacing</name> 143 <name>selectionMode</name>
134 <number>6</number> 144 <enum>Extended</enum>
135 </property> 145 </property>
136 <widget row="0" column="0" rowspan="1" colspan="2" > 146 </widget>
137 <class>QListBox</class> 147 <widget row="2" column="0" rowspan="1" colspan="2" >
138 <property stdset="1"> 148 <class>QLayoutWidget</class>
139 <name>name</name> 149 <property stdset="1">
140 <cstring>servers</cstring> 150 <name>name</name>
141 </property> 151 <cstring>Layout6</cstring>
152 </property>
153 <grid>
142 <property stdset="1"> 154 <property stdset="1">
143 <name>selectionMode</name> 155 <name>margin</name>
144 <enum>Extended</enum> 156 <number>0</number>
145 </property> 157 </property>
146 </widget>
147 <widget row="2" column="0" rowspan="1" colspan="2" >
148 <class>QLayoutWidget</class>
149 <property stdset="1"> 158 <property stdset="1">
150 <name>name</name> 159 <name>spacing</name>
151 <cstring>Layout6</cstring> 160 <number>6</number>
152 </property> 161 </property>
153 <grid> 162 <widget row="2" column="1" >
163 <class>QCheckBox</class>
154 <property stdset="1"> 164 <property stdset="1">
155 <name>margin</name> 165 <name>name</name>
156 <number>0</number> 166 <cstring>active</cstring>
157 </property> 167 </property>
158 <property stdset="1"> 168 <property stdset="1">
159 <name>spacing</name> 169 <name>text</name>
160 <number>6</number> 170 <string>Active Server</string>
161 </property> 171 </property>
162 <widget row="2" column="1" > 172 </widget>
163 <class>QCheckBox</class> 173 <widget row="0" column="0" >
164 <property stdset="1"> 174 <class>QLabel</class>
165 <name>name</name> 175 <property stdset="1">
166 <cstring>active</cstring> 176 <name>name</name>
167 </property> 177 <cstring>TextLabel1_3</cstring>
168 <property stdset="1"> 178 </property>
169 <name>text</name> 179 <property stdset="1">
170 <string>Active Server</string> 180 <name>text</name>
171 </property> 181 <string>Name:</string>
172 </widget> 182 </property>
173 <widget row="0" column="0" > 183 </widget>
174 <class>QLabel</class> 184 <widget row="1" column="0" >
175 <property stdset="1"> 185 <class>QLabel</class>
176 <name>name</name> 186 <property stdset="1">
177 <cstring>TextLabel1_3</cstring> 187 <name>name</name>
178 </property> 188 <cstring>TextLabel2_3</cstring>
179 <property stdset="1"> 189 </property>
180 <name>text</name> 190 <property stdset="1">
181 <string>Name:</string> 191 <name>text</name>
182 </property> 192 <string>URL:</string>
183 </widget> 193 </property>
184 <widget row="1" column="0" > 194 </widget>
185 <class>QLabel</class> 195 <widget row="0" column="1" >
186 <property stdset="1"> 196 <class>QLineEdit</class>
187 <name>name</name> 197 <property stdset="1">
188 <cstring>TextLabel2_3</cstring> 198 <name>name</name>
189 </property> 199 <cstring>servername</cstring>
190 <property stdset="1"> 200 </property>
191 <name>text</name> 201 </widget>
192 <string>URL:</string> 202 <widget row="1" column="1" >
193 </property> 203 <class>QLineEdit</class>
194 </widget> 204 <property stdset="1">
195 <widget row="0" column="1" > 205 <name>name</name>
196 <class>QLineEdit</class> 206 <cstring>serverurl</cstring>
197 <property stdset="1"> 207 </property>
198 <name>name</name> 208 </widget>
199 <cstring>servername</cstring> 209 <widget row="3" column="1" >
200 </property> 210 <class>QPushButton</class>
201 </widget> 211 <property stdset="1">
202 <widget row="1" column="1" > 212 <name>name</name>
203 <class>QLineEdit</class> 213 <cstring>btnChangeServer</cstring>
204 <property stdset="1"> 214 </property>
205 <name>name</name> 215 <property stdset="1">
206 <cstring>serverurl</cstring> 216 <name>text</name>
207 </property> 217 <string>Change</string>
208 </widget> 218 </property>
209 <widget row="3" column="1" > 219 </widget>
210 <class>QPushButton</class> 220 </grid>
211 <property stdset="1"> 221 </widget>
212 <name>name</name> 222 <widget row="1" column="1" >
213 <cstring>btnChangeServer</cstring> 223 <class>QPushButton</class>
214 </property> 224 <property stdset="1">
215 <property stdset="1"> 225 <name>name</name>
216 <name>text</name> 226 <cstring>removeserver</cstring>
217 <string>Change</string> 227 </property>
218 </property> 228 <property stdset="1">
219 </widget> 229 <name>enabled</name>
220 </grid> 230 <bool>true</bool>
221 </widget> 231 </property>
222 <widget row="1" column="1" > 232 <property stdset="1">
223 <class>QPushButton</class> 233 <name>text</name>
224 <property stdset="1"> 234 <string>Remove</string>
225 <name>name</name> 235 </property>
226 <cstring>removeserver</cstring> 236 <property stdset="1">
227 </property> 237 <name>autoDefault</name>
228 <property stdset="1"> 238 <bool>false</bool>
229 <name>enabled</name> 239 </property>
230 <bool>true</bool> 240 </widget>
231 </property> 241 <widget row="1" column="0" >
232 <property stdset="1"> 242 <class>QPushButton</class>
233 <name>text</name> 243 <property stdset="1">
234 <string>Remove</string> 244 <name>name</name>
235 </property> 245 <cstring>newserver</cstring>
236 <property stdset="1"> 246 </property>
237 <name>autoDefault</name> 247 <property stdset="1">
238 <bool>false</bool> 248 <name>enabled</name>
239 </property> 249 <bool>true</bool>
240 </widget> 250 </property>
241 <widget row="1" column="0" > 251 <property stdset="1">
242 <class>QPushButton</class> 252 <name>text</name>
243 <property stdset="1"> 253 <string>New</string>
244 <name>name</name> 254 </property>
245 <cstring>newserver</cstring> 255 <property stdset="1">
246 </property> 256 <name>autoDefault</name>
247 <property stdset="1"> 257 <bool>false</bool>
248 <name>enabled</name> 258 </property>
249 <bool>true</bool> 259 </widget>
250 </property> 260 </grid>
251 <property stdset="1"> 261 </widget>
252 <name>text</name> 262 </grid>
253 <string>New</string> 263 </widget>
254 </property> 264 <widget>
255 <property stdset="1"> 265 <class>QWidget</class>
256 <name>autoDefault</name> 266 <property stdset="1">
257 <bool>false</bool> 267 <name>name</name>
258 </property> 268 <cstring>tab</cstring>
259 </widget> 269 </property>
260 </grid> 270 <attribute>
261 </widget> 271 <name>title</name>
262 </grid> 272 <string>Destinations</string>
263 </widget> 273 </attribute>
264 <widget> 274 <grid>
265 <class>QWidget</class>
266 <property stdset="1"> 275 <property stdset="1">
267 <name>name</name> 276 <name>margin</name>
268 <cstring>tab</cstring> 277 <number>11</number>
269 </property> 278 </property>
270 <attribute> 279 <property stdset="1">
271 <name>title</name> 280 <name>spacing</name>
272 <string>Destinations</string> 281 <number>6</number>
273 </attribute> 282 </property>
274 <grid> 283 <widget row="0" column="0" >
275 <property stdset="1"> 284 <class>QLayoutWidget</class>
276 <name>margin</name>
277 <number>11</number>
278 </property>
279 <property stdset="1"> 285 <property stdset="1">
280 <name>spacing</name> 286 <name>name</name>
281 <number>6</number> 287 <cstring>Layout3</cstring>
282 </property> 288 </property>
283 <widget row="0" column="0" > 289 <hbox>
284 <class>QLayoutWidget</class> 290 <property stdset="1">
291 <name>margin</name>
292 <number>0</number>
293 </property>
285 <property stdset="1"> 294 <property stdset="1">
286 <name>name</name> 295 <name>spacing</name>
287 <cstring>Layout3</cstring> 296 <number>6</number>
288 </property> 297 </property>
289 <hbox> 298 <widget>
299 <class>QLabel</class>
290 <property stdset="1"> 300 <property stdset="1">
291 <name>margin</name> 301 <name>name</name>
292 <number>0</number> 302 <cstring>Destinations</cstring>
293 </property> 303 </property>
294 <property stdset="1"> 304 <property stdset="1">
295 <name>spacing</name> 305 <name>text</name>
296 <number>6</number> 306 <string>Destinations</string>
307 </property>
308 </widget>
309 <spacer>
310 <property>
311 <name>name</name>
312 <cstring>Spacer2_2</cstring>
297 </property> 313 </property>
298 <widget>
299 <class>QLabel</class>
300 <property stdset="1">
301 <name>name</name>
302 <cstring>Destinations</cstring>
303 </property>
304 <property stdset="1">
305 <name>text</name>
306 <string>Destinations</string>
307 </property>
308 </widget>
309 <spacer>
310 <property>
311 <name>name</name>
312 <cstring>Spacer2_2</cstring>
313 </property>
314 <property stdset="1">
315 <name>orientation</name>
316 <enum>Horizontal</enum>
317 </property>
318 <property stdset="1">
319 <name>sizeType</name>
320 <enum>Expanding</enum>
321 </property>
322 <property>
323 <name>sizeHint</name>
324 <size>
325 <width>20</width>
326 <height>20</height>
327 </size>
328 </property>
329 </spacer>
330 </hbox>
331 </widget>
332 <widget row="2" column="0" >
333 <class>QLayoutWidget</class>
334 <property stdset="1">
335 <name>name</name>
336 <cstring>Layout5</cstring>
337 </property>
338 <hbox>
339 <property stdset="1"> 314 <property stdset="1">
340 <name>margin</name> 315 <name>orientation</name>
341 <number>0</number> 316 <enum>Horizontal</enum>
342 </property> 317 </property>
343 <property stdset="1"> 318 <property stdset="1">
344 <name>spacing</name> 319 <name>sizeType</name>
345 <number>6</number> 320 <enum>Expanding</enum>
346 </property> 321 </property>
347 <widget> 322 <property>
348 <class>QPushButton</class> 323 <name>sizeHint</name>
349 <property stdset="1"> 324 <size>
350 <name>name</name> 325 <width>20</width>
351 <cstring>newdestination</cstring> 326 <height>20</height>
352 </property> 327 </size>
353 <property stdset="1"> 328 </property>
354 <name>enabled</name> 329 </spacer>
355 <bool>true</bool> 330 </hbox>
356 </property> 331 </widget>
357 <property stdset="1"> 332 <widget row="2" column="0" >
358 <name>text</name> 333 <class>QLayoutWidget</class>
359 <string>New</string> 334 <property stdset="1">
360 </property> 335 <name>name</name>
361 <property stdset="1"> 336 <cstring>Layout5</cstring>
362 <name>autoDefault</name> 337 </property>
363 <bool>false</bool> 338 <hbox>
364 </property>
365 </widget>
366 <widget>
367 <class>QPushButton</class>
368 <property stdset="1">
369 <name>name</name>
370 <cstring>removedestination</cstring>
371 </property>
372 <property stdset="1">
373 <name>enabled</name>
374 <bool>true</bool>
375 </property>
376 <property stdset="1">
377 <name>text</name>
378 <string>Remove</string>
379 </property>
380 <property stdset="1">
381 <name>autoDefault</name>
382 <bool>false</bool>
383 </property>
384 </widget>
385 </hbox>
386 </widget>
387 <spacer row="0" column="0" >
388 <property>
389 <name>name</name>
390 <cstring>Spacer3</cstring>
391 </property>
392 <property stdset="1">
393 <name>orientation</name>
394 <enum>Horizontal</enum>
395 </property>
396 <property stdset="1">
397 <name>sizeType</name>
398 <enum>Expanding</enum>
399 </property>
400 <property>
401 <name>sizeHint</name>
402 <size>
403 <width>20</width>
404 <height>20</height>
405 </size>
406 </property>
407 </spacer>
408 <widget row="1" column="0" >
409 <class>QListBox</class>
410 <property stdset="1">
411 <name>name</name>
412 <cstring>destinations</cstring>
413 </property>
414 <property stdset="1"> 339 <property stdset="1">
415 <name>selectionMode</name> 340 <name>margin</name>
416 <enum>Single</enum> 341 <number>0</number>
417 </property> 342 </property>
418 </widget>
419 <widget row="3" column="0" >
420 <class>QLayoutWidget</class>
421 <property stdset="1"> 343 <property stdset="1">
422 <name>name</name> 344 <name>spacing</name>
423 <cstring>Layout13</cstring> 345 <number>6</number>
424 </property> 346 </property>
425 <grid> 347 <widget>
348 <class>QPushButton</class>
426 <property stdset="1"> 349 <property stdset="1">
427 <name>margin</name> 350 <name>name</name>
428 <number>0</number> 351 <cstring>newdestination</cstring>
429 </property> 352 </property>
430 <property stdset="1"> 353 <property stdset="1">
431 <name>spacing</name> 354 <name>enabled</name>
432 <number>6</number> 355 <bool>true</bool>
433 </property> 356 </property>
434 <widget row="1" column="0" > 357 <property stdset="1">
435 <class>QLabel</class> 358 <name>text</name>
436 <property stdset="1"> 359 <string>New</string>
437 <name>name</name> 360 </property>
438 <cstring>TextLabel1_3_2_2</cstring> 361 <property stdset="1">
439 </property> 362 <name>autoDefault</name>
440 <property stdset="1"> 363 <bool>false</bool>
441 <name>text</name> 364 </property>
442 <string>URL:</string> 365 </widget>
443 </property> 366 <widget>
444 </widget> 367 <class>QPushButton</class>
445 <widget row="3" column="1" > 368 <property stdset="1">
446 <class>QPushButton</class> 369 <name>name</name>
447 <property stdset="1"> 370 <cstring>removedestination</cstring>
448 <name>name</name> 371 </property>
449 <cstring>btnChangeDest</cstring> 372 <property stdset="1">
450 </property> 373 <name>enabled</name>
451 <property stdset="1"> 374 <bool>true</bool>
452 <name>text</name> 375 </property>
453 <string>Change</string> 376 <property stdset="1">
454 </property> 377 <name>text</name>
455 </widget> 378 <string>Remove</string>
456 <widget row="0" column="1" > 379 </property>
457 <class>QLineEdit</class> 380 <property stdset="1">
458 <property stdset="1"> 381 <name>autoDefault</name>
459 <name>name</name> 382 <bool>false</bool>
460 <cstring>destinationname</cstring> 383 </property>
461 </property> 384 </widget>
462 </widget> 385 </hbox>
463 <widget row="0" column="0" > 386 </widget>
464 <class>QLabel</class> 387 <spacer row="0" column="0" >
465 <property stdset="1"> 388 <property>
466 <name>name</name>
467 <cstring>TextLabel1_3_2</cstring>
468 </property>
469 <property stdset="1">
470 <name>text</name>
471 <string>Name:</string>
472 </property>
473 </widget>
474 <widget row="2" column="1" >
475 <class>QCheckBox</class>
476 <property stdset="1">
477 <name>name</name>
478 <cstring>linkToRoot</cstring>
479 </property>
480 <property stdset="1">
481 <name>text</name>
482 <string>Link To Root</string>
483 </property>
484 <property stdset="1">
485 <name>checked</name>
486 <bool>true</bool>
487 </property>
488 </widget>
489 <widget row="1" column="1" >
490 <class>QLineEdit</class>
491 <property stdset="1">
492 <name>name</name>
493 <cstring>destinationurl</cstring>
494 </property>
495 </widget>
496 </grid>
497 </widget>
498 </grid>
499 </widget>
500 <widget>
501 <class>QWidget</class>
502 <property stdset="1">
503 <name>name</name>
504 <cstring>tab</cstring>
505 </property>
506 <attribute>
507 <name>title</name>
508 <string>General</string>
509 </attribute>
510 <widget>
511 <class>QLabel</class>
512 <property stdset="1">
513 <name>name</name> 389 <name>name</name>
514 <cstring>TextLabel1</cstring> 390 <cstring>Spacer3</cstring>
515 </property> 391 </property>
516 <property stdset="1"> 392 <property stdset="1">
517 <name>geometry</name> 393 <name>orientation</name>
518 <rect> 394 <enum>Horizontal</enum>
519 <x>20</x>
520 <y>30</y>
521 <width>150</width>
522 <height>20</height>
523 </rect>
524 </property> 395 </property>
525 <property stdset="1"> 396 <property stdset="1">
526 <name>text</name> 397 <name>sizeType</name>
527 <string>(Will take effect on restart)</string> 398 <enum>Expanding</enum>
528 </property> 399 </property>
529 </widget> 400 <property>
530 <widget> 401 <name>sizeHint</name>
531 <class>QCheckBox</class> 402 <size>
403 <width>20</width>
404 <height>20</height>
405 </size>
406 </property>
407 </spacer>
408 <widget row="1" column="0" >
409 <class>QListBox</class>
532 <property stdset="1"> 410 <property stdset="1">
533 <name>name</name> 411 <name>name</name>
534 <cstring>jumpTo</cstring> 412 <cstring>destinations</cstring>
535 </property> 413 </property>
536 <property stdset="1"> 414 <property stdset="1">
537 <name>geometry</name> 415 <name>selectionMode</name>
538 <rect> 416 <enum>Single</enum>
539 <x>17</x>
540 <y>14</y>
541 <width>150</width>
542 <height>20</height>
543 </rect>
544 </property> 417 </property>
418 </widget>
419 <widget row="3" column="0" >
420 <class>QLayoutWidget</class>
545 <property stdset="1"> 421 <property stdset="1">
546 <name>text</name> 422 <name>name</name>
547 <string>Show Jump To Letters</string> 423 <cstring>Layout13</cstring>
548 </property> 424 </property>
425 <grid>
426 <property stdset="1">
427 <name>margin</name>
428 <number>0</number>
429 </property>
430 <property stdset="1">
431 <name>spacing</name>
432 <number>6</number>
433 </property>
434 <widget row="1" column="0" >
435 <class>QLabel</class>
436 <property stdset="1">
437 <name>name</name>
438 <cstring>TextLabel1_3_2_2</cstring>
439 </property>
440 <property stdset="1">
441 <name>text</name>
442 <string>URL:</string>
443 </property>
444 </widget>
445 <widget row="3" column="1" >
446 <class>QPushButton</class>
447 <property stdset="1">
448 <name>name</name>
449 <cstring>btnChangeDest</cstring>
450 </property>
451 <property stdset="1">
452 <name>text</name>
453 <string>Change</string>
454 </property>
455 </widget>
456 <widget row="0" column="1" >
457 <class>QLineEdit</class>
458 <property stdset="1">
459 <name>name</name>
460 <cstring>destinationname</cstring>
461 </property>
462 </widget>
463 <widget row="0" column="0" >
464 <class>QLabel</class>
465 <property stdset="1">
466 <name>name</name>
467 <cstring>TextLabel1_3_2</cstring>
468 </property>
469 <property stdset="1">
470 <name>text</name>
471 <string>Name:</string>
472 </property>
473 </widget>
474 <widget row="2" column="1" >
475 <class>QCheckBox</class>
476 <property stdset="1">
477 <name>name</name>
478 <cstring>linkToRoot</cstring>
479 </property>
480 <property stdset="1">
481 <name>text</name>
482 <string>Link To Root</string>
483 </property>
484 <property stdset="1">
485 <name>checked</name>
486 <bool>true</bool>
487 </property>
488 </widget>
489 <widget row="1" column="1" >
490 <class>QLineEdit</class>
491 <property stdset="1">
492 <name>name</name>
493 <cstring>destinationurl</cstring>
494 </property>
495 </widget>
496 </grid>
549 </widget> 497 </widget>
498 </grid>
499 </widget>
500 <widget>
501 <class>QWidget</class>
502 <property stdset="1">
503 <name>name</name>
504 <cstring>tab</cstring>
505 </property>
506 <attribute>
507 <name>title</name>
508 <string>Proxys</string>
509 </attribute>
510 <widget>
511 <class>QLabel</class>
512 <property stdset="1">
513 <name>name</name>
514 <cstring>TextLabel1_2</cstring>
515 </property>
516 <property stdset="1">
517 <name>geometry</name>
518 <rect>
519 <x>1</x>
520 <y>19</y>
521 <width>67</width>
522 <height>22</height>
523 </rect>
524 </property>
525 <property stdset="1">
526 <name>text</name>
527 <string>HTTP Proxy</string>
528 </property>
529 </widget>
530 <widget>
531 <class>QLineEdit</class>
532 <property stdset="1">
533 <name>name</name>
534 <cstring>txtFtpProxy</cstring>
535 </property>
536 <property stdset="1">
537 <name>geometry</name>
538 <rect>
539 <x>74</x>
540 <y>72</y>
541 <width>110</width>
542 <height>22</height>
543 </rect>
544 </property>
545 </widget>
546 <widget>
547 <class>QLineEdit</class>
548 <property stdset="1">
549 <name>name</name>
550 <cstring>txtHttpProxy</cstring>
551 </property>
552 <property stdset="1">
553 <name>geometry</name>
554 <rect>
555 <x>74</x>
556 <y>19</y>
557 <width>110</width>
558 <height>22</height>
559 </rect>
560 </property>
561 </widget>
562 <widget>
563 <class>QLabel</class>
564 <property stdset="1">
565 <name>name</name>
566 <cstring>TextLabel4</cstring>
567 </property>
568 <property stdset="1">
569 <name>geometry</name>
570 <rect>
571 <x>1</x>
572 <y>153</y>
573 <width>67</width>
574 <height>22</height>
575 </rect>
576 </property>
577 <property stdset="1">
578 <name>text</name>
579 <string>Password</string>
580 </property>
581 </widget>
582 <widget>
583 <class>QLineEdit</class>
584 <property stdset="1">
585 <name>name</name>
586 <cstring>txtUsername</cstring>
587 </property>
588 <property stdset="1">
589 <name>geometry</name>
590 <rect>
591 <x>74</x>
592 <y>125</y>
593 <width>110</width>
594 <height>22</height>
595 </rect>
596 </property>
597 </widget>
598 <widget>
599 <class>QLineEdit</class>
600 <property stdset="1">
601 <name>name</name>
602 <cstring>txtPassword</cstring>
603 </property>
604 <property stdset="1">
605 <name>geometry</name>
606 <rect>
607 <x>74</x>
608 <y>153</y>
609 <width>110</width>
610 <height>22</height>
611 </rect>
612 </property>
613 </widget>
614 <widget>
615 <class>QCheckBox</class>
616 <property stdset="1">
617 <name>name</name>
618 <cstring>chkFtpProxyEnabled</cstring>
619 </property>
620 <property stdset="1">
621 <name>geometry</name>
622 <rect>
623 <x>74</x>
624 <y>100</y>
625 <width>110</width>
626 <height>19</height>
627 </rect>
628 </property>
629 <property stdset="1">
630 <name>text</name>
631 <string>Enabled</string>
632 </property>
633 </widget>
634 <widget>
635 <class>QLabel</class>
636 <property stdset="1">
637 <name>name</name>
638 <cstring>TextLabel2</cstring>
639 </property>
640 <property stdset="1">
641 <name>geometry</name>
642 <rect>
643 <x>1</x>
644 <y>72</y>
645 <width>67</width>
646 <height>22</height>
647 </rect>
648 </property>
649 <property stdset="1">
650 <name>text</name>
651 <string>FTP Proxy</string>
652 </property>
653 </widget>
654 <widget>
655 <class>QLabel</class>
656 <property stdset="1">
657 <name>name</name>
658 <cstring>TextLabel3</cstring>
659 </property>
660 <property stdset="1">
661 <name>geometry</name>
662 <rect>
663 <x>1</x>
664 <y>125</y>
665 <width>67</width>
666 <height>22</height>
667 </rect>
668 </property>
669 <property stdset="1">
670 <name>text</name>
671 <string>Username</string>
672 </property>
673 </widget>
674 <widget>
675 <class>QCheckBox</class>
676 <property stdset="1">
677 <name>name</name>
678 <cstring>chkHttpProxyEnabled</cstring>
679 </property>
680 <property stdset="1">
681 <name>geometry</name>
682 <rect>
683 <x>74</x>
684 <y>47</y>
685 <width>110</width>
686 <height>19</height>
687 </rect>
688 </property>
689 <property stdset="1">
690 <name>text</name>
691 <string>Enabled</string>
692 </property>
693 </widget>
694 <widget>
695 <class>QPushButton</class>
696 <property stdset="1">
697 <name>name</name>
698 <cstring>btnProxyApply</cstring>
699 </property>
700 <property stdset="1">
701 <name>geometry</name>
702 <rect>
703 <x>74</x>
704 <y>181</y>
705 <width>110</width>
706 <height>28</height>
707 </rect>
708 </property>
709 <property stdset="1">
710 <name>text</name>
711 <string>&amp;Apply</string>
712 </property>
713 </widget>
714 </widget>
715 <widget>
716 <class>QWidget</class>
717 <property stdset="1">
718 <name>name</name>
719 <cstring>tab</cstring>
720 </property>
721 <attribute>
722 <name>title</name>
723 <string>General</string>
724 </attribute>
725 <widget>
726 <class>QLabel</class>
727 <property stdset="1">
728 <name>name</name>
729 <cstring>TextLabel1</cstring>
730 </property>
731 <property stdset="1">
732 <name>geometry</name>
733 <rect>
734 <x>20</x>
735 <y>30</y>
736 <width>150</width>
737 <height>20</height>
738 </rect>
739 </property>
740 <property stdset="1">
741 <name>text</name>
742 <string>(Will take effect on restart)</string>
743 </property>
744 </widget>
745 <widget>
746 <class>QCheckBox</class>
747 <property stdset="1">
748 <name>name</name>
749 <cstring>jumpTo</cstring>
750 </property>
751 <property stdset="1">
752 <name>geometry</name>
753 <rect>
754 <x>17</x>
755 <y>14</y>
756 <width>150</width>
757 <height>20</height>
758 </rect>
759 </property>
760 <property stdset="1">
761 <name>text</name>
762 <string>Show Jump To Letters</string>
763 </property>
550 </widget> 764 </widget>
551 </widget> 765 </widget>
552 </grid> 766 </widget>
553</widget> 767</widget>
554<connections> 768<connections>
555 <connection> 769 <connection>
556 <sender>newserver</sender> 770 <sender>newserver</sender>
557 <signal>clicked()</signal> 771 <signal>clicked()</signal>
558 <receiver>Settings</receiver> 772 <receiver>Settings</receiver>
559 <slot>newServer()</slot> 773 <slot>newServer()</slot>
560 </connection> 774 </connection>
561 <connection> 775 <connection>
562 <sender>removeserver</sender> 776 <sender>removeserver</sender>
563 <signal>clicked()</signal> 777 <signal>clicked()</signal>
564 <receiver>Settings</receiver> 778 <receiver>Settings</receiver>
565 <slot>removeServer()</slot> 779 <slot>removeServer()</slot>
566 </connection> 780 </connection>
567 <connection> 781 <connection>
568 <sender>newdestination</sender> 782 <sender>newdestination</sender>
569 <signal>clicked()</signal> 783 <signal>clicked()</signal>
570 <receiver>Settings</receiver> 784 <receiver>Settings</receiver>
571 <slot>newDestination()</slot> 785 <slot>newDestination()</slot>
572 </connection> 786 </connection>
573 <connection> 787 <connection>
574 <sender>removedestination</sender> 788 <sender>removedestination</sender>
575 <signal>clicked()</signal> 789 <signal>clicked()</signal>
576 <receiver>Settings</receiver> 790 <receiver>Settings</receiver>
577 <slot>removeDestination()</slot> 791 <slot>removeDestination()</slot>
578 </connection> 792 </connection>
579 <connection> 793 <connection>
580 <sender>servers</sender> 794 <sender>servers</sender>
581 <signal>highlighted(int)</signal> 795 <signal>highlighted(int)</signal>
582 <receiver>Settings</receiver> 796 <receiver>Settings</receiver>
583 <slot>editServer(int)</slot> 797 <slot>editServer(int)</slot>
584 </connection> 798 </connection>
585 <connection> 799 <connection>
586 <sender>destinations</sender> 800 <sender>destinations</sender>
587 <signal>highlighted(int)</signal> 801 <signal>highlighted(int)</signal>
588 <receiver>Settings</receiver> 802 <receiver>Settings</receiver>
589 <slot>editDestination(int)</slot> 803 <slot>editDestination(int)</slot>
590 </connection> 804 </connection>
591 <connection> 805 <connection>
592 <sender>btnChangeServer</sender> 806 <sender>btnChangeServer</sender>
593 <signal>clicked()</signal> 807 <signal>clicked()</signal>
594 <receiver>Settings</receiver> 808 <receiver>Settings</receiver>
595 <slot>changeServerDetails()</slot> 809 <slot>changeServerDetails()</slot>
596 </connection> 810 </connection>
597 <connection> 811 <connection>
598 <sender>btnChangeDest</sender> 812 <sender>btnChangeDest</sender>
599 <signal>clicked()</signal> 813 <signal>clicked()</signal>
600 <receiver>Settings</receiver> 814 <receiver>Settings</receiver>
601 <slot>changeDestinationDetails()</slot> 815 <slot>changeDestinationDetails()</slot>
602 </connection> 816 </connection>
603 <connection> 817 <connection>
604 <sender>jumpTo</sender> 818 <sender>jumpTo</sender>
605 <signal>toggled(bool)</signal> 819 <signal>toggled(bool)</signal>
606 <receiver>Settings</receiver> 820 <receiver>Settings</receiver>
607 <slot>toggleJumpTo(bool)</slot> 821 <slot>toggleJumpTo(bool)</slot>
608 </connection> 822 </connection>
823 <connection>
824 <sender>btnProxyApply</sender>
825 <signal>clicked()</signal>
826 <receiver>Settings</receiver>
827 <slot>proxyApplyChanges()</slot>
828 </connection>
609 <slot access="public">activeServerChanged()</slot> 829 <slot access="public">activeServerChanged()</slot>
610 <slot access="public">changeDestinationDetails()</slot> 830 <slot access="public">changeDestinationDetails()</slot>
611 <slot access="public">changeServerDetails()</slot> 831 <slot access="public">changeServerDetails()</slot>
612 <slot access="public">createLinksToDest()</slot> 832 <slot access="public">createLinksToDest()</slot>
613 <slot access="public">destNameChanged(const QString&amp;)</slot> 833 <slot access="public">destNameChanged(const QString&amp;)</slot>
614 <slot access="public">destUrlChanged(const QString&amp;)</slot> 834 <slot access="public">destUrlChanged(const QString&amp;)</slot>
615 <slot access="public">editDestination(int)</slot> 835 <slot access="public">editDestination(int)</slot>
616 <slot access="public">editServer(int)</slot> 836 <slot access="public">editServer(int)</slot>
617 <slot access="public">installationSettingChange(int)</slot> 837 <slot access="public">installationSettingChange(int)</slot>
618 <slot access="public">installationSettingSetName(const QString &amp;)</slot> 838 <slot access="public">installationSettingSetName(const QString &amp;)</slot>
619 <slot access="public">linkEnabled(bool)</slot> 839 <slot access="public">linkEnabled(bool)</slot>
620 <slot access="public">newDestination()</slot> 840 <slot access="public">newDestination()</slot>
621 <slot access="public">newInstallationSetting()</slot> 841 <slot access="public">newInstallationSetting()</slot>
622 <slot access="public">newServer()</slot> 842 <slot access="public">newServer()</slot>
843 <slot access="public">proxyApplyChanges()</slot>
623 <slot access="public">removeDestination()</slot> 844 <slot access="public">removeDestination()</slot>
624 <slot access="public">removeInstallationSetting()</slot> 845 <slot access="public">removeInstallationSetting()</slot>
625 <slot access="public">removeLinksToDest()</slot> 846 <slot access="public">removeLinksToDest()</slot>
626 <slot access="public">removeServer()</slot> 847 <slot access="public">removeServer()</slot>
627 <slot access="public">renameInstallationSetting()</slot> 848 <slot access="public">renameInstallationSetting()</slot>
628 <slot access="public">serverNameChanged(const QString&amp;)</slot> 849 <slot access="public">serverNameChanged(const QString&amp;)</slot>
629 <slot access="public">serverUrlChanged(const QString&amp;)</slot> 850 <slot access="public">serverUrlChanged(const QString&amp;)</slot>
630 <slot access="public">toggleJumpTo(bool)</slot> 851 <slot access="public">toggleJumpTo(bool)</slot>
631</connections> 852</connections>
632<tabstops> 853<tabstops>
633 <tabstop>servers</tabstop> 854 <tabstop>servers</tabstop>
634 <tabstop>newserver</tabstop> 855 <tabstop>newserver</tabstop>
635 <tabstop>removeserver</tabstop> 856 <tabstop>removeserver</tabstop>
636 <tabstop>servername</tabstop> 857 <tabstop>servername</tabstop>
637 <tabstop>serverurl</tabstop> 858 <tabstop>serverurl</tabstop>
638 <tabstop>active</tabstop> 859 <tabstop>active</tabstop>
639 <tabstop>btnChangeServer</tabstop> 860 <tabstop>btnChangeServer</tabstop>
640 <tabstop>TabWidget</tabstop> 861 <tabstop>TabWidget</tabstop>
641 <tabstop>destinations</tabstop> 862 <tabstop>destinations</tabstop>
642 <tabstop>newdestination</tabstop> 863 <tabstop>newdestination</tabstop>
643 <tabstop>removedestination</tabstop> 864 <tabstop>removedestination</tabstop>
644 <tabstop>destinationname</tabstop> 865 <tabstop>destinationname</tabstop>
645 <tabstop>destinationurl</tabstop> 866 <tabstop>destinationurl</tabstop>
646 <tabstop>linkToRoot</tabstop> 867 <tabstop>linkToRoot</tabstop>
647 <tabstop>btnChangeDest</tabstop> 868 <tabstop>btnChangeDest</tabstop>
648 <tabstop>jumpTo</tabstop> 869 <tabstop>jumpTo</tabstop>
649</tabstops> 870</tabstops>
650</UI> 871</UI>
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 9dd2206..4bb928a 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -1,246 +1,267 @@
1/*************************************************************************** 1/***************************************************************************
2 settingsimpl.cpp - description 2 settingsimpl.cpp - description
3 ------------------- 3 -------------------
4 begin : Thu Aug 29 2002 4 begin : Thu Aug 29 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include <fstream> 18#include <fstream>
19#include <algorithm> 19#include <algorithm>
20using namespace std; 20using namespace std;
21 21
22#include <qlistbox.h> 22#include <qlistbox.h>
23#include <qlineedit.h> 23#include <qlineedit.h>
24#include <qpushbutton.h> 24#include <qpushbutton.h>
25#include <qtabwidget.h> 25#include <qtabwidget.h>
26#include <qcheckbox.h> 26#include <qcheckbox.h>
27 27
28#ifdef QWS 28#ifdef QWS
29#include <qpe/config.h> 29#include <qpe/config.h>
30#endif 30#endif
31 31
32#include "settingsimpl.h" 32#include "settingsimpl.h"
33 33
34#include "global.h" 34#include "global.h"
35 35
36SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) 36SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl )
37 : SettingsBase( parent, name, modal, fl ) 37 : SettingsBase( parent, name, modal, fl )
38{ 38{
39 dataMgr = dataManager; 39 dataMgr = dataManager;
40 40
41 setupData(); 41 setupData();
42 changed = false; 42 changed = false;
43 newserver = false; 43 newserver = false;
44 newdestination = false; 44 newdestination = false;
45} 45}
46 46
47SettingsImpl :: ~SettingsImpl() 47SettingsImpl :: ~SettingsImpl()
48{ 48{
49 49
50} 50}
51 51
52bool SettingsImpl :: showDlg( int i ) 52bool SettingsImpl :: showDlg( int i )
53{ 53{
54 TabWidget->setCurrentPage( i ); 54 TabWidget->setCurrentPage( i );
55 showMaximized(); 55 showMaximized();
56 exec(); 56 exec();
57 57
58 if ( changed ) 58 if ( changed )
59 dataMgr->writeOutIpkgConf(); 59 dataMgr->writeOutIpkgConf();
60 60
61 return changed; 61 return changed;
62} 62}
63 63
64void SettingsImpl :: setupData() 64void SettingsImpl :: setupData()
65{ 65{
66 // add servers 66 // add servers
67 vector<Server>::iterator it; 67 vector<Server>::iterator it;
68 for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it ) 68 for ( it = dataMgr->getServerList().begin() ; it != dataMgr->getServerList().end() ; ++it )
69 { 69 {
70 if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS ) 70 if ( it->getServerName() == LOCAL_SERVER || it->getServerName() == LOCAL_IPKGS )
71 continue; 71 continue;
72 72
73 servers->insertItem( it->getServerName() ); 73 servers->insertItem( it->getServerName() );
74 } 74 }
75 75
76 // add destinations 76 // add destinations
77 vector<Destination>::iterator it2; 77 vector<Destination>::iterator it2;
78 for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 ) 78 for ( it2 = dataMgr->getDestinationList().begin() ; it2 != dataMgr->getDestinationList().end() ; ++it2 )
79 destinations->insertItem( it2->getDestinationName() ); 79 destinations->insertItem( it2->getDestinationName() );
80 80
81 // setup general tab
81#ifdef QWS 82#ifdef QWS
82 Config cfg( "aqpkg" ); 83 Config cfg( "aqpkg" );
83 cfg.setGroup( "settings" ); 84 cfg.setGroup( "settings" );
84 jumpTo->setChecked( cfg.readBoolEntry( "showJumpTo", "true" ) ); 85 jumpTo->setChecked( cfg.readBoolEntry( "showJumpTo", "true" ) );
85#else 86#else
86 jumpTo->setChecked( true ); 87 jumpTo->setChecked( true );
87#endif 88#endif
89
90 // setup proxy tab
91 txtHttpProxy->setText( dataMgr->getHttpProxy() );
92 txtFtpProxy->setText( dataMgr->getFtpProxy() );
93 txtUsername->setText( dataMgr->getProxyUsername() );
94 txtPassword->setText( dataMgr->getProxyPassword() );
95 chkHttpProxyEnabled->setChecked( dataMgr->getHttpProxyEnabled() );
96 chkFtpProxyEnabled->setChecked( dataMgr->getFtpProxyEnabled() );
88} 97}
89 98
90//------------------ Servers tab ---------------------- 99//------------------ Servers tab ----------------------
91 100
92void SettingsImpl :: editServer( int sel ) 101void SettingsImpl :: editServer( int sel )
93{ 102{
94 currentSelectedServer = sel; 103 currentSelectedServer = sel;
95 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); 104 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
96 serverName = s->getServerName(); 105 serverName = s->getServerName();
97 servername->setText( s->getServerName() ); 106 servername->setText( s->getServerName() );
98 serverurl->setText( s->getServerUrl() ); 107 serverurl->setText( s->getServerUrl() );
99 active->setChecked( s->isServerActive() ); 108 active->setChecked( s->isServerActive() );
100} 109}
101 110
102void SettingsImpl :: newServer() 111void SettingsImpl :: newServer()
103{ 112{
104 newserver = true; 113 newserver = true;
105 servername->setText( "" ); 114 servername->setText( "" );
106 serverurl->setText( "" ); 115 serverurl->setText( "" );
107 servername->setFocus(); 116 servername->setFocus();
108 active->setChecked( true ); 117 active->setChecked( true );
109} 118}
110 119
111void SettingsImpl :: removeServer() 120void SettingsImpl :: removeServer()
112{ 121{
113 changed = true; 122 changed = true;
114 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); 123 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
115 dataMgr->getServerList().erase( s ); 124 dataMgr->getServerList().erase( s );
116 servers->removeItem( currentSelectedServer ); 125 servers->removeItem( currentSelectedServer );
117} 126}
118 127
119void SettingsImpl :: changeServerDetails() 128void SettingsImpl :: changeServerDetails()
120{ 129{
121 changed = true; 130 changed = true;
122 131
123 QString newName = servername->text(); 132 QString newName = servername->text();
124 if ( !newserver ) 133 if ( !newserver )
125 { 134 {
126 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() ); 135 vector<Server>::iterator s = dataMgr->getServer( servers->currentText() );
127 136
128 // Update url 137 // Update url
129 s->setServerUrl( serverurl->text() ); 138 s->setServerUrl( serverurl->text() );
130 s->setActive( active->isChecked() ); 139 s->setActive( active->isChecked() );
131 140
132 141
133 // Check if server name has changed, if it has then we need to replace the key in the map 142 // Check if server name has changed, if it has then we need to replace the key in the map
134 if ( serverName != newName ) 143 if ( serverName != newName )
135 { 144 {
136 // Update server name 145 // Update server name
137 s->setServerName( newName ); 146 s->setServerName( newName );
138 147
139 // See if this server is the active server 148 // See if this server is the active server
140 // if ( dataMgr->getActiveServer() == serverName ) 149 // if ( dataMgr->getActiveServer() == serverName )
141 // dataMgr->setActiveServer( newName ); 150 // dataMgr->setActiveServer( newName );
142 151
143 // Update list box 152 // Update list box
144 servers->changeItem( newName, currentSelectedServer ); 153 servers->changeItem( newName, currentSelectedServer );
145 } 154 }
146 } 155 }
147 else 156 else
148 { 157 {
149 Server s( newName, serverurl->text() ); 158 Server s( newName, serverurl->text() );
150 dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) ); 159 dataMgr->getServerList().push_back( Server( newName, serverurl->text() ) );
151 dataMgr->getServerList().end()->setActive( active->isChecked() ); 160 dataMgr->getServerList().end()->setActive( active->isChecked() );
152 servers->insertItem( newName ); 161 servers->insertItem( newName );
153 servers->setCurrentItem( servers->count() ); 162 servers->setCurrentItem( servers->count() );
154 newserver = false; 163 newserver = false;
155 } 164 }
156} 165}
157 166
158//------------------ Destinations tab ---------------------- 167//------------------ Destinations tab ----------------------
159 168
160void SettingsImpl :: editDestination( int sel ) 169void SettingsImpl :: editDestination( int sel )
161{ 170{
162 currentSelectedDestination = sel; 171 currentSelectedDestination = sel;
163 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); 172 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
164 destinationName = d->getDestinationName(); 173 destinationName = d->getDestinationName();
165 destinationname->setText( d->getDestinationName() ); 174 destinationname->setText( d->getDestinationName() );
166 destinationurl->setText( d->getDestinationPath() ); 175 destinationurl->setText( d->getDestinationPath() );
167 linkToRoot->setChecked( d->linkToRoot() ); 176 linkToRoot->setChecked( d->linkToRoot() );
168} 177}
169 178
170void SettingsImpl :: newDestination() 179void SettingsImpl :: newDestination()
171{ 180{
172 newdestination = true; 181 newdestination = true;
173 destinationname->setText( "" ); 182 destinationname->setText( "" );
174 destinationurl->setText( "" ); 183 destinationurl->setText( "" );
175 destinationname->setFocus(); 184 destinationname->setFocus();
176 linkToRoot->setChecked( true ); 185 linkToRoot->setChecked( true );
177} 186}
178 187
179void SettingsImpl :: removeDestination() 188void SettingsImpl :: removeDestination()
180{ 189{
181 changed = true; 190 changed = true;
182 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); 191 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
183 dataMgr->getDestinationList().erase( d ); 192 dataMgr->getDestinationList().erase( d );
184 destinations->removeItem( currentSelectedDestination ); 193 destinations->removeItem( currentSelectedDestination );
185} 194}
186 195
187void SettingsImpl :: changeDestinationDetails() 196void SettingsImpl :: changeDestinationDetails()
188{ 197{
189 changed = true; 198 changed = true;
190 199
191#ifdef QWS 200#ifdef QWS
192 Config cfg( "aqpkg" ); 201 Config cfg( "aqpkg" );
193 cfg.setGroup( "destinations" ); 202 cfg.setGroup( "destinations" );
194#endif 203#endif
195 204
196 QString newName = destinationname->text(); 205 QString newName = destinationname->text();
197 if ( !newdestination ) 206 if ( !newdestination )
198 { 207 {
199 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() ); 208 vector<Destination>::iterator d = dataMgr->getDestination( destinations->currentText() );
200 209
201 // Update url 210 // Update url
202 d->setDestinationPath( destinationurl->text() ); 211 d->setDestinationPath( destinationurl->text() );
203 d->linkToRoot( linkToRoot->isChecked() ); 212 d->linkToRoot( linkToRoot->isChecked() );
204 213
205 // Check if server name has changed, if it has then we need to replace the key in the map 214 // Check if server name has changed, if it has then we need to replace the key in the map
206 if ( destinationName != newName ) 215 if ( destinationName != newName )
207 { 216 {
208 // Update server name 217 // Update server name
209 d->setDestinationName( newName ); 218 d->setDestinationName( newName );
210 219
211 // Update list box 220 // Update list box
212 destinations->changeItem( newName, currentSelectedDestination ); 221 destinations->changeItem( newName, currentSelectedDestination );
213 } 222 }
214#ifdef QWS 223#ifdef QWS
215 QString key = newName; 224 QString key = newName;
216 key += "_linkToRoot"; 225 key += "_linkToRoot";
217 int val = d->linkToRoot(); 226 int val = d->linkToRoot();
218 cfg.writeEntry( key, val ); 227 cfg.writeEntry( key, val );
219#endif 228#endif
220 } 229 }
221 else 230 else
222 { 231 {
223 dataMgr->getDestinationList().push_back( Destination( newName, destinationurl->text() ) ); 232 dataMgr->getDestinationList().push_back( Destination( newName, destinationurl->text() ) );
224 destinations->insertItem( newName ); 233 destinations->insertItem( newName );
225 destinations->setCurrentItem( destinations->count() ); 234 destinations->setCurrentItem( destinations->count() );
226 newdestination = false; 235 newdestination = false;
227 236
228#ifdef QWS 237#ifdef QWS
229 QString key = newName; 238 QString key = newName;
230 key += "_linkToRoot"; 239 key += "_linkToRoot";
231 cfg.writeEntry( key, true ); 240 cfg.writeEntry( key, true );
232#endif 241#endif
233 } 242 }
234} 243}
235 244
236//------------------ General tab ---------------------- 245//------------------ General tab ----------------------
237 246
238void SettingsImpl :: toggleJumpTo( bool val ) 247void SettingsImpl :: toggleJumpTo( bool val )
239{ 248{
240#ifdef QWS 249#ifdef QWS
241 Config cfg( "aqpkg" ); 250 Config cfg( "aqpkg" );
242 cfg.setGroup( "settings" ); 251 cfg.setGroup( "settings" );
243 cfg.writeEntry( "showJumpTo", val ); 252 cfg.writeEntry( "showJumpTo", val );
244#endif 253#endif
245} 254}
246 255
256//------------------ Proxy tab ----------------------
257void SettingsImpl :: proxyApplyChanges()
258{
259 changed = true;
260 dataMgr->setHttpProxy( txtHttpProxy->text() );
261 dataMgr->setFtpProxy( txtFtpProxy->text() );
262 dataMgr->setProxyUsername( txtUsername->text() );
263 dataMgr->setProxyPassword( txtPassword->text() );
264
265 dataMgr->setHttpProxyEnabled( chkHttpProxyEnabled->isChecked() );
266 dataMgr->setFtpProxyEnabled( chkFtpProxyEnabled->isChecked() );
267}
diff --git a/noncore/settings/aqpkg/settingsimpl.h b/noncore/settings/aqpkg/settingsimpl.h
index 971516b..bb027dc 100644
--- a/noncore/settings/aqpkg/settingsimpl.h
+++ b/noncore/settings/aqpkg/settingsimpl.h
@@ -1,54 +1,56 @@
1/*************************************************************************** 1/***************************************************************************
2 settingsimpl.h - description 2 settingsimpl.h - description
3 ------------------- 3 -------------------
4 begin : Thu Aug 29 2002 4 begin : Thu Aug 29 2002
5 copyright : (C) 2002 by Andy Qua 5 copyright : (C) 2002 by Andy Qua
6 email : andy.qua@blueyonder.co.uk 6 email : andy.qua@blueyonder.co.uk
7 ***************************************************************************/ 7 ***************************************************************************/
8 8
9/*************************************************************************** 9/***************************************************************************
10 * * 10 * *
11 * This program is free software; you can redistribute it and/or modify * 11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or * 13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. * 14 * (at your option) any later version. *
15 * * 15 * *
16 ***************************************************************************/ 16 ***************************************************************************/
17 17
18#include "settings.h" 18#include "settings.h"
19 19
20#include "datamgr.h" 20#include "datamgr.h"
21 21
22class SettingsImpl : public SettingsBase 22class SettingsImpl : public SettingsBase
23{ 23{
24public: 24public:
25 SettingsImpl( DataManager *dataManager, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); 25 SettingsImpl( DataManager *dataManager, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
26 ~SettingsImpl(); 26 ~SettingsImpl();
27 27
28 bool showDlg( int i ); 28 bool showDlg( int i );
29 29
30private: 30private:
31 DataManager *dataMgr; 31 DataManager *dataMgr;
32 QString serverName; 32 QString serverName;
33 QString destinationName; 33 QString destinationName;
34 int currentSelectedServer; 34 int currentSelectedServer;
35 int currentSelectedDestination; 35 int currentSelectedDestination;
36 bool changed; 36 bool changed;
37 bool newserver; 37 bool newserver;
38 bool newdestination; 38 bool newdestination;
39 39
40 void setupConnections(); 40 void setupConnections();
41 void setupData(); 41 void setupData();
42 42
43 void editServer( int s ); 43 void editServer( int s );
44 void changeServerDetails(); 44 void changeServerDetails();
45 void newServer(); 45 void newServer();
46 void removeServer(); 46 void removeServer();
47 47
48 void editDestination( int s ); 48 void editDestination( int s );
49 void changeDestinationDetails(); 49 void changeDestinationDetails();
50 void newDestination(); 50 void newDestination();
51 void removeDestination(); 51 void removeDestination();
52 52
53 void toggleJumpTo( bool val ); 53 void toggleJumpTo( bool val );
54
55 void proxyApplyChanges();
54}; 56};