author | drw <drw> | 2003-04-29 02:28:16 (UTC) |
---|---|---|
committer | drw <drw> | 2003-04-29 02:28:16 (UTC) |
commit | e096c9d1f2be1ec74ede583fc4221871a56ef508 (patch) (unidiff) | |
tree | 1c6f49430179e2f262179951477bbe4bd7d32e71 | |
parent | 2f26f696ca6acd05aa615e15d891eede9907a1c0 (diff) | |
download | opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.zip opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.gz opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.bz2 |
Give aqpkg standard source headers and some minor code clean-up.
31 files changed, 951 insertions, 617 deletions
diff --git a/noncore/settings/aqpkg/categoryfilterimpl.cpp b/noncore/settings/aqpkg/categoryfilterimpl.cpp index e8ce7e7..61e1f93 100644 --- a/noncore/settings/aqpkg/categoryfilterimpl.cpp +++ b/noncore/settings/aqpkg/categoryfilterimpl.cpp | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | categoryfilterimpl.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sun Nov 17 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
29 | |||
17 | #include <iostream> | 30 | #include <iostream> |
18 | using namespace std; | 31 | using namespace std; |
19 | 32 | ||
20 | #include <qgroupbox.h> | 33 | #include <qgroupbox.h> |
21 | #include <qlayout.h> | 34 | #include <qlayout.h> |
22 | #include <qlistbox.h> | 35 | #include <qlistbox.h> |
23 | #include <qstring.h> | 36 | #include <qstring.h> |
24 | 37 | ||
25 | #include "categoryfilterimpl.h" | 38 | #include "categoryfilterimpl.h" |
26 | 39 | ||
27 | CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QString &selectedCategories, QWidget *parent, const char *name ) | 40 | CategoryFilterImpl :: CategoryFilterImpl(const QString &categories, const QString &selectedCategories, QWidget *parent, const char *name ) |
28 | : QDialog( parent, name, true ) | 41 | : QDialog( parent, name, true ) |
diff --git a/noncore/settings/aqpkg/categoryfilterimpl.h b/noncore/settings/aqpkg/categoryfilterimpl.h index a85fce4..78d39db 100644 --- a/noncore/settings/aqpkg/categoryfilterimpl.h +++ b/noncore/settings/aqpkg/categoryfilterimpl.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | categoryfilterimpl.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sun Nov 17 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifndef CATEGORYFILTERIMPL_H | 30 | #ifndef CATEGORYFILTERIMPL_H |
19 | #define CATEGORYFILTERIMPL_H | 31 | #define CATEGORYFILTERIMPL_H |
20 | 32 | ||
21 | #include <qdialog.h> | 33 | #include <qdialog.h> |
22 | 34 | ||
23 | class QListBox; | 35 | class QListBox; |
24 | 36 | ||
25 | /** | 37 | /** |
26 | *@author Andy Qua | 38 | *@author Andy Qua |
27 | */ | 39 | */ |
28 | 40 | ||
diff --git a/noncore/settings/aqpkg/datamgr.cpp b/noncore/settings/aqpkg/datamgr.cpp index 79f36e1..cd0c78f 100644 --- a/noncore/settings/aqpkg/datamgr.cpp +++ b/noncore/settings/aqpkg/datamgr.cpp | |||
@@ -1,40 +1,50 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | datamgr.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Thu Aug 29 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | #include <fstream> | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | #include <iostream> | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | using namespace std; | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
20 | 29 | ||
21 | #ifdef QWS | 30 | #ifdef QWS |
22 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
23 | #include <qpe/qpeapplication.h> | 32 | #include <qpe/qpeapplication.h> |
24 | #else | 33 | #else |
25 | #include <qapplication.h> | 34 | #include <qapplication.h> |
26 | #endif | 35 | #endif |
27 | 36 | ||
28 | #include <stdio.h> | 37 | #include <qfile.h> |
38 | #include <qtextstream.h> | ||
29 | 39 | ||
30 | #include "datamgr.h" | 40 | #include "datamgr.h" |
31 | #include "global.h" | 41 | #include "global.h" |
32 | 42 | ||
33 | 43 | ||
34 | QString DataManager::availableCategories = ""; | 44 | QString DataManager::availableCategories = ""; |
35 | DataManager::DataManager() | 45 | DataManager::DataManager() |
36 | : QObject( 0x0, 0x0 ) | 46 | : QObject( 0x0, 0x0 ) |
37 | { | 47 | { |
38 | activeServer = ""; | 48 | activeServer = ""; |
39 | availableCategories = "#"; | 49 | availableCategories = "#"; |
40 | 50 | ||
@@ -79,25 +89,24 @@ void DataManager :: loadServers() | |||
79 | Config cfg( "aqpkg" ); | 89 | Config cfg( "aqpkg" ); |
80 | cfg.setGroup( "destinations" ); | 90 | cfg.setGroup( "destinations" ); |
81 | #endif | 91 | #endif |
82 | 92 | ||
83 | // Read file from /etc/ipkg.conf | 93 | // Read file from /etc/ipkg.conf |
84 | QString ipkg_conf = IPKG_CONF; | 94 | QString ipkg_conf = IPKG_CONF; |
85 | FILE *fp; | 95 | FILE *fp; |
86 | fp = fopen( ipkg_conf, "r" ); | 96 | fp = fopen( ipkg_conf, "r" ); |
87 | char line[130]; | 97 | char line[130]; |
88 | QString lineStr; | 98 | QString lineStr; |
89 | if ( fp == NULL ) | 99 | if ( fp == NULL ) |
90 | { | 100 | { |
91 | cout << "Couldn't open " << ipkg_conf << "! err = " << fp << endl; | ||
92 | return; | 101 | return; |
93 | } | 102 | } |
94 | else | 103 | else |
95 | { | 104 | { |
96 | while ( fgets( line, sizeof line, fp) != NULL ) | 105 | while ( fgets( line, sizeof line, fp) != NULL ) |
97 | { | 106 | { |
98 | lineStr = line; | 107 | lineStr = line; |
99 | if ( lineStr.startsWith( "src" ) || lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) ) | 108 | if ( lineStr.startsWith( "src" ) || lineStr.startsWith( "#src" ) || lineStr.startsWith( "# src" ) ) |
100 | { | 109 | { |
101 | char alias[20]; | 110 | char alias[20]; |
102 | char url[100]; | 111 | char url[100]; |
103 | 112 | ||
@@ -189,103 +198,115 @@ void DataManager :: reloadServerData( ) | |||
189 | // The other servers files hold the contents of the server package list | 198 | // The other servers files hold the contents of the server package list |
190 | if ( serverName == LOCAL_SERVER ) | 199 | if ( serverName == LOCAL_SERVER ) |
191 | server->readStatusFile( destList ); | 200 | server->readStatusFile( destList ); |
192 | else if ( serverName == LOCAL_IPKGS ) | 201 | else if ( serverName == LOCAL_IPKGS ) |
193 | server->readLocalIpks( getServer( LOCAL_SERVER ) ); | 202 | server->readLocalIpks( getServer( LOCAL_SERVER ) ); |
194 | else | 203 | else |
195 | server->readPackageFile( getServer( LOCAL_SERVER ) ); | 204 | server->readPackageFile( getServer( LOCAL_SERVER ) ); |
196 | } | 205 | } |
197 | } | 206 | } |
198 | 207 | ||
199 | void DataManager :: writeOutIpkgConf() | 208 | void DataManager :: writeOutIpkgConf() |
200 | { | 209 | { |
210 | QFile f( IPKG_CONF ); | ||
211 | if ( !f.open( IO_WriteOnly ) ) | ||
212 | { | ||
213 | return; | ||
214 | } | ||
215 | |||
216 | QTextStream t( &f ); | ||
217 | /* | ||
201 | QString ipkg_conf = IPKG_CONF; | 218 | QString ipkg_conf = IPKG_CONF; |
202 | ofstream out( ipkg_conf ); | 219 | ofstream out( ipkg_conf ); |
220 | */ | ||
221 | t << "# Written by AQPkg\n"; | ||
222 | t << "# Must have one or more source entries of the form:\n"; | ||
223 | t << "#\n"; | ||
224 | t << "# src <src-name> <source-url>\n"; | ||
225 | t << "#\n"; | ||
226 | t << "# and one or more destination entries of the form:\n"; | ||
227 | t << "#\n"; | ||
228 | t << "# dest <dest-name> <target-path>\n"; | ||
229 | t << "#\n"; | ||
230 | t << "# where <src-name> and <dest-names> are identifiers that\n"; | ||
231 | t << "# should match [a-zA-Z0-9._-]+, <source-url> should be a\n"; | ||
232 | t << "# URL that points to a directory containing a Familiar\n"; | ||
233 | t << "# Packages file, and <target-path> should be a directory\n"; | ||
234 | t << "# that exists on the target system.\n\n"; | ||
203 | 235 | ||
204 | out << "# Written by AQPkg" << endl; | ||
205 | out << "# Must have one or more source entries of the form:" << endl; | ||
206 | out << "#" << endl; | ||
207 | out << "# src <src-name> <source-url>" << endl; | ||
208 | out << "#" << endl; | ||
209 | out << "# and one or more destination entries of the form:" << endl; | ||
210 | out << "#" << endl; | ||
211 | out << "# dest <dest-name> <target-path>" << endl; | ||
212 | out << "#" << endl; | ||
213 | out << "# where <src-name> and <dest-names> are identifiers that" << endl; | ||
214 | out << "# should match [a-zA-Z0-9._-]+, <source-url> should be a" << endl; | ||
215 | out << "# URL that points to a directory containing a Familiar" << endl; | ||
216 | out << "# Packages file, and <target-path> should be a directory" << endl; | ||
217 | out << "# that exists on the target system." << endl << endl; | ||
218 | |||
219 | // Write out servers | 236 | // Write out servers |
220 | Server *server; | 237 | Server *server; |
221 | QListIterator<Server> it( serverList ); | 238 | QListIterator<Server> it( serverList ); |
222 | while ( it.current() ) | 239 | while ( it.current() ) |
223 | { | 240 | { |
224 | server = it.current(); | 241 | server = it.current(); |
225 | QString alias = server->getServerName(); | 242 | QString alias = server->getServerName(); |
226 | // Don't write out local as its a dummy | 243 | // Don't write out local as its a dummy |
227 | if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS ) | 244 | if ( alias != LOCAL_SERVER && alias != LOCAL_IPKGS ) |
228 | { | 245 | { |
229 | QString url = server->getServerUrl();; | 246 | QString url = server->getServerUrl();; |
230 | 247 | ||
231 | if ( !server->isServerActive() ) | 248 | if ( !server->isServerActive() ) |
232 | out << "#"; | 249 | t << "#"; |
233 | out << "src " << alias << " " << url << endl; | 250 | t << "src " << alias << " " << url << endl; |
234 | } | 251 | } |
235 | 252 | ||
236 | ++it; | 253 | ++it; |
237 | } | 254 | } |
238 | 255 | ||
239 | out << endl; | 256 | t << endl; |
240 | 257 | ||
241 | // Write out destinations | 258 | // Write out destinations |
242 | QListIterator<Destination> it2( destList ); | 259 | QListIterator<Destination> it2( destList ); |
243 | while ( it2.current() ) | 260 | while ( it2.current() ) |
244 | { | 261 | { |
245 | out << "dest " << it2.current()->getDestinationName() << " " << it2.current()->getDestinationPath() << endl; | 262 | t << "dest " << it2.current()->getDestinationName() << " " << it2.current()->getDestinationPath() << endl; |
246 | ++it2; | 263 | ++it2; |
247 | } | 264 | } |
248 | 265 | ||
249 | out << endl; | 266 | t << endl; |
250 | out << "# Proxy Support" << endl; | 267 | t << "# Proxy Support\n"; |
251 | 268 | ||
252 | if ( !httpProxyEnabled && httpProxy == "" ) | 269 | if ( !httpProxyEnabled && httpProxy == "" ) |
253 | out << "#option http_proxy http://proxy.tld:3128" << endl; | 270 | t << "#option http_proxy http://proxy.tld:3128\n"; |
254 | else | 271 | else |
255 | { | 272 | { |
256 | if ( !httpProxyEnabled ) | 273 | if ( !httpProxyEnabled ) |
257 | out << "#"; | 274 | t << "#"; |
258 | out << "option http_proxy " << httpProxy << endl; | 275 | t << "option http_proxy " << httpProxy << endl; |
259 | } | 276 | } |
260 | 277 | ||
261 | if ( !ftpProxyEnabled && ftpProxy == "" ) | 278 | if ( !ftpProxyEnabled && ftpProxy == "" ) |
262 | out << "#option ftp_proxy http://proxy.tld:3128" << endl; | 279 | t << "#option ftp_proxy http://proxy.tld:3128\n"; |
263 | else | 280 | else |
264 | { | 281 | { |
265 | if ( !ftpProxyEnabled ) | 282 | if ( !ftpProxyEnabled ) |
266 | out << "#"; | 283 | t << "#"; |
267 | out << "option ftp_proxy " << ftpProxy << endl; | 284 | t << "option ftp_proxy " << ftpProxy << endl; |
268 | } | 285 | } |
269 | if ( proxyUsername == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) | 286 | if ( proxyUsername == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) |
270 | out << "#option proxy_username <username>" << endl; | 287 | t << "#option proxy_username <username>\n"; |
271 | else | 288 | else |
272 | out << "option proxy_username " << proxyUsername << endl; | 289 | t << "option proxy_username " << proxyUsername << endl; |
273 | if ( proxyPassword == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) | 290 | if ( proxyPassword == "" || (!httpProxyEnabled && !ftpProxyEnabled) ) |
274 | out << "#option proxy_password <password>" << endl << endl; | 291 | t << "#option proxy_password <password>\n\n"; |
275 | else | 292 | else |
276 | out << "option proxy_password " << proxyPassword << endl<< endl; | 293 | t << "option proxy_password " << proxyPassword << endl<< endl; |
277 | |||
278 | out << "# Offline mode (for use in constructing flash images offline)" << endl; | ||
279 | out << "#option offline_root target" << endl; | ||
280 | 294 | ||
295 | t << "# Offline mode (for use in constructing flash images offline)\n"; | ||
296 | t << "#option offline_root target\n"; | ||
281 | 297 | ||
282 | out.close(); | 298 | f.close(); |
283 | } | 299 | } |
284 | 300 | ||
285 | 301 | ||
286 | void DataManager :: setAvailableCategories( QString section ) | 302 | void DataManager :: setAvailableCategories( QString section ) |
287 | { | 303 | { |
288 | section = section.lower(); | 304 | QString sectstr = "#"; |
289 | if ( availableCategories.find( "#" + section + "#" ) == -1 ) | 305 | sectstr.append( section.lower() ); |
290 | availableCategories += section + "#"; | 306 | sectstr.append( "#" ); |
307 | if ( availableCategories.find( sectstr ) == -1 ) | ||
308 | { | ||
309 | availableCategories.append( section ); | ||
310 | availableCategories.append( "#" ); | ||
311 | } | ||
291 | } | 312 | } |
diff --git a/noncore/settings/aqpkg/datamgr.h b/noncore/settings/aqpkg/datamgr.h index 7fa42c1..32a1e57 100644 --- a/noncore/settings/aqpkg/datamgr.h +++ b/noncore/settings/aqpkg/datamgr.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | datamgr.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Thu Aug 29 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifndef DATAMGR_H | 30 | #ifndef DATAMGR_H |
19 | #define DATAMGR_H | 31 | #define DATAMGR_H |
20 | 32 | ||
21 | #include <map> | 33 | #include <map> |
22 | using namespace std; | 34 | using namespace std; |
23 | 35 | ||
24 | #include <qlist.h> | 36 | #include <qlist.h> |
25 | #include <qobject.h> | 37 | #include <qobject.h> |
26 | #include <qstring.h> | 38 | #include <qstring.h> |
27 | 39 | ||
28 | #include "server.h" | 40 | #include "server.h" |
diff --git a/noncore/settings/aqpkg/destination.cpp b/noncore/settings/aqpkg/destination.cpp index 45bdb48..6423894 100644 --- a/noncore/settings/aqpkg/destination.cpp +++ b/noncore/settings/aqpkg/destination.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | destination.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #include "destination.h" | 30 | #include "destination.h" |
19 | #include "global.h" | 31 | #include "global.h" |
20 | 32 | ||
21 | Destination::Destination( const char *name, const char *path ) | 33 | Destination::Destination( const char *name, const char *path ) |
22 | { | 34 | { |
23 | destName = name; | 35 | destName = name; |
24 | destPath = path; | 36 | destPath = path; |
25 | linkToRootDir = true; | 37 | linkToRootDir = true; |
26 | } | 38 | } |
27 | 39 | ||
28 | Destination::~Destination() | 40 | Destination::~Destination() |
diff --git a/noncore/settings/aqpkg/destination.h b/noncore/settings/aqpkg/destination.h index 646fae9..4a7f706 100644 --- a/noncore/settings/aqpkg/destination.h +++ b/noncore/settings/aqpkg/destination.h | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | destination.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
29 | |||
17 | #ifndef DESTINATION_H | 30 | #ifndef DESTINATION_H |
18 | #define DESTINATION_H | 31 | #define DESTINATION_H |
19 | 32 | ||
20 | #include <qstring.h> | 33 | #include <qstring.h> |
21 | 34 | ||
22 | class Destination | 35 | class Destination |
23 | { | 36 | { |
24 | public: | 37 | public: |
25 | Destination() {} | 38 | Destination() {} |
26 | Destination( const char *name, const char *path ); | 39 | Destination( const char *name, const char *path ); |
27 | ~Destination(); | 40 | ~Destination(); |
28 | 41 | ||
diff --git a/noncore/settings/aqpkg/global.h b/noncore/settings/aqpkg/global.h index 920b090..4fdd51d 100644 --- a/noncore/settings/aqpkg/global.h +++ b/noncore/settings/aqpkg/global.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | global.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifndef __GLOBAL_H | 30 | #ifndef __GLOBAL_H |
19 | #define __GLOBAL_H | 31 | #define __GLOBAL_H |
20 | 32 | ||
21 | #define VERSION_TEXT "AQPkg Version 1.11" | 33 | #define VERSION_TEXT "AQPkg Version 1.11" |
22 | 34 | ||
23 | // Uncomment the below line to run on a Linux box rather than a Zaurus | 35 | // Uncomment the below line to run on a Linux box rather than a Zaurus |
24 | // box this allows you to change where root is, and where to load config files from | 36 | // box this allows you to change where root is, and where to load config files from |
25 | // #define X86 | 37 | // #define X86 |
26 | 38 | ||
27 | // Sets up location of ipkg.conf and root directory | 39 | // Sets up location of ipkg.conf and root directory |
28 | #ifdef QWS | 40 | #ifdef QWS |
diff --git a/noncore/settings/aqpkg/inputdlg.cpp b/noncore/settings/aqpkg/inputdlg.cpp index 724a891..06e934c 100644 --- a/noncore/settings/aqpkg/inputdlg.cpp +++ b/noncore/settings/aqpkg/inputdlg.cpp | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | inputdlg.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
29 | |||
17 | #include <qlayout.h> | 30 | #include <qlayout.h> |
18 | #include <qlabel.h> | 31 | #include <qlabel.h> |
19 | #include <qlineedit.h> | 32 | #include <qlineedit.h> |
20 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
21 | #include <qspinbox.h> | 34 | #include <qspinbox.h> |
22 | #include <qcombobox.h> | 35 | #include <qcombobox.h> |
23 | #include <qwidgetstack.h> | 36 | #include <qwidgetstack.h> |
24 | #include <qvalidator.h> | 37 | #include <qvalidator.h> |
25 | #include <qapplication.h> | 38 | #include <qapplication.h> |
26 | 39 | ||
27 | #include "inputdlg.h" | 40 | #include "inputdlg.h" |
28 | #include "global.h" | 41 | #include "global.h" |
diff --git a/noncore/settings/aqpkg/inputdlg.h b/noncore/settings/aqpkg/inputdlg.h index 1e0c5bc..260201e 100644 --- a/noncore/settings/aqpkg/inputdlg.h +++ b/noncore/settings/aqpkg/inputdlg.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | inputdlg.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifndef INPUTDIALOG_H | 30 | #ifndef INPUTDIALOG_H |
19 | #define INPUTDIALOG_H | 31 | #define INPUTDIALOG_H |
20 | 32 | ||
21 | #include <qdialog.h> | 33 | #include <qdialog.h> |
22 | #include <qstring.h> | 34 | #include <qstring.h> |
23 | #include <qlineedit.h> | 35 | #include <qlineedit.h> |
24 | #include <qpushbutton.h> | 36 | #include <qpushbutton.h> |
25 | 37 | ||
26 | class InputDialog : public QDialog | 38 | class InputDialog : public QDialog |
27 | { | 39 | { |
28 | Q_OBJECT | 40 | Q_OBJECT |
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index 896e370..17f7b08 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | installdlgimpl.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <stdio.h> | 30 | #include <stdio.h> |
19 | 31 | ||
20 | #include <opie/ofiledialog.h> | 32 | #include <opie/ofiledialog.h> |
21 | 33 | ||
22 | #ifdef QWS | 34 | #ifdef QWS |
23 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
24 | #include <qpe/fileselector.h> | 36 | #include <qpe/fileselector.h> |
25 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
27 | #include <qpe/storage.h> | 39 | #include <qpe/storage.h> |
28 | #endif | 40 | #endif |
@@ -454,13 +466,13 @@ void InstallDlgImpl :: ipkgFinished() | |||
454 | else | 466 | else |
455 | { | 467 | { |
456 | btnOptions->setEnabled( true ); | 468 | btnOptions->setEnabled( true ); |
457 | btnInstall->setText( tr( "Close" ) ); | 469 | btnInstall->setText( tr( "Close" ) ); |
458 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); | 470 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); |
459 | 471 | ||
460 | btnOptions->setText( tr( "Save output" ) ); | 472 | btnOptions->setText( tr( "Save output" ) ); |
461 | btnOptions->setIconSet( Resource::loadPixmap( "save" ) ); | 473 | btnOptions->setIconSet( Resource::loadPixmap( "save" ) ); |
462 | 474 | ||
463 | if ( destination && destination->currentText() != 0 && destination->currentText() != "" ) | 475 | if ( destination && destination->currentText() != 0 && destination->currentText() != "" ) |
464 | displayAvailableSpace( destination->currentText() ); | 476 | displayAvailableSpace( destination->currentText() ); |
465 | } | 477 | } |
466 | } \ No newline at end of file | 478 | } |
diff --git a/noncore/settings/aqpkg/installdlgimpl.h b/noncore/settings/aqpkg/installdlgimpl.h index 9a7dbff..894465a 100644 --- a/noncore/settings/aqpkg/installdlgimpl.h +++ b/noncore/settings/aqpkg/installdlgimpl.h | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | installdlgimpl.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
8 | 29 | ||
9 | /*************************************************************************** | ||
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | #ifndef INSTALLDLGIMPL_H | 30 | #ifndef INSTALLDLGIMPL_H |
18 | #define INSTALLDLGIMPL_H | 31 | #define INSTALLDLGIMPL_H |
19 | 32 | ||
20 | using namespace std; | 33 | using namespace std; |
21 | 34 | ||
22 | #include <qlist.h> | 35 | #include <qlist.h> |
23 | #include <qstring.h> | 36 | #include <qstring.h> |
24 | #include <qwidget.h> | 37 | #include <qwidget.h> |
25 | 38 | ||
26 | class QComboBox; | 39 | class QComboBox; |
27 | class QLabel; | 40 | class QLabel; |
28 | class QMultiLineEdit; | 41 | class QMultiLineEdit; |
diff --git a/noncore/settings/aqpkg/instoptionsimpl.cpp b/noncore/settings/aqpkg/instoptionsimpl.cpp index 72d794f..9d52013 100644 --- a/noncore/settings/aqpkg/instoptionsimpl.cpp +++ b/noncore/settings/aqpkg/instoptionsimpl.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | instoptionsimpl.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifdef QWS | 30 | #ifdef QWS |
19 | #include <qpe/config.h> | 31 | #include <qpe/config.h> |
20 | #endif | 32 | #endif |
21 | 33 | ||
22 | #include <qcheckbox.h> | 34 | #include <qcheckbox.h> |
23 | #include <qcombobox.h> | 35 | #include <qcombobox.h> |
24 | #include <qgroupbox.h> | 36 | #include <qgroupbox.h> |
25 | #include <qlabel.h> | 37 | #include <qlabel.h> |
26 | #include <qlayout.h> | 38 | #include <qlayout.h> |
27 | 39 | ||
28 | #include "global.h" | 40 | #include "global.h" |
diff --git a/noncore/settings/aqpkg/instoptionsimpl.h b/noncore/settings/aqpkg/instoptionsimpl.h index 1312afd..e68a3dc 100644 --- a/noncore/settings/aqpkg/instoptionsimpl.h +++ b/noncore/settings/aqpkg/instoptionsimpl.h | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | installoptionsimpl.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
8 | 29 | ||
9 | /*************************************************************************** | ||
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | #ifndef INSTALLOPTIONSIMPL_H | 30 | #ifndef INSTALLOPTIONSIMPL_H |
18 | #define INSTALLOPTIONSIMPL_H | 31 | #define INSTALLOPTIONSIMPL_H |
19 | 32 | ||
20 | #include <qdialog.h> | 33 | #include <qdialog.h> |
21 | 34 | ||
22 | class QCheckBox; | 35 | class QCheckBox; |
23 | class QComboBox; | 36 | class QComboBox; |
24 | 37 | ||
25 | class InstallOptionsDlgImpl : public QDialog | 38 | class InstallOptionsDlgImpl : public QDialog |
26 | { | 39 | { |
27 | Q_OBJECT | 40 | Q_OBJECT |
28 | public: | 41 | public: |
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 34999ad..08ae386 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | ipkg.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sat Aug 31 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <fstream> | 30 | #include <fstream> |
19 | #include <iostream> | 31 | #include <iostream> |
20 | #include <vector> | 32 | #include <vector> |
21 | using namespace std; | 33 | using namespace std; |
22 | 34 | ||
23 | #include <stdio.h> | 35 | #include <stdio.h> |
24 | #include <unistd.h> | 36 | #include <unistd.h> |
25 | 37 | ||
26 | #ifdef QWS | 38 | #ifdef QWS |
27 | #include <qpe/qpeapplication.h> | 39 | #include <qpe/qpeapplication.h> |
28 | #else | 40 | #else |
diff --git a/noncore/settings/aqpkg/ipkg.h b/noncore/settings/aqpkg/ipkg.h index a0d38e3..8f254f9 100644 --- a/noncore/settings/aqpkg/ipkg.h +++ b/noncore/settings/aqpkg/ipkg.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | ipkg.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sat Aug 31 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #ifndef IPKG_H | 30 | #ifndef IPKG_H |
19 | #define IPKG_H | 31 | #define IPKG_H |
20 | 32 | ||
21 | 33 | ||
22 | /** | 34 | /** |
23 | *@author Andy Qua | 35 | *@author Andy Qua |
24 | */ | 36 | */ |
25 | 37 | ||
26 | #include <qobject.h> | 38 | #include <qobject.h> |
27 | #include <qstring.h> | 39 | #include <qstring.h> |
28 | #include <qstringlist.h> | 40 | #include <qstringlist.h> |
diff --git a/noncore/settings/aqpkg/letterpushbutton.cpp b/noncore/settings/aqpkg/letterpushbutton.cpp index ca96c6c..c8b43e9 100644 --- a/noncore/settings/aqpkg/letterpushbutton.cpp +++ b/noncore/settings/aqpkg/letterpushbutton.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | letterpushbutton.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Wed Oct 16 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #include "letterpushbutton.h" | 30 | #include "letterpushbutton.h" |
19 | 31 | ||
20 | LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name ) | 32 | LetterPushButton :: LetterPushButton( const QString &text, QWidget *parent, const char *name ) |
21 | : QPushButton( text, parent, name ) | 33 | : QPushButton( text, parent, name ) |
22 | { | 34 | { |
23 | connect( this, SIGNAL(released()), this, SLOT(released_emmitor()) ); | 35 | connect( this, SIGNAL(released()), this, SLOT(released_emmitor()) ); |
24 | } | 36 | } |
25 | 37 | ||
26 | LetterPushButton :: ~LetterPushButton() | 38 | LetterPushButton :: ~LetterPushButton() |
27 | { | 39 | { |
28 | } | 40 | } |
diff --git a/noncore/settings/aqpkg/letterpushbutton.h b/noncore/settings/aqpkg/letterpushbutton.h index e45b89d..452d68e 100644 --- a/noncore/settings/aqpkg/letterpushbutton.h +++ b/noncore/settings/aqpkg/letterpushbutton.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | letterpushbutton.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Wed Oct 16 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifndef LETTERPUSHBUTTON_H | 30 | #ifndef LETTERPUSHBUTTON_H |
19 | #define LETTERPUSHBUTTON_H | 31 | #define LETTERPUSHBUTTON_H |
20 | 32 | ||
21 | #include <qpushbutton.h> | 33 | #include <qpushbutton.h> |
22 | 34 | ||
23 | /** | 35 | /** |
24 | *@author Andy Qua | 36 | *@author Andy Qua |
25 | */ | 37 | */ |
26 | 38 | ||
27 | class LetterPushButton : public QPushButton | 39 | class LetterPushButton : public QPushButton |
28 | { | 40 | { |
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp index 15ef9d6..066d79f 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -1,62 +1,71 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | main.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifdef QWS | 30 | #ifdef QWS |
19 | #include <qpe/qpeapplication.h> | 31 | #include <qpe/qpeapplication.h> |
20 | #include <qpe/qcopenvelope_qws.h> | 32 | #include <qpe/qcopenvelope_qws.h> |
21 | #else | 33 | #else |
22 | #include <qapplication.h> | 34 | #include <qapplication.h> |
23 | #endif | 35 | #endif |
24 | 36 | ||
25 | #include <qobjectdefs.h> | 37 | #include <qobjectdefs.h> |
26 | 38 | ||
27 | #include "mainwin.h" | 39 | #include "mainwin.h" |
28 | #include "server.h" | 40 | #include "server.h" |
29 | 41 | ||
30 | #include "global.h" | 42 | #include "global.h" |
31 | 43 | ||
32 | 44 | ||
33 | int main(int argc, char *argv[]) | 45 | int main(int argc, char *argv[]) |
34 | { | 46 | { |
35 | // cout << "Root dir = " << ROOT << endl; | ||
36 | #ifdef QWS | 47 | #ifdef QWS |
37 | QPEApplication a( argc, argv ); | 48 | QPEApplication a( argc, argv ); |
38 | #else | 49 | #else |
39 | QApplication a( argc, argv ); | 50 | QApplication a( argc, argv ); |
40 | #endif | 51 | #endif |
41 | 52 | ||
42 | #ifdef QWS | 53 | #ifdef QWS |
43 | // Disable suspend mode | 54 | // Disable suspend mode |
44 | // cout << "Disabling suspend mode" << endl; | ||
45 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; | 55 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; |
46 | #endif | 56 | #endif |
47 | 57 | ||
48 | MainWindow *win = new MainWindow(); | 58 | MainWindow *win = new MainWindow(); |
49 | a.setMainWidget(win); | 59 | a.setMainWidget(win); |
50 | win->showMaximized(); | 60 | win->showMaximized(); |
51 | 61 | ||
52 | a.exec(); | 62 | a.exec(); |
53 | 63 | ||
54 | #ifdef QWS | 64 | #ifdef QWS |
55 | // Reenable suspend mode | 65 | // Reenable suspend mode |
56 | // cout << "Enabling suspend mode" << endl; | ||
57 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 66 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
58 | #endif | 67 | #endif |
59 | #ifdef _DEBUG | 68 | #ifdef _DEBUG |
60 | DumpUnfreed(); | 69 | DumpUnfreed(); |
61 | #endif | 70 | #endif |
62 | } | 71 | } |
diff --git a/noncore/settings/aqpkg/mainwin.cpp b/noncore/settings/aqpkg/mainwin.cpp index f0e8e48..0102292 100644 --- a/noncore/settings/aqpkg/mainwin.cpp +++ b/noncore/settings/aqpkg/mainwin.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | mainwin.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <linux/limits.h> | 30 | #include <linux/limits.h> |
19 | #include <unistd.h> | 31 | #include <unistd.h> |
20 | 32 | ||
21 | #include <qpe/qcopenvelope_qws.h> | 33 | #include <qpe/qcopenvelope_qws.h> |
22 | #include <qmenubar.h> | 34 | #include <qmenubar.h> |
23 | #include <qpe/qpeapplication.h> | 35 | #include <qpe/qpeapplication.h> |
24 | #include <qtoolbar.h> | 36 | #include <qtoolbar.h> |
25 | #include <qpe/config.h> | 37 | #include <qpe/config.h> |
26 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
27 | 39 | ||
28 | #include <qaction.h> | 40 | #include <qaction.h> |
@@ -293,25 +305,24 @@ void MainWindow :: init() | |||
293 | showUpgradedPkgs = false; | 305 | showUpgradedPkgs = false; |
294 | categoryFilterEnabled = false; | 306 | categoryFilterEnabled = false; |
295 | 307 | ||
296 | updateData(); | 308 | updateData(); |
297 | 309 | ||
298 | stack->raiseWidget( networkPkgWindow ); | 310 | stack->raiseWidget( networkPkgWindow ); |
299 | } | 311 | } |
300 | 312 | ||
301 | void MainWindow :: setDocument( const QString &doc ) | 313 | void MainWindow :: setDocument( const QString &doc ) |
302 | { | 314 | { |
303 | // Remove path from package | 315 | // Remove path from package |
304 | QString package = Utils::getPackageNameFromIpkFilename( doc ); | 316 | QString package = Utils::getPackageNameFromIpkFilename( doc ); |
305 | // std::cout << "Selecting package " << package << std::endl; | ||
306 | 317 | ||
307 | // First select local server | 318 | // First select local server |
308 | for ( int i = 0 ; i < serversList->count() ; ++i ) | 319 | for ( int i = 0 ; i < serversList->count() ; ++i ) |
309 | { | 320 | { |
310 | if ( serversList->text( i ) == LOCAL_IPKGS ) | 321 | if ( serversList->text( i ) == LOCAL_IPKGS ) |
311 | { | 322 | { |
312 | serversList->setCurrentItem( i ); | 323 | serversList->setCurrentItem( i ); |
313 | break; | 324 | break; |
314 | } | 325 | } |
315 | } | 326 | } |
316 | serverSelected( 0 ); | 327 | serverSelected( 0 ); |
317 | 328 | ||
@@ -545,28 +556,26 @@ void MainWindow :: updateData() | |||
545 | 556 | ||
546 | QListIterator<Server> it( mgr->getServerList() ); | 557 | QListIterator<Server> it( mgr->getServerList() ); |
547 | Server *server; | 558 | Server *server; |
548 | 559 | ||
549 | for ( ; it.current(); ++it, ++i ) | 560 | for ( ; it.current(); ++it, ++i ) |
550 | { | 561 | { |
551 | server = it.current(); | 562 | server = it.current(); |
552 | serverName = server->getServerName(); | 563 | serverName = server->getServerName(); |
553 | m_status->setText( tr( "Building server list:\n\t%1" ).arg( serverName ) ); | 564 | m_status->setText( tr( "Building server list:\n\t%1" ).arg( serverName ) ); |
554 | m_progress->setProgress( i ); | 565 | m_progress->setProgress( i ); |
555 | qApp->processEvents(); | 566 | qApp->processEvents(); |
556 | 567 | ||
557 | // cout << "Adding " << it->getServerName() << " to combobox" << endl; | ||
558 | if ( !server->isServerActive() ) | 568 | if ( !server->isServerActive() ) |
559 | { | 569 | { |
560 | // cout << serverName << " is not active" << endl; | ||
561 | i--; | 570 | i--; |
562 | continue; | 571 | continue; |
563 | } | 572 | } |
564 | 573 | ||
565 | serversList->insertItem( serverName ); | 574 | serversList->insertItem( serverName ); |
566 | if ( serverName == currentlySelectedServer ) | 575 | if ( serverName == currentlySelectedServer ) |
567 | activeItem = i; | 576 | activeItem = i; |
568 | } | 577 | } |
569 | 578 | ||
570 | // set selected server to be active server | 579 | // set selected server to be active server |
571 | if ( activeItem != -1 ) | 580 | if ( activeItem != -1 ) |
572 | serversList->setCurrentItem( activeItem ); | 581 | serversList->setCurrentItem( activeItem ); |
@@ -704,41 +713,35 @@ void MainWindow :: serverSelected( int, bool raiseProgress ) | |||
704 | 713 | ||
705 | // Display this widget once everything is done | 714 | // Display this widget once everything is done |
706 | if ( doProgress && raiseProgress ) | 715 | if ( doProgress && raiseProgress ) |
707 | { | 716 | { |
708 | stack->raiseWidget( networkPkgWindow ); | 717 | stack->raiseWidget( networkPkgWindow ); |
709 | } | 718 | } |
710 | } | 719 | } |
711 | 720 | ||
712 | void MainWindow :: searchForPackage( const QString &text ) | 721 | void MainWindow :: searchForPackage( const QString &text ) |
713 | { | 722 | { |
714 | if ( !text.isEmpty() ) | 723 | if ( !text.isEmpty() ) |
715 | { | 724 | { |
716 | // cout << "searching for " << text << endl; | ||
717 | // look through package list for text startng at current position | 725 | // look through package list for text startng at current position |
718 | // vector<InstallData> workingPackages; | ||
719 | QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); | 726 | QCheckListItem *start = (QCheckListItem *)packagesList->currentItem(); |
720 | // if ( start != 0 ) | ||
721 | // start = (QCheckListItem *)start->nextSibling(); | ||
722 | 727 | ||
723 | if ( start == 0 ) | 728 | if ( start == 0 ) |
724 | start = (QCheckListItem *)packagesList->firstChild(); | 729 | start = (QCheckListItem *)packagesList->firstChild(); |
725 | 730 | ||
726 | for ( QCheckListItem *item = start; item != 0 ; | 731 | for ( QCheckListItem *item = start; item != 0 ; |
727 | item = (QCheckListItem *)item->nextSibling() ) | 732 | item = (QCheckListItem *)item->nextSibling() ) |
728 | { | 733 | { |
729 | // cout << "checking " << item->text().lower() << endl; | ||
730 | if ( item->text().lower().find( text ) != -1 ) | 734 | if ( item->text().lower().find( text ) != -1 ) |
731 | { | 735 | { |
732 | // cout << "matched " << item->text() << endl; | ||
733 | packagesList->ensureItemVisible( item ); | 736 | packagesList->ensureItemVisible( item ); |
734 | packagesList->setCurrentItem( item ); | 737 | packagesList->setCurrentItem( item ); |
735 | break; | 738 | break; |
736 | } | 739 | } |
737 | } | 740 | } |
738 | } | 741 | } |
739 | } | 742 | } |
740 | 743 | ||
741 | void MainWindow :: updateServer() | 744 | void MainWindow :: updateServer() |
742 | { | 745 | { |
743 | QString serverName = serversList->currentText(); | 746 | QString serverName = serversList->currentText(); |
744 | 747 | ||
@@ -1004,26 +1007,24 @@ InstallData *MainWindow :: dealWithItem( QCheckListItem *item ) | |||
1004 | else | 1007 | else |
1005 | { | 1008 | { |
1006 | InstallData *newitem = new InstallData(); | 1009 | InstallData *newitem = new InstallData(); |
1007 | newitem->option = "D"; | 1010 | newitem->option = "D"; |
1008 | if ( !p->isPackageStoredLocally() ) | 1011 | if ( !p->isPackageStoredLocally() ) |
1009 | newitem->packageName = p->getInstalledPackageName(); | 1012 | newitem->packageName = p->getInstalledPackageName(); |
1010 | else | 1013 | else |
1011 | newitem->packageName = name; | 1014 | newitem->packageName = name; |
1012 | 1015 | ||
1013 | if ( p->getInstalledTo() ) | 1016 | if ( p->getInstalledTo() ) |
1014 | { | 1017 | { |
1015 | newitem->destination = p->getInstalledTo(); | 1018 | newitem->destination = p->getInstalledTo(); |
1016 | // cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl; | ||
1017 | // cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl; | ||
1018 | } | 1019 | } |
1019 | else | 1020 | else |
1020 | { | 1021 | { |
1021 | newitem->destination = p->getLocalPackage()->getInstalledTo(); | 1022 | newitem->destination = p->getLocalPackage()->getInstalledTo(); |
1022 | } | 1023 | } |
1023 | 1024 | ||
1024 | // Now see if version is newer or not | 1025 | // Now see if version is newer or not |
1025 | int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); | 1026 | int val = compareVersions( p->getInstalledVersion(), p->getVersion() ); |
1026 | 1027 | ||
1027 | // If the version requested is older and user selected a local ipk file, then reinstall the file | 1028 | // If the version requested is older and user selected a local ipk file, then reinstall the file |
1028 | if ( p->isPackageStoredLocally() && val == -1 ) | 1029 | if ( p->isPackageStoredLocally() && val == -1 ) |
1029 | val = 0; | 1030 | val = 0; |
diff --git a/noncore/settings/aqpkg/mainwin.h b/noncore/settings/aqpkg/mainwin.h index f95c332..9f48321 100644 --- a/noncore/settings/aqpkg/mainwin.h +++ b/noncore/settings/aqpkg/mainwin.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | mainwin.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #ifndef MAINWIN_H | 30 | #ifndef MAINWIN_H |
19 | #define MAINWIN_H | 31 | #define MAINWIN_H |
20 | 32 | ||
21 | #include <qmainwindow.h> | 33 | #include <qmainwindow.h> |
22 | #include <qpixmap.h> | 34 | #include <qpixmap.h> |
23 | 35 | ||
24 | class DataManager; | 36 | class DataManager; |
25 | class InstallData; | 37 | class InstallData; |
26 | class InstallDlgImpl; | 38 | class InstallDlgImpl; |
27 | 39 | ||
28 | class QAction; | 40 | class QAction; |
diff --git a/noncore/settings/aqpkg/mem.cpp b/noncore/settings/aqpkg/mem.cpp index 405aada..5f32a26 100644 --- a/noncore/settings/aqpkg/mem.cpp +++ b/noncore/settings/aqpkg/mem.cpp | |||
@@ -1,106 +1,110 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | mem.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | #include <stdio.h> | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | #include <fstream> | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | #include <iostream> | 19 | ..}^=.= = ; Public License for more details. |
20 | #include <list> | 20 | ++= -. .` .: |
21 | using namespace std; | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | 22 | -. .:....=;==+<; General Public License along with this file; | |
23 | #define __MEMFILE_C | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | #include "global.h" | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 25 | 59 Temple Place - Suite 330, | |
26 | #ifdef _DEBUG | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | void __cdecl *operator new( unsigned int size, const char *file, int line ) | 28 | */ |
29 | { | 29 | |
30 | void *ptr = (void *)malloc(size); | 30 | #include <stdio.h> |
31 | AddTrack((long)ptr, size, file, line); | 31 | #include <list> |
32 | return(ptr); | 32 | using namespace std; |
33 | } | 33 | |
34 | 34 | #define __MEMFILE_C | |
35 | void operator delete(void *p) | 35 | #include "global.h" |
36 | { | 36 | |
37 | RemoveTrack((long)p); | 37 | #ifdef _DEBUG |
38 | free(p); | 38 | |
39 | } | 39 | void __cdecl *operator new( unsigned int size, const char *file, int line ) |
40 | 40 | { | |
41 | #endif | 41 | void *ptr = (void *)malloc(size); |
42 | 42 | AddTrack((long)ptr, size, file, line); | |
43 | 43 | return(ptr); | |
44 | typedef struct { | 44 | } |
45 | longaddress; | 45 | |
46 | longsize; | 46 | void operator delete(void *p) |
47 | charfile[64]; | 47 | { |
48 | longline; | 48 | RemoveTrack((long)p); |
49 | } ALLOC_INFO; | 49 | free(p); |
50 | 50 | } | |
51 | typedef list<ALLOC_INFO*> AllocList; | 51 | |
52 | 52 | #endif | |
53 | AllocList allocList; | 53 | |
54 | 54 | ||
55 | 55 | typedef struct { | |
56 | 56 | longaddress; | |
57 | void AddTrack(long addr, long asize, const char *fname, long lnum) | 57 | longsize; |
58 | { | 58 | charfile[64]; |
59 | ALLOC_INFO *info; | 59 | longline; |
60 | 60 | } ALLOC_INFO; | |
61 | 61 | ||
62 | info = (ALLOC_INFO *)malloc(sizeof( ALLOC_INFO )); | 62 | typedef list<ALLOC_INFO*> AllocList; |
63 | info->address = addr; | 63 | |
64 | strncpy(info->file, fname, 63); | 64 | AllocList allocList; |
65 | info->line = lnum; | 65 | |
66 | info->size = asize; | 66 | |
67 | allocList.insert(allocList.begin(), info); | 67 | |
68 | }; | 68 | void AddTrack(long addr, long asize, const char *fname, long lnum) |
69 | 69 | { | |
70 | void RemoveTrack(long addr) | 70 | ALLOC_INFO *info; |
71 | { | 71 | |
72 | AllocList::iterator i; | 72 | |
73 | 73 | info = (ALLOC_INFO *)malloc(sizeof( ALLOC_INFO )); | |
74 | bool found = false; | 74 | info->address = addr; |
75 | for(i = allocList.begin(); i != allocList.end(); i++) | 75 | strncpy(info->file, fname, 63); |
76 | { | 76 | info->line = lnum; |
77 | if((*i)->address == addr) | 77 | info->size = asize; |
78 | { | 78 | allocList.insert(allocList.begin(), info); |
79 | allocList.remove((*i)); | 79 | }; |
80 | found = true; | 80 | |
81 | break; | 81 | void RemoveTrack(long addr) |
82 | } | 82 | { |
83 | } | 83 | AllocList::iterator i; |
84 | } | 84 | |
85 | 85 | bool found = false; | |
86 | void DumpUnfreed() | 86 | for(i = allocList.begin(); i != allocList.end(); i++) |
87 | { | 87 | { |
88 | AllocList::iterator i; | 88 | if((*i)->address == addr) |
89 | long totalSize = 0; | 89 | { |
90 | char buf[1024]; | 90 | allocList.remove((*i)); |
91 | 91 | found = true; | |
92 | 92 | break; | |
93 | // if(!allocList) | 93 | } |
94 | // return; | 94 | } |
95 | 95 | } | |
96 | for(i = allocList.begin(); i != allocList.end(); i++) { | 96 | |
97 | sprintf(buf, "%-15s: LINE %ld, ADDRESS %ld %ld unfreed", | 97 | void DumpUnfreed() |
98 | (*i)->file, (*i)->line, (*i)->address, (*i)->size); | 98 | { |
99 | cout <<buf << endl; | 99 | AllocList::iterator i; |
100 | totalSize += (*i)->size; | 100 | long totalSize = 0; |
101 | } | 101 | char buf[1024]; |
102 | sprintf(buf, "-----------------------------------------------------------\n"); | 102 | |
103 | cout <<buf << endl; | 103 | for(i = allocList.begin(); i != allocList.end(); i++) { |
104 | sprintf(buf, "Total Unfreed: %ld bytes\n", totalSize); | 104 | sprintf(buf, "%-15s: LINE %ld, ADDRESS %ld %ld unfreed", |
105 | cout <<buf << endl; | 105 | (*i)->file, (*i)->line, (*i)->address, (*i)->size); |
106 | }; | 106 | totalSize += (*i)->size; |
107 | } | ||
108 | sprintf(buf, "-----------------------------------------------------------\n"); | ||
109 | sprintf(buf, "Total Unfreed: %ld bytes\n", totalSize); | ||
110 | }; | ||
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp index 3395870..4c27c65 100644 --- a/noncore/settings/aqpkg/package.cpp +++ b/noncore/settings/aqpkg/package.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | package.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include "package.h" | 30 | #include "package.h" |
19 | #include "global.h" | 31 | #include "global.h" |
20 | 32 | ||
21 | Package::Package( QString &name ) | 33 | Package::Package( QString &name ) |
22 | { | 34 | { |
23 | packageName = name; | 35 | packageName = name; |
24 | 36 | ||
25 | version = "N/A"; | 37 | version = "N/A"; |
26 | description = "N/A"; | 38 | description = "N/A"; |
27 | packageSize = "N/A"; | 39 | packageSize = "N/A"; |
28 | section = "N/A"; | 40 | section = "N/A"; |
diff --git a/noncore/settings/aqpkg/package.h b/noncore/settings/aqpkg/package.h index 110ae91..c72f8b3 100644 --- a/noncore/settings/aqpkg/package.h +++ b/noncore/settings/aqpkg/package.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | package.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #ifndef PACKAGE_H | 30 | #ifndef PACKAGE_H |
19 | #define PACKAGE_H | 31 | #define PACKAGE_H |
20 | 32 | ||
21 | #include <stdlib.h> | 33 | #include <stdlib.h> |
22 | 34 | ||
23 | /** | 35 | /** |
24 | *@author Andy Qua | 36 | *@author Andy Qua |
25 | */ | 37 | */ |
26 | 38 | ||
27 | #include <qstring.h> | 39 | #include <qstring.h> |
28 | #include "destination.h" | 40 | #include "destination.h" |
diff --git a/noncore/settings/aqpkg/packagewin.cpp b/noncore/settings/aqpkg/packagewin.cpp index 7971ccc..9553cd1 100644 --- a/noncore/settings/aqpkg/packagewin.cpp +++ b/noncore/settings/aqpkg/packagewin.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | .=l. Dan Williams <drw@handhelds.org> | ||
5 | .>+-= | 6 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 13 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
@@ -95,25 +96,23 @@ PackageWindow::PackageWindow( Package *package, const QString &server ) | |||
95 | } | 96 | } |
96 | } | 97 | } |
97 | } | 98 | } |
98 | else | 99 | else |
99 | { | 100 | { |
100 | setCaption( tr( "Package Information" ) ); | 101 | setCaption( tr( "Package Information" ) ); |
101 | str = tr( "Package information is unavailable" ); | 102 | str = tr( "Package information is unavailable" ); |
102 | } | 103 | } |
103 | 104 | ||
104 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); | 105 | QVBoxLayout *layout = new QVBoxLayout( this, 4, 4 ); |
105 | 106 | ||
106 | QTextView *l = new QTextView( str, QString::null, this ); | 107 | QTextView *l = new QTextView( str, QString::null, this ); |
107 | //l->setTextFormat( Qt::RichText ); | ||
108 | //l->setAlignment( Qt::AlignLeft | Qt::AlignVCenter | Qt::WordBreak ); | ||
109 | layout->addWidget( l ); | 108 | layout->addWidget( l ); |
110 | 109 | ||
111 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); | 110 | QPushButton *btn = new QPushButton( Resource::loadPixmap( "enter" ), tr( "Close" ), this ); |
112 | layout->addWidget( btn ); | 111 | layout->addWidget( btn ); |
113 | connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) ); | 112 | connect( btn, SIGNAL( clicked() ), this, SLOT( close() ) ); |
114 | 113 | ||
115 | } | 114 | } |
116 | 115 | ||
117 | PackageWindow::~PackageWindow() | 116 | PackageWindow::~PackageWindow() |
118 | { | 117 | { |
119 | } | 118 | } |
diff --git a/noncore/settings/aqpkg/packagewin.h b/noncore/settings/aqpkg/packagewin.h index b4fdcad..83f3849 100644 --- a/noncore/settings/aqpkg/packagewin.h +++ b/noncore/settings/aqpkg/packagewin.h | |||
@@ -1,16 +1,17 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. | 3 | |
4 | .=l. Copyright (c) 2002 OPIE team <opie@handhelds.org?> | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | .=l. Dan Williams <drw@handhelds.org> | ||
5 | .>+-= | 6 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 13 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp index e2b8096..4693db1 100644 --- a/noncore/settings/aqpkg/server.cpp +++ b/noncore/settings/aqpkg/server.cpp | |||
@@ -1,56 +1,65 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | server.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | description : This class holds details about a server | 7 | _;:, .> :=|. This file is free software; you can |
8 | : e.g. all the packages that contained on the server | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | : the installation status | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | ***************************************************************************/ | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | 11 | - . .-<_> .<> Foundation; either version 2 of the License, | |
12 | /*************************************************************************** | 12 | ._= =} : or (at your option) any later version. |
13 | * * | 13 | .%`+i> _;_. |
14 | * This program is free software; you can redistribute it and/or modify * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * it under the terms of the GNU General Public License as published by * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | * the Free Software Foundation; either version 2 of the License, or * | 16 | : .. .:, . . . without even the implied warranty of |
17 | * (at your option) any later version. * | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | * * | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ***************************************************************************/ | 19 | ..}^=.= = ; Public License for more details. |
20 | 20 | ++= -. .` .: | |
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
21 | 29 | ||
22 | #include "server.h" | 30 | #include "server.h" |
23 | #include "datamgr.h" | 31 | #include "datamgr.h" |
24 | 32 | ||
25 | #include <qfile.h> | 33 | #include <qfile.h> |
26 | #include <qtextstream.h> | 34 | #include <qtextstream.h> |
27 | 35 | ||
28 | #ifdef QWS | 36 | #ifdef QWS |
29 | #include <qpe/global.h> | 37 | #include <qpe/global.h> |
30 | #include <qpe/applnk.h> | 38 | #include <qpe/applnk.h> |
31 | #include <qlist.h> | 39 | #include <qlist.h> |
32 | #endif | 40 | #endif |
33 | 41 | ||
34 | #include "utils.h" | 42 | #include "utils.h" |
35 | 43 | ||
36 | #include "global.h" | 44 | #include "global.h" |
37 | 45 | ||
38 | Server :: Server( const char *name, const char *url ) | 46 | Server :: Server( const char *name, const char *url ) |
39 | { | 47 | { |
40 | serverName = name; | 48 | serverName = name; |
41 | serverUrl = url; | 49 | serverUrl = url; |
42 | packageFile = IPKG_DIR; | 50 | packageFile = IPKG_DIR; |
43 | active = true; | 51 | active = true; |
44 | packageFile += "lists/" + serverName; | 52 | packageFile.append( "lists/" ); |
53 | packageFile.append( serverName ); | ||
45 | } | 54 | } |
46 | 55 | ||
47 | Server :: ~Server() | 56 | Server :: ~Server() |
48 | { | 57 | { |
49 | cleanUp(); | 58 | cleanUp(); |
50 | } | 59 | } |
51 | 60 | ||
52 | void Server :: cleanUp() | 61 | void Server :: cleanUp() |
53 | { | 62 | { |
54 | packageList.clear(); | 63 | packageList.clear(); |
55 | } | 64 | } |
56 | 65 | ||
@@ -75,25 +84,24 @@ void Server :: readStatusFile( QList<Destination> &destList ) | |||
75 | rootRead = true; | 84 | rootRead = true; |
76 | installingToRoot = true; | 85 | installingToRoot = true; |
77 | } | 86 | } |
78 | 87 | ||
79 | packageFile = path; | 88 | packageFile = path; |
80 | packageFile.append( "usr/lib/ipkg/status" ); | 89 | packageFile.append( "usr/lib/ipkg/status" ); |
81 | readPackageFile( 0, false, installingToRoot, &( *dest ) ); | 90 | readPackageFile( 0, false, installingToRoot, &( *dest ) ); |
82 | } | 91 | } |
83 | 92 | ||
84 | // Ensure that the root status file is read | 93 | // Ensure that the root status file is read |
85 | if ( !rootRead ) | 94 | if ( !rootRead ) |
86 | { | 95 | { |
87 | //cout << "Reading status file " << "/usr/lib/ipkg/status" << endl; | ||
88 | packageFile = "/usr/lib/ipkg/status"; | 96 | packageFile = "/usr/lib/ipkg/status"; |
89 | readPackageFile( 0, false, true ); | 97 | readPackageFile( 0, false, true ); |
90 | } | 98 | } |
91 | } | 99 | } |
92 | 100 | ||
93 | void Server :: readLocalIpks( Server *local ) | 101 | void Server :: readLocalIpks( Server *local ) |
94 | { | 102 | { |
95 | cleanUp(); | 103 | cleanUp(); |
96 | 104 | ||
97 | #ifdef QWS | 105 | #ifdef QWS |
98 | // First, get any local IPKGs in the documents area | 106 | // First, get any local IPKGs in the documents area |
99 | // Only applicable to Qtopie/Opie | 107 | // Only applicable to Qtopie/Opie |
diff --git a/noncore/settings/aqpkg/server.h b/noncore/settings/aqpkg/server.h index 02746e0..f524ed6 100644 --- a/noncore/settings/aqpkg/server.h +++ b/noncore/settings/aqpkg/server.h | |||
@@ -1,28 +1,41 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | server.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
8 | 29 | ||
9 | /*************************************************************************** | ||
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | #ifndef SERVER_H | 30 | #ifndef SERVER_H |
18 | #define SERVER_H | 31 | #define SERVER_H |
19 | 32 | ||
20 | #include <qlist.h> | 33 | #include <qlist.h> |
21 | #include <qstring.h> | 34 | #include <qstring.h> |
22 | 35 | ||
23 | using namespace std; | 36 | using namespace std; |
24 | 37 | ||
25 | #include "package.h" | 38 | #include "package.h" |
26 | #include "destination.h" | 39 | #include "destination.h" |
27 | 40 | ||
28 | class Server | 41 | class Server |
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index e2afada..4887ceb 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | settingsimpl.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Thu Aug 29 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <fstream> | 30 | #include <fstream> |
19 | #include <algorithm> | 31 | #include <algorithm> |
20 | using namespace std; | 32 | using namespace std; |
21 | 33 | ||
22 | #include <qcheckbox.h> | 34 | #include <qcheckbox.h> |
23 | #include <qgroupbox.h> | 35 | #include <qgroupbox.h> |
24 | #include <qlabel.h> | 36 | #include <qlabel.h> |
25 | #include <qlayout.h> | 37 | #include <qlayout.h> |
26 | #include <qlineedit.h> | 38 | #include <qlineedit.h> |
27 | #include <qlistbox.h> | 39 | #include <qlistbox.h> |
28 | #include <qpushbutton.h> | 40 | #include <qpushbutton.h> |
diff --git a/noncore/settings/aqpkg/settingsimpl.h b/noncore/settings/aqpkg/settingsimpl.h index 9ffc259..1530ce1 100644 --- a/noncore/settings/aqpkg/settingsimpl.h +++ b/noncore/settings/aqpkg/settingsimpl.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | settingsimpl.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Thu Aug 29 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #include "datamgr.h" | 30 | #include "datamgr.h" |
19 | 31 | ||
20 | #include <qdialog.h> | 32 | #include <qdialog.h> |
21 | 33 | ||
22 | class QCheckBox; | 34 | class QCheckBox; |
23 | class QLineEdit; | 35 | class QLineEdit; |
24 | class QListBox; | 36 | class QListBox; |
25 | 37 | ||
26 | class SettingsImpl : public QDialog | 38 | class SettingsImpl : public QDialog |
27 | { | 39 | { |
28 | Q_OBJECT | 40 | Q_OBJECT |
diff --git a/noncore/settings/aqpkg/utils.cpp b/noncore/settings/aqpkg/utils.cpp index 446ce39..00607dd 100644 --- a/noncore/settings/aqpkg/utils.cpp +++ b/noncore/settings/aqpkg/utils.cpp | |||
@@ -1,45 +1,55 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | utils.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sat Sep 7 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #include <stdio.h> | 30 | #include <stdio.h> |
19 | #include <sys/vfs.h> | 31 | #include <sys/vfs.h> |
20 | //#include <mntent.h> | ||
21 | 32 | ||
22 | #include "utils.h" | 33 | #include "utils.h" |
23 | #include "global.h" | 34 | #include "global.h" |
24 | 35 | ||
25 | Utils :: Utils() | 36 | Utils :: Utils() |
26 | { | 37 | { |
27 | } | 38 | } |
28 | 39 | ||
29 | Utils :: ~Utils() | 40 | Utils :: ~Utils() |
30 | { | 41 | { |
31 | } | 42 | } |
32 | 43 | ||
33 | |||
34 | QString Utils :: getPathfromIpkFilename( const QString &file ) | 44 | QString Utils :: getPathfromIpkFilename( const QString &file ) |
35 | { | 45 | { |
36 | int p = file.findRev( "/" ); | 46 | int p = file.findRev( "/" ); |
37 | QString path = ""; | 47 | QString path = ""; |
38 | if ( p != -1 ) | 48 | if ( p != -1 ) |
39 | path = file.left( p ); | 49 | path = file.left( p ); |
40 | 50 | ||
41 | return path; | 51 | return path; |
42 | 52 | ||
43 | } | 53 | } |
44 | 54 | ||
45 | QString Utils :: getFilenameFromIpkFilename( const QString &file ) | 55 | QString Utils :: getFilenameFromIpkFilename( const QString &file ) |
@@ -72,25 +82,24 @@ QString Utils :: getPackageVersionFromIpkFilename( const QString &file ) | |||
72 | name = name.mid( p + 1 ); | 82 | name = name.mid( p + 1 ); |
73 | p = name.find( "_" ) + 1; | 83 | p = name.find( "_" ) + 1; |
74 | int p2 = name.find( "_", p ); | 84 | int p2 = name.find( "_", p ); |
75 | QString version = name.mid( p, p2 - p ); | 85 | QString version = name.mid( p, p2 - p ); |
76 | return version; | 86 | return version; |
77 | } | 87 | } |
78 | 88 | ||
79 | 89 | ||
80 | bool Utils :: getStorageSpace( const char *path, long *blockSize, long *totalBlocks, long *availBlocks ) | 90 | bool Utils :: getStorageSpace( const char *path, long *blockSize, long *totalBlocks, long *availBlocks ) |
81 | { | 91 | { |
82 | bool ret = false; | 92 | bool ret = false; |
83 | 93 | ||
84 | // qDebug( "Reading from path %s", path ); | ||
85 | struct statfs fs; | 94 | struct statfs fs; |
86 | if ( !statfs( path, &fs ) ) | 95 | if ( !statfs( path, &fs ) ) |
87 | { | 96 | { |
88 | *blockSize = fs.f_bsize; | 97 | *blockSize = fs.f_bsize; |
89 | *totalBlocks = fs.f_blocks; | 98 | *totalBlocks = fs.f_blocks; |
90 | *availBlocks = fs.f_bavail; | 99 | *availBlocks = fs.f_bavail; |
91 | ret = true; | 100 | ret = true; |
92 | } | 101 | } |
93 | 102 | ||
94 | return ret; | 103 | return ret; |
95 | } | 104 | } |
96 | 105 | ||
diff --git a/noncore/settings/aqpkg/utils.h b/noncore/settings/aqpkg/utils.h index c572f7b..6e5116e 100644 --- a/noncore/settings/aqpkg/utils.h +++ b/noncore/settings/aqpkg/utils.h | |||
@@ -1,28 +1,40 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | utils.h - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Sat Sep 7 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | ||
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
10 | .="- .-=="i, .._ License as published by the Free Software | ||
11 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
12 | ._= =} : or (at your option) any later version. | ||
13 | .%`+i> _;_. | ||
14 | .i_,=:_. -<s. This file is distributed in the hope that | ||
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
8 | 27 | ||
9 | /*************************************************************************** | 28 | */ |
10 | * * | ||
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 * | ||
13 | * the Free Software Foundation; either version 2 of the License, or * | ||
14 | * (at your option) any later version. * | ||
15 | * * | ||
16 | ***************************************************************************/ | ||
17 | 29 | ||
18 | #ifndef UTILS_H | 30 | #ifndef UTILS_H |
19 | #define UTILS_H | 31 | #define UTILS_H |
20 | 32 | ||
21 | #include <qstring.h> | 33 | #include <qstring.h> |
22 | 34 | ||
23 | /** | 35 | /** |
24 | *@author Andy Qua | 36 | *@author Andy Qua |
25 | */ | 37 | */ |
26 | 38 | ||
27 | class Utils { | 39 | class Utils { |
28 | public: | 40 | public: |