-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 3 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.h | 8 | ||||
-rw-r--r-- | noncore/settings/aqpkg/main.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 4 |
5 files changed, 14 insertions, 9 deletions
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp index d2babb4..da21cef 100644 --- a/noncore/settings/aqpkg/installdlgimpl.cpp +++ b/noncore/settings/aqpkg/installdlgimpl.cpp | |||
@@ -36,48 +36,49 @@ | |||
36 | #include <qpe/fileselector.h> | 36 | #include <qpe/fileselector.h> |
37 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
38 | #include <qpe/resource.h> | 38 | #include <qpe/resource.h> |
39 | #include <qpe/storage.h> | 39 | #include <qpe/storage.h> |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
43 | #include <qcombobox.h> | 43 | #include <qcombobox.h> |
44 | #include <qdialog.h> | 44 | #include <qdialog.h> |
45 | #include <qfileinfo.h> | 45 | #include <qfileinfo.h> |
46 | #include <qgroupbox.h> | 46 | #include <qgroupbox.h> |
47 | #include <qmultilineedit.h> | 47 | #include <qmultilineedit.h> |
48 | #include <qlabel.h> | 48 | #include <qlabel.h> |
49 | #include <qlayout.h> | 49 | #include <qlayout.h> |
50 | #include <qpushbutton.h> | 50 | #include <qpushbutton.h> |
51 | 51 | ||
52 | #include "datamgr.h" | 52 | #include "datamgr.h" |
53 | #include "destination.h" | 53 | #include "destination.h" |
54 | #include "instoptionsimpl.h" | 54 | #include "instoptionsimpl.h" |
55 | #include "installdlgimpl.h" | 55 | #include "installdlgimpl.h" |
56 | #include "ipkg.h" | 56 | #include "ipkg.h" |
57 | #include "utils.h" | 57 | #include "utils.h" |
58 | #include "global.h" | 58 | #include "global.h" |
59 | 59 | ||
60 | using namespace Opie::Ui; | ||
60 | enum { | 61 | enum { |
61 | MAXLINES = 100, | 62 | MAXLINES = 100, |
62 | }; | 63 | }; |
63 | 64 | ||
64 | InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManager *dataManager, const char *title ) | 65 | InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManager *dataManager, const char *title ) |
65 | : QWidget( 0, 0, 0 ) | 66 | : QWidget( 0, 0, 0 ) |
66 | { | 67 | { |
67 | setCaption( title ); | 68 | setCaption( title ); |
68 | init( TRUE ); | 69 | init( TRUE ); |
69 | 70 | ||
70 | pIpkg = 0; | 71 | pIpkg = 0; |
71 | upgradePackages = false; | 72 | upgradePackages = false; |
72 | dataMgr = dataManager; | 73 | dataMgr = dataManager; |
73 | 74 | ||
74 | QString defaultDest = "root"; | 75 | QString defaultDest = "root"; |
75 | #ifdef QWS | 76 | #ifdef QWS |
76 | Config cfg( "aqpkg" ); | 77 | Config cfg( "aqpkg" ); |
77 | cfg.setGroup( "settings" ); | 78 | cfg.setGroup( "settings" ); |
78 | defaultDest = cfg.readEntry( "dest", "root" ); | 79 | defaultDest = cfg.readEntry( "dest", "root" ); |
79 | 80 | ||
80 | // Grab flags - Turn MAKE_LINKS on by default (if no flags found) | 81 | // Grab flags - Turn MAKE_LINKS on by default (if no flags found) |
81 | flags = cfg.readNumEntry( "installFlags", 0 ); | 82 | flags = cfg.readNumEntry( "installFlags", 0 ); |
82 | infoLevel = cfg.readNumEntry( "infoLevel", 1 ); | 83 | infoLevel = cfg.readNumEntry( "infoLevel", 1 ); |
83 | #else | 84 | #else |
@@ -212,49 +213,49 @@ void InstallDlgImpl :: optionsSelected() | |||
212 | if ( opt.exec() == QDialog::Accepted ) | 213 | if ( opt.exec() == QDialog::Accepted ) |
213 | { | 214 | { |
214 | // set options selected from dialog | 215 | // set options selected from dialog |
215 | flags = opt.getFlags(); | 216 | flags = opt.getFlags(); |
216 | infoLevel = opt.getInfoLevel(); | 217 | infoLevel = opt.getInfoLevel(); |
217 | 218 | ||
218 | #ifdef QWS | 219 | #ifdef QWS |
219 | Config cfg( "aqpkg" ); | 220 | Config cfg( "aqpkg" ); |
220 | cfg.setGroup( "settings" ); | 221 | cfg.setGroup( "settings" ); |
221 | cfg.writeEntry( "installFlags", flags ); | 222 | cfg.writeEntry( "installFlags", flags ); |
222 | cfg.writeEntry( "infoLevel", infoLevel ); | 223 | cfg.writeEntry( "infoLevel", infoLevel ); |
223 | #endif | 224 | #endif |
224 | } | 225 | } |
225 | } | 226 | } |
226 | else // Save output | 227 | else // Save output |
227 | { | 228 | { |
228 | QMap<QString, QStringList> map; | 229 | QMap<QString, QStringList> map; |
229 | map.insert( tr( "All" ), QStringList() ); | 230 | map.insert( tr( "All" ), QStringList() ); |
230 | QStringList text; | 231 | QStringList text; |
231 | text << "text/*"; | 232 | text << "text/*"; |
232 | map.insert(tr( "Text" ), text ); | 233 | map.insert(tr( "Text" ), text ); |
233 | text << "*"; | 234 | text << "*"; |
234 | map.insert( tr( "All" ), text ); | 235 | map.insert( tr( "All" ), text ); |
235 | 236 | ||
236 | QString filename = Opie::OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map ); | 237 | QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map ); |
237 | if( !filename.isEmpty() ) | 238 | if( !filename.isEmpty() ) |
238 | { | 239 | { |
239 | QString currentFileName = QFileInfo( filename ).fileName(); | 240 | QString currentFileName = QFileInfo( filename ).fileName(); |
240 | DocLnk doc; | 241 | DocLnk doc; |
241 | doc.setType( "text/plain" ); | 242 | doc.setType( "text/plain" ); |
242 | doc.setFile( filename ); | 243 | doc.setFile( filename ); |
243 | doc.setName( currentFileName ); | 244 | doc.setName( currentFileName ); |
244 | FileManager fm; | 245 | FileManager fm; |
245 | fm.saveFile( doc, output->text() ); | 246 | fm.saveFile( doc, output->text() ); |
246 | } | 247 | } |
247 | } | 248 | } |
248 | } | 249 | } |
249 | 250 | ||
250 | void InstallDlgImpl :: installSelected() | 251 | void InstallDlgImpl :: installSelected() |
251 | { | 252 | { |
252 | if ( btnInstall->text() == tr( "Abort" ) ) | 253 | if ( btnInstall->text() == tr( "Abort" ) ) |
253 | { | 254 | { |
254 | if ( pIpkg ) | 255 | if ( pIpkg ) |
255 | { | 256 | { |
256 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); | 257 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); |
257 | pIpkg->abort(); | 258 | pIpkg->abort(); |
258 | displayText( tr( "**** Process Aborted ****" ) ); | 259 | displayText( tr( "**** Process Aborted ****" ) ); |
259 | } | 260 | } |
260 | 261 | ||
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 866afed..0091a3b 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp | |||
@@ -21,48 +21,49 @@ | |||
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <opie2/oprocess.h> | 30 | #include <opie2/oprocess.h> |
31 | 31 | ||
32 | #ifdef QWS | 32 | #ifdef QWS |
33 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
34 | #else | 34 | #else |
35 | #include <qapplication.h> | 35 | #include <qapplication.h> |
36 | #endif | 36 | #endif |
37 | #include <qdir.h> | 37 | #include <qdir.h> |
38 | #include <qfile.h> | 38 | #include <qfile.h> |
39 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
40 | 40 | ||
41 | #include "utils.h" | 41 | #include "utils.h" |
42 | #include "ipkg.h" | 42 | #include "ipkg.h" |
43 | #include "global.h" | 43 | #include "global.h" |
44 | 44 | ||
45 | using namespace Opie::Core; | ||
45 | Ipkg :: Ipkg() | 46 | Ipkg :: Ipkg() |
46 | { | 47 | { |
47 | proc = 0; | 48 | proc = 0; |
48 | } | 49 | } |
49 | 50 | ||
50 | Ipkg :: ~Ipkg() | 51 | Ipkg :: ~Ipkg() |
51 | { | 52 | { |
52 | } | 53 | } |
53 | 54 | ||
54 | // Option is what we are going to do - install, upgrade, download, reinstall | 55 | // Option is what we are going to do - install, upgrade, download, reinstall |
55 | // package is the package name to install - either a fully qualified path and ipk | 56 | // package is the package name to install - either a fully qualified path and ipk |
56 | // file (if stored locally) or just the name of the package (for a network package) | 57 | // file (if stored locally) or just the name of the package (for a network package) |
57 | // packageName is the package name - (for a network package this will be the same as | 58 | // packageName is the package name - (for a network package this will be the same as |
58 | // package parameter) | 59 | // package parameter) |
59 | // dest is the destination alias (from ipk.conf) | 60 | // dest is the destination alias (from ipk.conf) |
60 | // destDir is the dir that the destination alias points to (used to link to root) | 61 | // destDir is the dir that the destination alias points to (used to link to root) |
61 | // flags is the ipkg options flags | 62 | // flags is the ipkg options flags |
62 | // dir is the directory to run ipkg in (defaults to "") | 63 | // dir is the directory to run ipkg in (defaults to "") |
63 | void Ipkg :: runIpkg() | 64 | void Ipkg :: runIpkg() |
64 | { | 65 | { |
65 | error = false; | 66 | error = false; |
66 | QStringList commands; | 67 | QStringList commands; |
67 | 68 | ||
68 | QDir::setCurrent( "/tmp" ); | 69 | QDir::setCurrent( "/tmp" ); |
@@ -267,55 +268,55 @@ void Ipkg :: removeStatusEntry() | |||
267 | 268 | ||
268 | readFile.close(); | 269 | readFile.close(); |
269 | writeFile.close(); | 270 | writeFile.close(); |
270 | 271 | ||
271 | // Remove old status file and put tmp stats file in its place | 272 | // Remove old status file and put tmp stats file in its place |
272 | remove( statusFile ); | 273 | remove( statusFile ); |
273 | rename( outStatusFile, statusFile ); | 274 | rename( outStatusFile, statusFile ); |
274 | } | 275 | } |
275 | 276 | ||
276 | int Ipkg :: executeIpkgCommand( QStringList &cmd, const QString /*option*/ ) | 277 | int Ipkg :: executeIpkgCommand( QStringList &cmd, const QString /*option*/ ) |
277 | { | 278 | { |
278 | // If one is already running - should never be but just to be safe | 279 | // If one is already running - should never be but just to be safe |
279 | if ( proc ) | 280 | if ( proc ) |
280 | { | 281 | { |
281 | delete proc; | 282 | delete proc; |
282 | proc = 0; | 283 | proc = 0; |
283 | } | 284 | } |
284 | 285 | ||
285 | // OK we're gonna use OProcess to run this thing | 286 | // OK we're gonna use OProcess to run this thing |
286 | proc = new OProcess(); | 287 | proc = new OProcess(); |
287 | aborted = false; | 288 | aborted = false; |
288 | 289 | ||
289 | 290 | ||
290 | // Connect up our slots | 291 | // Connect up our slots |
291 | connect(proc, SIGNAL(processExited(OProcess*)), | 292 | connect(proc, SIGNAL(processExited(Opie::Core::OProcess*)), |
292 | this, SLOT( processFinished())); | 293 | this, SLOT( processFinished())); |
293 | 294 | ||
294 | connect(proc, SIGNAL(receivedStdout(OProcess*,char*,int)), | 295 | connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), |
295 | this, SLOT(commandStdout(OProcess*,char*,int))); | 296 | this, SLOT(commandStdout(OProcess*,char*,int))); |
296 | 297 | ||
297 | connect(proc, SIGNAL(receivedStderr(OProcess*,char*,int)), | 298 | connect(proc, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), |
298 | this, SLOT(commandStderr(OProcess*,char*,int))); | 299 | this, SLOT(commandStderr(OProcess*,char*,int))); |
299 | 300 | ||
300 | for ( QStringList::Iterator it = cmd.begin(); it != cmd.end(); ++it ) | 301 | for ( QStringList::Iterator it = cmd.begin(); it != cmd.end(); ++it ) |
301 | { | 302 | { |
302 | *proc << (*it).latin1(); | 303 | *proc << (*it).latin1(); |
303 | } | 304 | } |
304 | 305 | ||
305 | // Start the process going | 306 | // Start the process going |
306 | finished = false; | 307 | finished = false; |
307 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) | 308 | if(!proc->start(OProcess::NotifyOnExit, OProcess::All)) |
308 | { | 309 | { |
309 | emit outputText( tr("Couldn't start ipkg process" ) ); | 310 | emit outputText( tr("Couldn't start ipkg process" ) ); |
310 | } | 311 | } |
311 | } | 312 | } |
312 | 313 | ||
313 | void Ipkg::commandStdout(OProcess*, char *buffer, int buflen) | 314 | void Ipkg::commandStdout(OProcess*, char *buffer, int buflen) |
314 | { | 315 | { |
315 | QString lineStr = buffer; | 316 | QString lineStr = buffer; |
316 | if ( lineStr[buflen-1] == '\n' ) | 317 | if ( lineStr[buflen-1] == '\n' ) |
317 | buflen --; | 318 | buflen --; |
318 | lineStr = lineStr.left( buflen ); | 319 | lineStr = lineStr.left( buflen ); |
319 | emit outputText( lineStr ); | 320 | emit outputText( lineStr ); |
320 | 321 | ||
321 | // check if we are installing dependant packages | 322 | // check if we are installing dependant packages |
diff --git a/noncore/settings/aqpkg/ipkg.h b/noncore/settings/aqpkg/ipkg.h index f892038..e216d17 100644 --- a/noncore/settings/aqpkg/ipkg.h +++ b/noncore/settings/aqpkg/ipkg.h | |||
@@ -26,79 +26,79 @@ | |||
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef IPKG_H | 30 | #ifndef IPKG_H |
31 | #define IPKG_H | 31 | #define IPKG_H |
32 | 32 | ||
33 | 33 | ||
34 | /** | 34 | /** |
35 | *@author Andy Qua | 35 | *@author Andy Qua |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <qobject.h> | 38 | #include <qobject.h> |
39 | #include <qstring.h> | 39 | #include <qstring.h> |
40 | #include <qstringlist.h> | 40 | #include <qstringlist.h> |
41 | #include <qlist.h> | 41 | #include <qlist.h> |
42 | 42 | ||
43 | #define FORCE_DEPENDS 0x0001 | 43 | #define FORCE_DEPENDS 0x0001 |
44 | #define FORCE_REMOVE 0x0002 | 44 | #define FORCE_REMOVE 0x0002 |
45 | #define FORCE_REINSTALL 0x0004 | 45 | #define FORCE_REINSTALL 0x0004 |
46 | #define FORCE_OVERWRITE 0x0008 | 46 | #define FORCE_OVERWRITE 0x0008 |
47 | #define MAKE_LINKS 0x0010 | 47 | #define MAKE_LINKS 0x0010 |
48 | #define VERBOSE_WGET 0x0020 | 48 | #define VERBOSE_WGET 0x0020 |
49 | 49 | ||
50 | class OProcess; | 50 | namespace Opie {namespace Core {class OProcess;}} |
51 | 51 | ||
52 | class Ipkg : public QObject | 52 | class Ipkg : public QObject |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | public: | 55 | public: |
56 | Ipkg(); | 56 | Ipkg(); |
57 | ~Ipkg(); | 57 | ~Ipkg(); |
58 | void runIpkg(); | 58 | void runIpkg(); |
59 | void createSymLinks(); | 59 | void createSymLinks(); |
60 | 60 | ||
61 | void setOption( const char *opt ) { option = opt; } | 61 | void setOption( const char *opt ) { option = opt; } |
62 | void setPackage( const char *pkg ) { package = pkg; } | 62 | void setPackage( const char *pkg ) { package = pkg; } |
63 | void setDestination( const char *dest ) { destination = dest; } | 63 | void setDestination( const char *dest ) { destination = dest; } |
64 | void setDestinationDir( const char *dir ) { destDir = dir; } | 64 | void setDestinationDir( const char *dir ) { destDir = dir; } |
65 | void setFlags( int fl, int il ) { flags = fl; infoLevel = il; } | 65 | void setFlags( int fl, int il ) { flags = fl; infoLevel = il; } |
66 | void setRuntimeDirectory( const char *dir ) { runtimeDir = dir; } | 66 | void setRuntimeDirectory( const char *dir ) { runtimeDir = dir; } |
67 | 67 | ||
68 | signals: | 68 | signals: |
69 | void outputText( const QString &text ); | 69 | void outputText( const QString &text ); |
70 | void ipkgFinished(); | 70 | void ipkgFinished(); |
71 | 71 | ||
72 | public slots: | 72 | public slots: |
73 | void commandStdout(OProcess*, char *buffer, int buflen); | 73 | void commandStdout(Opie::Core::OProcess*, char *buffer, int buflen); |
74 | void commandStderr(OProcess*, char *buffer, int buflen); | 74 | void commandStderr(Opie::Core::OProcess*, char *buffer, int buflen); |
75 | void processFinished(); | 75 | void processFinished(); |
76 | void abort(); | 76 | void abort(); |
77 | 77 | ||
78 | 78 | ||
79 | private: | 79 | private: |
80 | bool createLinks; | 80 | bool createLinks; |
81 | bool aborted; | 81 | bool aborted; |
82 | bool error; | 82 | bool error; |
83 | QString option; | 83 | QString option; |
84 | QString package; | 84 | QString package; |
85 | QString destination; | 85 | QString destination; |
86 | QString destDir; | 86 | QString destDir; |
87 | QString runtimeDir; | 87 | QString runtimeDir; |
88 | OProcess *proc; | 88 | Opie::Core::OProcess *proc; |
89 | int flags; | 89 | int flags; |
90 | int infoLevel; | 90 | int infoLevel; |
91 | bool finished; | 91 | bool finished; |
92 | 92 | ||
93 | QList<QString> *dependantPackages; | 93 | QList<QString> *dependantPackages; |
94 | 94 | ||
95 | int executeIpkgCommand( QStringList &cmd, const QString option ); | 95 | int executeIpkgCommand( QStringList &cmd, const QString option ); |
96 | void removeStatusEntry(); | 96 | void removeStatusEntry(); |
97 | void linkPackage( const QString &packFileName, const QString &dest, const QString &destDir ); | 97 | void linkPackage( const QString &packFileName, const QString &dest, const QString &destDir ); |
98 | QStringList* getList( const QString &packageFilename, const QString &destDir ); | 98 | QStringList* getList( const QString &packageFilename, const QString &destDir ); |
99 | void processFileList( const QStringList *fileList, const QString &destDir ); | 99 | void processFileList( const QStringList *fileList, const QString &destDir ); |
100 | void processLinkDir( const QString &file, const QString &baseDir, const QString &destDir ); | 100 | void processLinkDir( const QString &file, const QString &baseDir, const QString &destDir ); |
101 | 101 | ||
102 | }; | 102 | }; |
103 | 103 | ||
104 | #endif | 104 | #endif |
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp index b391714..d27479c 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -14,25 +14,26 @@ | |||
14 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "mainwin.h" | 30 | #include "mainwin.h" |
31 | 31 | ||
32 | #include <opie2/oapplicationfactory.h> | 32 | #include <opie2/oapplicationfactory.h> |
33 | 33 | ||
34 | /* be less intrusive for translation -zecke */ | 34 | /* be less intrusive for translation -zecke */ |
35 | extern QString LOCAL_SERVER; | 35 | extern QString LOCAL_SERVER; |
36 | extern QString LOCAL_IPKGS; | 36 | extern QString LOCAL_IPKGS; |
37 | 37 | ||
38 | using namespace Opie::Core; | ||
38 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | 39 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp index b9dbb6e..2f35617 100644 --- a/noncore/settings/aqpkg/settingsimpl.cpp +++ b/noncore/settings/aqpkg/settingsimpl.cpp | |||
@@ -31,60 +31,62 @@ | |||
31 | #include "global.h" | 31 | #include "global.h" |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie2/otabwidget.h> | 34 | #include <opie2/otabwidget.h> |
35 | #ifdef QWS | 35 | #ifdef QWS |
36 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
37 | #include <qpe/resource.h> | 37 | #include <qpe/resource.h> |
38 | #endif | 38 | #endif |
39 | #include <qpe/qpeapplication.h> | 39 | #include <qpe/qpeapplication.h> |
40 | 40 | ||
41 | /* QT */ | 41 | /* QT */ |
42 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
43 | #include <qgroupbox.h> | 43 | #include <qgroupbox.h> |
44 | #include <qlabel.h> | 44 | #include <qlabel.h> |
45 | #include <qlayout.h> | 45 | #include <qlayout.h> |
46 | #include <qlineedit.h> | 46 | #include <qlineedit.h> |
47 | #include <qlistbox.h> | 47 | #include <qlistbox.h> |
48 | #include <qpushbutton.h> | 48 | #include <qpushbutton.h> |
49 | 49 | ||
50 | /* STD */ | 50 | /* STD */ |
51 | #include <fstream> | 51 | #include <fstream> |
52 | #include <algorithm> | 52 | #include <algorithm> |
53 | using namespace std; | 53 | using namespace std; |
54 | 54 | ||
55 | using namespace Opie::Ui; | ||
56 | using namespace Opie::Ui; | ||
55 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) | 57 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) |
56 | : QDialog( parent, name, modal, fl ) | 58 | : QDialog( parent, name, modal, fl ) |
57 | { | 59 | { |
58 | setCaption( tr( "Configuration" ) ); | 60 | setCaption( tr( "Configuration" ) ); |
59 | 61 | ||
60 | // Setup layout to make everything pretty | 62 | // Setup layout to make everything pretty |
61 | QVBoxLayout *layout = new QVBoxLayout( this ); | 63 | QVBoxLayout *layout = new QVBoxLayout( this ); |
62 | layout->setMargin( 2 ); | 64 | layout->setMargin( 2 ); |
63 | layout->setSpacing( 4 ); | 65 | layout->setSpacing( 4 ); |
64 | 66 | ||
65 | // Setup tabs for all info | 67 | // Setup tabs for all info |
66 | Opie::OTabWidget *tabwidget = new Opie::OTabWidget( this ); | 68 | OTabWidget *tabwidget = new OTabWidget( this ); |
67 | layout->addWidget( tabwidget ); | 69 | layout->addWidget( tabwidget ); |
68 | 70 | ||
69 | tabwidget->addTab( initServerTab(), "aqpkg/servertab", tr( "Servers" ) ); | 71 | tabwidget->addTab( initServerTab(), "aqpkg/servertab", tr( "Servers" ) ); |
70 | tabwidget->addTab( initDestinationTab(), "aqpkg/desttab", tr( "Destinations" ) ); | 72 | tabwidget->addTab( initDestinationTab(), "aqpkg/desttab", tr( "Destinations" ) ); |
71 | tabwidget->addTab( initProxyTab(), "aqpkg/proxytab", tr( "Proxies" ) ); | 73 | tabwidget->addTab( initProxyTab(), "aqpkg/proxytab", tr( "Proxies" ) ); |
72 | tabwidget->setCurrentTab( tr( "Servers" ) ); | 74 | tabwidget->setCurrentTab( tr( "Servers" ) ); |
73 | 75 | ||
74 | dataMgr = dataManager; | 76 | dataMgr = dataManager; |
75 | setupData(); | 77 | setupData(); |
76 | changed = false; | 78 | changed = false; |
77 | newserver = false; | 79 | newserver = false; |
78 | newdestination = false; | 80 | newdestination = false; |
79 | } | 81 | } |
80 | 82 | ||
81 | SettingsImpl :: ~SettingsImpl() | 83 | SettingsImpl :: ~SettingsImpl() |
82 | { | 84 | { |
83 | } | 85 | } |
84 | 86 | ||
85 | bool SettingsImpl :: showDlg() | 87 | bool SettingsImpl :: showDlg() |
86 | { | 88 | { |
87 | QPEApplication::execDialog( this ); | 89 | QPEApplication::execDialog( this ); |
88 | if ( changed ) | 90 | if ( changed ) |
89 | dataMgr->writeOutIpkgConf(); | 91 | dataMgr->writeOutIpkgConf(); |
90 | 92 | ||