author | drw <drw> | 2004-02-22 00:23:34 (UTC) |
---|---|---|
committer | drw <drw> | 2004-02-22 00:23:34 (UTC) |
commit | 91faf16c7336e54a6472fc9821903782918be539 (patch) (unidiff) | |
tree | 1fe4a46860fab93000b8d633d7fd0c10013904d0 | |
parent | e8aa81decb9a22828dcdbbaf3d08e2c6f1d2217f (diff) | |
download | opie-91faf16c7336e54a6472fc9821903782918be539.zip opie-91faf16c7336e54a6472fc9821903782918be539.tar.gz opie-91faf16c7336e54a6472fc9821903782918be539.tar.bz2 |
AQPkg: libopie->libopie2
-rw-r--r-- | noncore/settings/aqpkg/aqpkg.pro | 70 | ||||
-rw-r--r-- | noncore/settings/aqpkg/installdlgimpl.cpp | 254 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 6 | ||||
-rw-r--r-- | noncore/settings/aqpkg/ipkg.h | 14 | ||||
-rw-r--r-- | noncore/settings/aqpkg/main.cpp | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/opie-aqpkg.control | 2 | ||||
-rw-r--r-- | noncore/settings/aqpkg/settingsimpl.cpp | 8 |
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,40 +1,40 @@ | |||
1 | CONFIG = qt warn_on release quick-app | 1 | CONFIG = qt warn_on release quick-app |
2 | HEADERS = global.h \ | 2 | HEADERS = 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 \ | 17 | SOURCES = 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 | 34 | TARGET = aqpkg |
35 | INCLUDEPATH += $(OPIEDIR)/include | 35 | INCLUDEPATH += $(OPIEDIR)/include |
36 | DEPENDPATH += $(OPIEDIR)/include | 36 | DEPENDPATH += $(OPIEDIR)/include |
37 | LIBS += -lqpe -lopie | 37 | LIBS += -lqpe -lopiecore2 -lopieui2 |
38 | 38 | ||
39 | include ( $(OPIEDIR)/include.pro ) | 39 | include ( $(OPIEDIR)/include.pro ) |
40 | 40 | ||
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 | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
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> |
5 | .=l. Dan Williams <drw@handhelds.org> | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
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; |
@@ -20,26 +20,26 @@ | |||
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 <stdio.h> | 30 | #include <stdio.h> |
31 | 31 | ||
32 | #include <opie/ofiledialog.h> | 32 | #include <opie2/ofiledialog.h> |
33 | 33 | ||
34 | #ifdef QWS | 34 | #ifdef QWS |
35 | #include <qpe/config.h> | 35 | #include <qpe/config.h> |
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> |
@@ -49,165 +49,165 @@ | |||
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 | enum { | 60 | enum { |
61 | MAXLINES = 100, | 61 | MAXLINES = 100, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManager *dataManager, const char *title ) | 64 | InstallDlgImpl::InstallDlgImpl( const QList<InstallData> &packageList, DataManager *dataManager, const char *title ) |
65 | : QWidget( 0, 0, 0 ) | 65 | : QWidget( 0, 0, 0 ) |
66 | { | 66 | { |
67 | setCaption( title ); | 67 | setCaption( title ); |
68 | init( TRUE ); | 68 | init( TRUE ); |
69 | 69 | ||
70 | pIpkg = 0; | 70 | pIpkg = 0; |
71 | upgradePackages = false; | 71 | upgradePackages = false; |
72 | dataMgr = dataManager; | 72 | dataMgr = dataManager; |
73 | 73 | ||
74 | QString defaultDest = "root"; | 74 | QString defaultDest = "root"; |
75 | #ifdef QWS | 75 | #ifdef QWS |
76 | Config cfg( "aqpkg" ); | 76 | Config cfg( "aqpkg" ); |
77 | cfg.setGroup( "settings" ); | 77 | cfg.setGroup( "settings" ); |
78 | defaultDest = cfg.readEntry( "dest", "root" ); | 78 | defaultDest = cfg.readEntry( "dest", "root" ); |
79 | 79 | ||
80 | // Grab flags - Turn MAKE_LINKS on by default (if no flags found) | 80 | // Grab flags - Turn MAKE_LINKS on by default (if no flags found) |
81 | flags = cfg.readNumEntry( "installFlags", 0 ); | 81 | flags = cfg.readNumEntry( "installFlags", 0 ); |
82 | infoLevel = cfg.readNumEntry( "infoLevel", 1 ); | 82 | infoLevel = cfg.readNumEntry( "infoLevel", 1 ); |
83 | #else | 83 | #else |
84 | flags = 0; | 84 | flags = 0; |
85 | #endif | 85 | #endif |
86 | 86 | ||
87 | // Output text is read only | 87 | // Output text is read only |
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 | ||
93 | 93 | ||
94 | // setup destination data | 94 | // setup destination data |
95 | int defIndex = 0; | 95 | int defIndex = 0; |
96 | int i; | 96 | int i; |
97 | QListIterator<Destination> dit( dataMgr->getDestinationList() ); | 97 | QListIterator<Destination> dit( dataMgr->getDestinationList() ); |
98 | for ( i = 0; dit.current(); ++dit, ++i ) | 98 | for ( i = 0; dit.current(); ++dit, ++i ) |
99 | { | 99 | { |
100 | destination->insertItem( dit.current()->getDestinationName() ); | 100 | destination->insertItem( dit.current()->getDestinationName() ); |
101 | if ( dit.current()->getDestinationName() == defaultDest ) | 101 | if ( dit.current()->getDestinationName() == defaultDest ) |
102 | defIndex = i; | 102 | defIndex = i; |
103 | } | 103 | } |
104 | 104 | ||
105 | destination->setCurrentItem( defIndex ); | 105 | destination->setCurrentItem( defIndex ); |
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 | } |
146 | 146 | ||
147 | InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title ) | 147 | InstallDlgImpl::InstallDlgImpl( Ipkg *ipkg, QString initialText, const char *title ) |
148 | : QWidget( 0, 0, 0 ) | 148 | : QWidget( 0, 0, 0 ) |
149 | { | 149 | { |
150 | setCaption( title ); | 150 | setCaption( title ); |
151 | init( FALSE ); | 151 | init( FALSE ); |
152 | pIpkg = ipkg; | 152 | pIpkg = ipkg; |
153 | output->setText( initialText ); | 153 | output->setText( initialText ); |
154 | } | 154 | } |
155 | 155 | ||
156 | 156 | ||
157 | InstallDlgImpl::~InstallDlgImpl() | 157 | InstallDlgImpl::~InstallDlgImpl() |
158 | { | 158 | { |
159 | if ( pIpkg ) | 159 | if ( pIpkg ) |
160 | delete pIpkg; | 160 | delete pIpkg; |
161 | } | 161 | } |
162 | 162 | ||
163 | void InstallDlgImpl :: init( bool displayextrainfo ) | 163 | 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 ); |
167 | layout->setMargin( 4 ); | 167 | layout->setMargin( 4 ); |
168 | 168 | ||
169 | if ( displayextrainfo ) | 169 | if ( displayextrainfo ) |
170 | { | 170 | { |
171 | QLabel *label = new QLabel( tr( "Destination" ), this ); | 171 | QLabel *label = new QLabel( tr( "Destination" ), this ); |
172 | layout->addWidget( label, 0, 0 ); | 172 | layout->addWidget( label, 0, 0 ); |
173 | destination = new QComboBox( FALSE, this ); | 173 | destination = new QComboBox( FALSE, this ); |
174 | layout->addWidget( destination, 0, 1 ); | 174 | layout->addWidget( destination, 0, 1 ); |
175 | connect( destination, SIGNAL( highlighted( const QString & ) ), | 175 | connect( destination, SIGNAL( highlighted( const QString & ) ), |
176 | this, SLOT( displayAvailableSpace( const QString & ) ) ); | 176 | this, SLOT( displayAvailableSpace( const QString & ) ) ); |
177 | 177 | ||
178 | QLabel *label2 = new QLabel( tr( "Space Avail" ), this ); | 178 | QLabel *label2 = new QLabel( tr( "Space Avail" ), this ); |
179 | layout->addWidget( label2, 1, 0 ); | 179 | layout->addWidget( label2, 1, 0 ); |
180 | txtAvailableSpace = new QLabel( "", this ); | 180 | txtAvailableSpace = new QLabel( "", this ); |
181 | layout->addWidget( txtAvailableSpace, 1, 1 ); | 181 | layout->addWidget( txtAvailableSpace, 1, 1 ); |
182 | } | 182 | } |
183 | else | 183 | else |
184 | { | 184 | { |
185 | destination = 0x0; | 185 | destination = 0x0; |
186 | txtAvailableSpace = 0x0; | 186 | txtAvailableSpace = 0x0; |
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 ); |
190 | GroupBox2->layout()->setSpacing( 0 ); | 190 | GroupBox2->layout()->setSpacing( 0 ); |
191 | GroupBox2->layout()->setMargin( 4 ); | 191 | GroupBox2->layout()->setMargin( 4 ); |
192 | 192 | ||
193 | QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() ); | 193 | QVBoxLayout *GroupBox2Layout = new QVBoxLayout( GroupBox2->layout() ); |
194 | output = new QMultiLineEdit( GroupBox2 ); | 194 | output = new QMultiLineEdit( GroupBox2 ); |
195 | GroupBox2Layout->addWidget( output ); | 195 | GroupBox2Layout->addWidget( output ); |
196 | layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 ); | 196 | layout->addMultiCellWidget( GroupBox2, 2, 2, 0, 1 ); |
197 | 197 | ||
198 | btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this ); | 198 | btnInstall = new QPushButton( Resource::loadPixmap( "aqpkg/apply" ), tr( "Start" ), this ); |
199 | layout->addWidget( btnInstall, 3, 0 ); | 199 | layout->addWidget( btnInstall, 3, 0 ); |
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 ); |
203 | layout->addWidget( btnOptions, 3, 1 ); | 203 | layout->addWidget( btnOptions, 3, 1 ); |
204 | connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) ); | 204 | connect( btnOptions, SIGNAL( clicked() ), this, SLOT( optionsSelected() ) ); |
205 | } | 205 | } |
206 | 206 | ||
207 | void InstallDlgImpl :: optionsSelected() | 207 | void InstallDlgImpl :: optionsSelected() |
208 | { | 208 | { |
209 | if ( btnOptions->text() == tr( "Options" ) ) | 209 | if ( btnOptions->text() == tr( "Options" ) ) |
210 | { | 210 | { |
211 | InstallOptionsDlgImpl opt( flags, infoLevel, this, "Option", true ); | 211 | InstallOptionsDlgImpl opt( flags, infoLevel, this, "Option", true ); |
212 | if ( opt.exec() == QDialog::Accepted ) | 212 | if ( opt.exec() == QDialog::Accepted ) |
213 | { | 213 | { |
@@ -223,114 +223,114 @@ void InstallDlgImpl :: optionsSelected() | |||
223 | #endif | 223 | #endif |
224 | } | 224 | } |
225 | } | 225 | } |
226 | else // Save output | 226 | else // Save output |
227 | { | 227 | { |
228 | QMap<QString, QStringList> map; | 228 | QMap<QString, QStringList> map; |
229 | map.insert( tr( "All" ), QStringList() ); | 229 | map.insert( tr( "All" ), QStringList() ); |
230 | QStringList text; | 230 | QStringList text; |
231 | text << "text/*"; | 231 | text << "text/*"; |
232 | map.insert(tr( "Text" ), text ); | 232 | map.insert(tr( "Text" ), text ); |
233 | text << "*"; | 233 | text << "*"; |
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() ) |
238 | { | 238 | { |
239 | QString currentFileName = QFileInfo( filename ).fileName(); | 239 | QString currentFileName = QFileInfo( filename ).fileName(); |
240 | DocLnk doc; | 240 | DocLnk doc; |
241 | doc.setType( "text/plain" ); | 241 | doc.setType( "text/plain" ); |
242 | doc.setFile( filename ); | 242 | doc.setFile( filename ); |
243 | doc.setName( currentFileName ); | 243 | doc.setName( currentFileName ); |
244 | FileManager fm; | 244 | FileManager fm; |
245 | fm.saveFile( doc, output->text() ); | 245 | fm.saveFile( doc, output->text() ); |
246 | } | 246 | } |
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | void InstallDlgImpl :: installSelected() | 250 | void InstallDlgImpl :: installSelected() |
251 | { | 251 | { |
252 | if ( btnInstall->text() == tr( "Abort" ) ) | 252 | if ( btnInstall->text() == tr( "Abort" ) ) |
253 | { | 253 | { |
254 | if ( pIpkg ) | 254 | if ( pIpkg ) |
255 | { | 255 | { |
256 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); | 256 | displayText( tr( "\n**** User Clicked ABORT ***" ) ); |
257 | pIpkg->abort(); | 257 | pIpkg->abort(); |
258 | displayText( tr( "**** Process Aborted ****" ) ); | 258 | displayText( tr( "**** Process Aborted ****" ) ); |
259 | } | 259 | } |
260 | 260 | ||
261 | btnInstall->setText( tr( "Close" ) ); | 261 | btnInstall->setText( tr( "Close" ) ); |
262 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); | 262 | btnInstall->setIconSet( Resource::loadPixmap( "enter" ) ); |
263 | return; | 263 | return; |
264 | } | 264 | } |
265 | else if ( btnInstall->text() == tr( "Close" ) ) | 265 | else if ( btnInstall->text() == tr( "Close" ) ) |
266 | { | 266 | { |
267 | emit reloadData( this ); | 267 | emit reloadData( this ); |
268 | return; | 268 | return; |
269 | } | 269 | } |
270 | 270 | ||
271 | // Disable buttons | 271 | // Disable buttons |
272 | btnOptions->setEnabled( false ); | 272 | btnOptions->setEnabled( false ); |
273 | // btnInstall->setEnabled( false ); | 273 | // btnInstall->setEnabled( false ); |
274 | 274 | ||
275 | btnInstall->setText( tr( "Abort" ) ); | 275 | btnInstall->setText( tr( "Abort" ) ); |
276 | btnInstall->setIconSet( Resource::loadPixmap( "close" ) ); | 276 | btnInstall->setIconSet( Resource::loadPixmap( "close" ) ); |
277 | 277 | ||
278 | if ( pIpkg ) | 278 | if ( pIpkg ) |
279 | { | 279 | { |
280 | output->setText( "" ); | 280 | output->setText( "" ); |
281 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | 281 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); |
282 | connect( pIpkg, SIGNAL(ipkgFinished()), this, SLOT(ipkgFinished())); | 282 | connect( pIpkg, SIGNAL(ipkgFinished()), this, SLOT(ipkgFinished())); |
283 | pIpkg->runIpkg(); | 283 | pIpkg->runIpkg(); |
284 | } | 284 | } |
285 | else | 285 | else |
286 | { | 286 | { |
287 | output->setText( "" ); | 287 | output->setText( "" ); |
288 | Destination *d = dataMgr->getDestination( destination->currentText() ); | 288 | Destination *d = dataMgr->getDestination( destination->currentText() ); |
289 | QString dest = d->getDestinationName(); | 289 | QString dest = d->getDestinationName(); |
290 | QString destDir = d->getDestinationPath(); | 290 | QString destDir = d->getDestinationPath(); |
291 | int instFlags = flags; | 291 | int instFlags = flags; |
292 | if ( d->linkToRoot() ) | 292 | if ( d->linkToRoot() ) |
293 | instFlags |= MAKE_LINKS; | 293 | instFlags |= MAKE_LINKS; |
294 | 294 | ||
295 | #ifdef QWS | 295 | #ifdef QWS |
296 | // Save settings | 296 | // Save settings |
297 | Config cfg( "aqpkg" ); | 297 | Config cfg( "aqpkg" ); |
298 | cfg.setGroup( "settings" ); | 298 | cfg.setGroup( "settings" ); |
299 | cfg.writeEntry( "dest", dest ); | 299 | cfg.writeEntry( "dest", dest ); |
300 | #endif | 300 | #endif |
301 | 301 | ||
302 | pIpkg = new Ipkg; | 302 | pIpkg = new Ipkg; |
303 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); | 303 | connect( pIpkg, SIGNAL(outputText(const QString &)), this, SLOT(displayText(const QString &))); |
304 | connect( pIpkg, SIGNAL(ipkgFinished()), this, SLOT(ipkgFinished())); | 304 | connect( pIpkg, SIGNAL(ipkgFinished()), this, SLOT(ipkgFinished())); |
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 ); |
313 | InstallData *idata; | 313 | InstallData *idata; |
314 | for ( ; it.current(); ++it ) | 314 | for ( ; it.current(); ++it ) |
315 | { | 315 | { |
316 | idata = it.current(); | 316 | idata = it.current(); |
317 | pIpkg->setDestination( idata->destination->getDestinationName() ); | 317 | pIpkg->setDestination( idata->destination->getDestinationName() ); |
318 | pIpkg->setDestinationDir( idata->destination->getDestinationPath() ); | 318 | pIpkg->setDestinationDir( idata->destination->getDestinationPath() ); |
319 | pIpkg->setPackage( idata->packageName ); | 319 | pIpkg->setPackage( idata->packageName ); |
320 | 320 | ||
321 | int tmpFlags = flags; | 321 | int tmpFlags = flags; |
322 | if ( idata->destination->linkToRoot() ) | 322 | if ( idata->destination->linkToRoot() ) |
323 | tmpFlags |= MAKE_LINKS; | 323 | tmpFlags |= MAKE_LINKS; |
324 | 324 | ||
325 | pIpkg->setFlags( tmpFlags, infoLevel ); | 325 | pIpkg->setFlags( tmpFlags, infoLevel ); |
326 | pIpkg->runIpkg(); | 326 | pIpkg->runIpkg(); |
327 | } | 327 | } |
328 | 328 | ||
329 | pIpkg->setOption( "install" ); | 329 | pIpkg->setOption( "install" ); |
330 | pIpkg->setDestination( dest ); | 330 | pIpkg->setDestination( dest ); |
331 | pIpkg->setDestinationDir( destDir ); | 331 | pIpkg->setDestinationDir( destDir ); |
332 | pIpkg->setFlags( instFlags, infoLevel ); | 332 | pIpkg->setFlags( instFlags, infoLevel ); |
333 | QListIterator<InstallData> it2( installList ); | 333 | QListIterator<InstallData> it2( installList ); |
334 | for ( ; it2.current(); ++it2 ) | 334 | for ( ; it2.current(); ++it2 ) |
335 | { | 335 | { |
336 | pIpkg->setPackage( it2.current()->packageName ); | 336 | pIpkg->setPackage( it2.current()->packageName ); |
@@ -391,86 +391,86 @@ void InstallDlgImpl :: displayAvailableSpace( const QString &text ) | |||
391 | { | 391 | { |
392 | long mult = blockSize / 1024; | 392 | long mult = blockSize / 1024; |
393 | long div = 1024 / blockSize; | 393 | long div = 1024 / blockSize; |
394 | 394 | ||
395 | if ( !mult ) mult = 1; | 395 | if ( !mult ) mult = 1; |
396 | if ( !div ) div = 1; | 396 | if ( !div ) div = 1; |
397 | long avail = availBlocks * mult / div; | 397 | long avail = availBlocks * mult / div; |
398 | 398 | ||
399 | space = tr( "%1 Kb" ).arg( avail ); | 399 | space = tr( "%1 Kb" ).arg( avail ); |
400 | } | 400 | } |
401 | else | 401 | else |
402 | space = tr( "Unknown" ); | 402 | space = tr( "Unknown" ); |
403 | 403 | ||
404 | if ( txtAvailableSpace ) | 404 | if ( txtAvailableSpace ) |
405 | txtAvailableSpace->setText( space ); | 405 | txtAvailableSpace->setText( space ); |
406 | } | 406 | } |
407 | 407 | ||
408 | void InstallDlgImpl :: ipkgFinished() | 408 | 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 | |||
@@ -18,35 +18,35 @@ | |||
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 <opie2/oprocess.h> | ||
31 | |||
30 | #ifdef QWS | 32 | #ifdef QWS |
31 | #include <qpe/qpeapplication.h> | 33 | #include <qpe/qpeapplication.h> |
32 | #else | 34 | #else |
33 | #include <qapplication.h> | 35 | #include <qapplication.h> |
34 | #endif | 36 | #endif |
35 | #include <qdir.h> | 37 | #include <qdir.h> |
36 | #include <qfile.h> | 38 | #include <qfile.h> |
37 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
38 | 40 | ||
39 | #include <opie/oprocess.h> | ||
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 | Ipkg :: Ipkg() | 45 | Ipkg :: Ipkg() |
46 | { | 46 | { |
47 | proc = 0; | 47 | proc = 0; |
48 | } | 48 | } |
49 | 49 | ||
50 | Ipkg :: ~Ipkg() | 50 | Ipkg :: ~Ipkg() |
51 | { | 51 | { |
52 | } | 52 | } |
@@ -355,25 +355,25 @@ void Ipkg::commandStderr(OProcess*, char *buffer, int buflen) | |||
355 | void Ipkg::processFinished() | 355 | void Ipkg::processFinished() |
356 | { | 356 | { |
357 | // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file | 357 | // Finally, if we are removing a package, remove its entry from the <destdir>/usr/lib/ipkg/status file |
358 | // to workaround an ipkg bug which stops reinstall to a different location | 358 | // to workaround an ipkg bug which stops reinstall to a different location |
359 | 359 | ||
360 | if ( !error && option == "remove" ) | 360 | if ( !error && option == "remove" ) |
361 | removeStatusEntry(); | 361 | removeStatusEntry(); |
362 | 362 | ||
363 | delete proc; | 363 | delete proc; |
364 | proc = 0; | 364 | proc = 0; |
365 | finished = true; | 365 | finished = true; |
366 | 366 | ||
367 | emit ipkgFinished(); | 367 | emit ipkgFinished(); |
368 | } | 368 | } |
369 | 369 | ||
370 | 370 | ||
371 | void Ipkg :: abort() | 371 | void Ipkg :: abort() |
372 | { | 372 | { |
373 | if ( proc ) | 373 | if ( proc ) |
374 | { | 374 | { |
375 | proc->kill(); | 375 | proc->kill(); |
376 | aborted = true; | 376 | aborted = true; |
377 | } | 377 | } |
378 | } | 378 | } |
379 | 379 | ||
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 | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
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> |
5 | .=l. Dan Williams <drw@handhelds.org> | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
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; |
@@ -46,59 +46,59 @@ | |||
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 | 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(OProcess*, char *buffer, int buflen); |
74 | void commandStderr(OProcess*, char *buffer, int buflen); | 74 | void commandStderr(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 | 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 179f8b7..b391714 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -20,19 +20,19 @@ | |||
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 <opie/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 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) | 38 | OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) |
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 | |||
@@ -1,10 +1,10 @@ | |||
1 | Package: opie-aqpkg | 1 | Package: opie-aqpkg |
2 | Files: plugins/application/libaqpkg.so* bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop | 2 | Files: plugins/application/libaqpkg.so* bin/aqpkg pics/aqpkg apps/Settings/aqpkg.desktop |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/settings | 4 | Section: opie/settings |
5 | Depends: task-opie-minimal | 5 | Depends: task-opie-minimal, libopiecore2, libopieui2 |
6 | Replaces: aqpkg | 6 | Replaces: aqpkg |
7 | Architecture: arm | 7 | Architecture: arm |
8 | Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) | 8 | Maintainer: Andy Qua (andy.qua@blueyonder.co.uk) |
9 | Description: A Package Manager | 9 | Description: A Package Manager |
10 | Version: $QPE_VERSION$EXTRAVERSION | 10 | Version: $QPE_VERSION$EXTRAVERSION |
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 | |||
@@ -1,46 +1,46 @@ | |||
1 | /* | 1 | /* |
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> |
5 | .=l. Dan Williams <drw@handhelds.org> | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
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 "settingsimpl.h" | 30 | #include "settingsimpl.h" |
31 | #include "global.h" | 31 | #include "global.h" |
32 | 32 | ||
33 | /* OPIE */ | 33 | /* OPIE */ |
34 | #include <opie/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> |
@@ -54,25 +54,25 @@ using namespace std; | |||
54 | 54 | ||
55 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) | 55 | SettingsImpl :: SettingsImpl( DataManager *dataManager, QWidget * parent, const char* name, bool modal, WFlags fl ) |
56 | : QDialog( parent, name, modal, fl ) | 56 | : QDialog( parent, name, modal, fl ) |
57 | { | 57 | { |
58 | setCaption( tr( "Configuration" ) ); | 58 | setCaption( tr( "Configuration" ) ); |
59 | 59 | ||
60 | // Setup layout to make everything pretty | 60 | // Setup layout to make everything pretty |
61 | QVBoxLayout *layout = new QVBoxLayout( this ); | 61 | QVBoxLayout *layout = new QVBoxLayout( this ); |
62 | layout->setMargin( 2 ); | 62 | layout->setMargin( 2 ); |
63 | layout->setSpacing( 4 ); | 63 | layout->setSpacing( 4 ); |
64 | 64 | ||
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 ); |
68 | 68 | ||
69 | tabwidget->addTab( initServerTab(), "aqpkg/servertab", tr( "Servers" ) ); | 69 | tabwidget->addTab( initServerTab(), "aqpkg/servertab", tr( "Servers" ) ); |
70 | tabwidget->addTab( initDestinationTab(), "aqpkg/desttab", tr( "Destinations" ) ); | 70 | tabwidget->addTab( initDestinationTab(), "aqpkg/desttab", tr( "Destinations" ) ); |
71 | tabwidget->addTab( initProxyTab(), "aqpkg/proxytab", tr( "Proxies" ) ); | 71 | tabwidget->addTab( initProxyTab(), "aqpkg/proxytab", tr( "Proxies" ) ); |
72 | tabwidget->setCurrentTab( tr( "Servers" ) ); | 72 | tabwidget->setCurrentTab( tr( "Servers" ) ); |
73 | 73 | ||
74 | dataMgr = dataManager; | 74 | dataMgr = dataManager; |
75 | setupData(); | 75 | setupData(); |
76 | changed = false; | 76 | changed = false; |
77 | newserver = false; | 77 | newserver = false; |
78 | newdestination = false; | 78 | newdestination = false; |