summaryrefslogtreecommitdiff
path: root/noncore/settings/aqpkg
Unidiff
Diffstat (limited to 'noncore/settings/aqpkg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/aqpkg.pro70
-rw-r--r--noncore/settings/aqpkg/installdlgimpl.cpp254
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp6
-rw-r--r--noncore/settings/aqpkg/ipkg.h14
-rw-r--r--noncore/settings/aqpkg/main.cpp2
-rw-r--r--noncore/settings/aqpkg/opie-aqpkg.control2
-rw-r--r--noncore/settings/aqpkg/settingsimpl.cpp8
7 files changed, 178 insertions, 178 deletions
diff --git a/noncore/settings/aqpkg/aqpkg.pro b/noncore/settings/aqpkg/aqpkg.pro
index a24f036..35a7889 100644
--- a/noncore/settings/aqpkg/aqpkg.pro
+++ b/noncore/settings/aqpkg/aqpkg.pro
@@ -1,38 +1,38 @@
1 CONFIG = qt warn_on release quick-app 1CONFIG = qt warn_on release quick-app
2 HEADERS = global.h \ 2HEADERS = global.h \
3 mainwin.h \ 3 mainwin.h \
4 datamgr.h \ 4 datamgr.h \
5 settingsimpl.h \ 5 settingsimpl.h \
6 ipkg.h \ 6 ipkg.h \
7 packagewin.h \ 7 packagewin.h \
8 package.h \ 8 package.h \
9 installdlgimpl.h \ 9 installdlgimpl.h \
10 instoptionsimpl.h \ 10 instoptionsimpl.h \
11 destination.h \ 11 destination.h \
12 utils.h \ 12 utils.h \
13 server.h \ 13 server.h \
14 letterpushbutton.h \ 14 letterpushbutton.h \
15 inputdlg.h \ 15 inputdlg.h \
16 categoryfilterimpl.h 16 categoryfilterimpl.h
17 SOURCES = mainwin.cpp \ 17SOURCES = mainwin.cpp \
18 datamgr.cpp \ 18 datamgr.cpp \
19 mem.cpp \ 19 mem.cpp \
20 settingsimpl.cpp \ 20 settingsimpl.cpp \
21 ipkg.cpp \ 21 ipkg.cpp \
22 main.cpp \ 22 main.cpp \
23 packagewin.cpp \ 23 packagewin.cpp \
24 package.cpp \ 24 package.cpp \
25 installdlgimpl.cpp \ 25 installdlgimpl.cpp \
26 instoptionsimpl.cpp \ 26 instoptionsimpl.cpp \
27 destination.cpp \ 27 destination.cpp \
28 utils.cpp \ 28 utils.cpp \
29 server.cpp \ 29 server.cpp \
30 letterpushbutton.cpp \ 30 letterpushbutton.cpp \
31 inputdlg.cpp \ 31 inputdlg.cpp \
32 version.cpp \ 32 version.cpp \
33 categoryfilterimpl.cpp 33 categoryfilterimpl.cpp
34 TARGET = aqpkg 34TARGET = aqpkg
35INCLUDEPATH += $(OPIEDIR)/include 35INCLUDEPATH += $(OPIEDIR)/include
36DEPENDPATH += $(OPIEDIR)/include 36DEPENDPATH += $(OPIEDIR)/include
37LIBS += -lqpe -lopie 37LIBS += -lqpe -lopiecore2 -lopieui2
38 38
diff --git a/noncore/settings/aqpkg/installdlgimpl.cpp b/noncore/settings/aqpkg/installdlgimpl.cpp
index ea2c47f..d927a36 100644
--- a/noncore/settings/aqpkg/installdlgimpl.cpp
+++ b/noncore/settings/aqpkg/installdlgimpl.cpp
@@ -2,3 +2,3 @@
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
@@ -31,4 +31,4 @@
31 31
32#include <opie/ofiledialog.h> 32#include <opie2/ofiledialog.h>
33 33
34#ifdef QWS 34#ifdef QWS
@@ -60,3 +60,3 @@
60enum { 60enum {
61 MAXLINES = 100, 61 MAXLINES = 100,
62}; 62};
@@ -68,3 +68,3 @@ InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManag
68 init( TRUE ); 68 init( TRUE );
69 69
70 pIpkg = 0; 70 pIpkg = 0;
@@ -83,3 +83,3 @@ InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManag
83#else 83#else
84 flags = 0; 84 flags = 0;
85#endif 85#endif
@@ -88,5 +88,5 @@ InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManag
88 output->setReadOnly( true ); 88 output->setReadOnly( true );
89 //QFont f( "helvetica" ); 89// QFont f( "helvetica" );
90 //f.setPointSize( 10 ); 90// f.setPointSize( 10 );
91 //output->setFont( f ); 91// output->setFont( f );
92 92
@@ -106,40 +106,40 @@ InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManag
106 106
107 QListIterator<InstallData> it( packageList ); 107 QListIterator<InstallData> it( packageList );
108 // setup package data 108 // setup package data
109 QString remove = tr( "Remove\n" ); 109 QString remove = tr( "Remove\n" );
110 QString install = tr( "Install\n" ); 110 QString install = tr( "Install\n" );
111 QString upgrade = tr( "Upgrade\n" ); 111 QString upgrade = tr( "Upgrade\n" );
112 for ( ; it.current(); ++it ) 112 for ( ; it.current(); ++it )
113 { 113 {
114 InstallData *item = it.current(); 114 InstallData *item = it.current();
115 InstallData *newitem = new InstallData(); 115 InstallData *newitem = new InstallData();
116 116
117 newitem->option = item->option; 117 newitem->option = item->option;
118 newitem->packageName = item->packageName; 118 newitem->packageName = item->packageName;
119 newitem->destination = item->destination; 119 newitem->destination = item->destination;
120 newitem->recreateLinks = item->recreateLinks; 120 newitem->recreateLinks = item->recreateLinks;
121 packages.append( newitem ); 121 packages.append( newitem );
122 122
123 if ( item->option == "I" ) 123 if ( item->option == "I" )
124 { 124 {
125 install.append( QString( " %1\n" ).arg( item->packageName ) ); 125 install.append( QString( " %1\n" ).arg( item->packageName ) );
126 } 126 }
127 else if ( item->option == "D" ) 127 else if ( item->option == "D" )
128 { 128 {
129 remove.append( QString( " %1\n" ).arg( item->packageName ) ); 129 remove.append( QString( " %1\n" ).arg( item->packageName ) );
130 } 130 }
131 else if ( item->option == "U" || item->option == "R" ) 131 else if ( item->option == "U" || item->option == "R" )
132 { 132 {
133 QString type; 133 QString type;
134 if ( item->option == "R" ) 134 if ( item->option == "R" )
135 type = tr( "(ReInstall)" ); 135 type = tr( "(ReInstall)" );
136 else 136 else
137 type = tr( "(Upgrade)" ); 137 type = tr( "(Upgrade)" );
138 upgrade.append( QString( " %1 %2\n" ).arg( item->packageName ).arg( type ) ); 138 upgrade.append( QString( " %1 %2\n" ).arg( item->packageName ).arg( type ) );
139 } 139 }
140 } 140 }
141 141
142 output->setText( QString( "%1\n%2\n%3\n" ).arg( remove ).arg( install ).arg( upgrade ) ); 142 output->setText( QString( "%1\n%2\n%3\n" ).arg( remove ).arg( install ).arg( upgrade ) );
143 143
144 displayAvailableSpace( destination->currentText() ); 144 displayAvailableSpace( destination->currentText() );
145} 145}
@@ -164,3 +164,3 @@ void InstallDlgImpl :: init( bool displayextrainfo )
164{ 164{
165 QGridLayout *layout = new QGridLayout( this ); 165 QGridLayout *layout = new QGridLayout( this );
166 layout->setSpacing( 4 ); 166 layout->setSpacing( 4 );
@@ -187,3 +187,3 @@ void InstallDlgImpl :: init( bool displayextrainfo )
187 } 187 }
188 188
189 QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this ); 189 QGroupBox *GroupBox2 = new QGroupBox( 0, Qt::Vertical, tr( "Output" ), this );
@@ -200,3 +200,3 @@ void InstallDlgImpl :: init( bool displayextrainfo )
200 connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) ); 200 connect( btnInstall, SIGNAL( clicked() ), this, SLOT( installSelected() ) );
201 201
202 btnOptions = new QPushButton( Resource::loadPixmap( "SettingsIcon" ), tr( "Options" ), this ); 202 btnOptions = new QPushButton( Resource::loadPixmap( "SettingsIcon" ), tr( "Options" ), this );
@@ -234,4 +234,4 @@ void InstallDlgImpl :: optionsSelected()
234 map.insert( tr( "All" ), text ); 234 map.insert( tr( "All" ), text );
235 235
236 QString filename = OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map ); 236 QString filename = Opie::OFileDialog::getSaveFileName( 2, "/", "ipkg-output", map );
237 if( !filename.isEmpty() ) 237 if( !filename.isEmpty() )
@@ -259,3 +259,3 @@ void InstallDlgImpl :: installSelected()
259 } 259 }
260 260
261 btnInstall->setText( tr( "Close" ) ); 261 btnInstall->setText( tr( "Close" ) );
@@ -269,3 +269,3 @@ void InstallDlgImpl :: installSelected()
269 } 269 }
270 270
271 // Disable buttons 271 // Disable buttons
@@ -293,3 +293,3 @@ void InstallDlgImpl :: installSelected()
293 instFlags |= MAKE_LINKS; 293 instFlags |= MAKE_LINKS;
294 294
295#ifdef QWS 295#ifdef QWS
@@ -305,8 +305,8 @@ void InstallDlgImpl :: installSelected()
305 305
306 firstPackage = TRUE; 306 firstPackage = TRUE;
307 ipkgFinished(); 307 ipkgFinished();
308 308
309 // First run through the remove list, then the install list then the upgrade list 309 // First run through the remove list, then the install list then the upgrade list
310/* 310/*
311 pIpkg->setOption( "remove" ); 311 pIpkg->setOption( "remove" );
312 QListIterator<InstallData> it( removeList ); 312 QListIterator<InstallData> it( removeList );
@@ -323,3 +323,3 @@ void InstallDlgImpl :: installSelected()
323 tmpFlags |= MAKE_LINKS; 323 tmpFlags |= MAKE_LINKS;
324 324
325 pIpkg->setFlags( tmpFlags, infoLevel ); 325 pIpkg->setFlags( tmpFlags, infoLevel );
@@ -402,3 +402,3 @@ void InstallDlgImpl :: displayAvailableSpace( const QString &text )
402 space = tr( "Unknown" ); 402 space = tr( "Unknown" );
403 403
404 if ( txtAvailableSpace ) 404 if ( txtAvailableSpace )
@@ -409,68 +409,68 @@ void InstallDlgImpl :: ipkgFinished()
409{ 409{
410 InstallData *item; 410 InstallData *item;
411 if ( firstPackage ) 411 if ( firstPackage )
412 item = packages.first(); 412 item = packages.first();
413 else 413 else
414 { 414 {
415 // Create symlinks if necessary before moving on to next package 415 // Create symlinks if necessary before moving on to next package
416 pIpkg->createSymLinks(); 416 pIpkg->createSymLinks();
417 417
418 item = packages.next(); 418 item = packages.next();
419 } 419 }
420 420
421 firstPackage = FALSE; 421 firstPackage = FALSE;
422 if ( item ) 422 if ( item )
423 { 423 {
424 pIpkg->setPackage( item->packageName ); 424 pIpkg->setPackage( item->packageName );
425 int tmpFlags = flags; 425 int tmpFlags = flags;
426 426
427 if ( item->option == "I" ) 427 if ( item->option == "I" )
428 { 428 {
429 pIpkg->setOption( "install" ); 429 pIpkg->setOption( "install" );
430 Destination *d = dataMgr->getDestination( destination->currentText() ); 430 Destination *d = dataMgr->getDestination( destination->currentText() );
431 pIpkg->setDestination( d->getDestinationName() ); 431 pIpkg->setDestination( d->getDestinationName() );
432 pIpkg->setDestinationDir( d->getDestinationPath() ); 432 pIpkg->setDestinationDir( d->getDestinationPath() );
433 433
434 if ( d->linkToRoot() ) 434 if ( d->linkToRoot() )
435 tmpFlags |= MAKE_LINKS; 435 tmpFlags |= MAKE_LINKS;
436 } 436 }
437 else if ( item->option == "D" ) 437 else if ( item->option == "D" )
438 { 438 {
439 pIpkg->setOption( "remove" ); 439 pIpkg->setOption( "remove" );
440 pIpkg->setDestination( item->destination->getDestinationName() ); 440 pIpkg->setDestination( item->destination->getDestinationName() );
441 pIpkg->setDestinationDir( item->destination->getDestinationPath() ); 441 pIpkg->setDestinationDir( item->destination->getDestinationPath() );
442 442
443 if ( item->destination->linkToRoot() ) 443 if ( item->destination->linkToRoot() )
444 tmpFlags |= MAKE_LINKS; 444 tmpFlags |= MAKE_LINKS;
445 } 445 }
446 else 446 else
447 { 447 {
448 if ( item->option == "R" ) 448 if ( item->option == "R" )
449 pIpkg->setOption( "reinstall" ); 449 pIpkg->setOption( "reinstall" );
450 else 450 else
451 pIpkg->setOption( "upgrade" ); 451 pIpkg->setOption( "upgrade" );
452 452
453 pIpkg->setDestination( item->destination->getDestinationName() ); 453 pIpkg->setDestination( item->destination->getDestinationName() );
454 pIpkg->setDestinationDir( item->destination->getDestinationPath() ); 454 pIpkg->setDestinationDir( item->destination->getDestinationPath() );
455 pIpkg->setPackage( item->packageName ); 455 pIpkg->setPackage( item->packageName );
456 456
457 tmpFlags |= FORCE_REINSTALL; 457 tmpFlags |= FORCE_REINSTALL;
458 if ( item->destination->linkToRoot() && item->recreateLinks ) 458 if ( item->destination->linkToRoot() && item->recreateLinks )
459 tmpFlags |= MAKE_LINKS; 459 tmpFlags |= MAKE_LINKS;
460 } 460 }
461 pIpkg->setFlags( tmpFlags, infoLevel ); 461 pIpkg->setFlags( tmpFlags, infoLevel );
462 pIpkg->runIpkg(); 462 pIpkg->runIpkg();
463 } 463 }
464 else 464 else
465 { 465 {
466 btnOptions->setEnabled( true ); 466 btnOptions->setEnabled( true );
467 btnInstall->setText( tr( "Close" ) ); 467 btnInstall->setText( tr( "Close" ) );
468 btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); 468 btnInstall->setIconSet( Resource::loadPixmap( "enter" ) );
469 469
470 btnOptions->setText( tr( "Save output" ) ); 470 btnOptions->setText( tr( "Save output" ) );
471 btnOptions->setIconSet( Resource::loadPixmap( "save" ) ); 471 btnOptions->setIconSet( Resource::loadPixmap( "save" ) );
472 472
473 if ( destination && destination->currentText() != 0 && destination->currentText() != "" ) 473 if ( destination && destination->currentText() != 0 && destination->currentText() != "" )
474 displayAvailableSpace( destination->currentText() ); 474 displayAvailableSpace( destination->currentText() );
475 } 475 }
476} 476}
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index 2a9c576..3761b67 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -29,2 +29,4 @@
29 29
30#include <opie2/oprocess.h>
31
30#ifdef QWS 32#ifdef QWS
@@ -38,4 +40,2 @@
38 40
39#include <opie/oprocess.h>
40
41#include "utils.h" 41#include "utils.h"
@@ -366,3 +366,3 @@ void Ipkg::processFinished()
366 366
367 emit ipkgFinished(); 367 emit ipkgFinished();
368} 368}
diff --git a/noncore/settings/aqpkg/ipkg.h b/noncore/settings/aqpkg/ipkg.h
index 8f254f9..f892038 100644
--- a/noncore/settings/aqpkg/ipkg.h
+++ b/noncore/settings/aqpkg/ipkg.h
@@ -2,3 +2,3 @@
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
@@ -57,4 +57,4 @@ public:
57 ~Ipkg(); 57 ~Ipkg();
58 void runIpkg(); 58 void runIpkg();
59 void createSymLinks(); 59 void createSymLinks();
60 60
@@ -69,3 +69,3 @@ signals:
69 void outputText( const QString &text ); 69 void outputText( const QString &text );
70 void ipkgFinished(); 70 void ipkgFinished();
71 71
@@ -77,3 +77,3 @@ public slots:
77 77
78 78
79private: 79private:
@@ -93,3 +93,3 @@ private:
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 );
@@ -100,3 +100,3 @@ private:
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};
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp
index 179f8b7..b391714 100644
--- a/noncore/settings/aqpkg/main.cpp
+++ b/noncore/settings/aqpkg/main.cpp
@@ -31,3 +31,3 @@
31 31
32#include <opie/oapplicationfactory.h> 32#include <opie2/oapplicationfactory.h>
33 33
diff --git a/noncore/settings/aqpkg/opie-aqpkg.control b/noncore/settings/aqpkg/opie-aqpkg.control
index b9e143f..2edb794 100644
--- a/noncore/settings/aqpkg/opie-aqpkg.control
+++ b/noncore/settings/aqpkg/opie-aqpkg.control
@@ -4,3 +4,3 @@ Priority: optional
4Section: opie/settings 4Section: opie/settings
5Depends: task-opie-minimal 5Depends: task-opie-minimal, libopiecore2, libopieui2
6Replaces: aqpkg 6Replaces: aqpkg
diff --git a/noncore/settings/aqpkg/settingsimpl.cpp b/noncore/settings/aqpkg/settingsimpl.cpp
index 9fdf31e..6e9dd99 100644
--- a/noncore/settings/aqpkg/settingsimpl.cpp
+++ b/noncore/settings/aqpkg/settingsimpl.cpp
@@ -2,3 +2,3 @@
2                This file is part of the OPIE Project 2                This file is part of the OPIE Project
3 3
4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> 4 =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk>
@@ -26,3 +26,3 @@
26 Boston, MA 02111-1307, USA. 26 Boston, MA 02111-1307, USA.
27 27
28*/ 28*/
@@ -33,3 +33,3 @@
33/* OPIE */ 33/* OPIE */
34#include <opie/otabwidget.h> 34#include <opie2/otabwidget.h>
35#ifdef QWS 35#ifdef QWS
@@ -65,3 +65,3 @@ SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const
65 // Setup tabs for all info 65 // Setup tabs for all info
66 OTabWidget *tabwidget = new OTabWidget( this ); 66 Opie::OTabWidget *tabwidget = new Opie::OTabWidget( this );
67 layout->addWidget( tabwidget ); 67 layout->addWidget( tabwidget );