summaryrefslogtreecommitdiff
authortille <tille>2002-04-23 00:55:02 (UTC)
committer tille <tille>2002-04-23 00:55:02 (UTC)
commit7e8db7f310d7a43326337a7960e59d9e313b8534 (patch) (unidiff)
treef49953a68bea2ae6e54a10e57c4aa5f86eb3f50d
parent228dffdc2721ee13ca9491584d8cc46cd4807cc1 (diff)
downloadopie-7e8db7f310d7a43326337a7960e59d9e313b8534.zip
opie-7e8db7f310d7a43326337a7960e59d9e313b8534.tar.gz
opie-7e8db7f310d7a43326337a7960e59d9e313b8534.tar.bz2
no need to diff...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/main.cpp33
-rw-r--r--noncore/unsupported/oipkg/oipkg.pro12
-rw-r--r--noncore/unsupported/oipkg/opie-oipkg.control9
-rw-r--r--noncore/unsupported/oipkg/packagemanager.cpp897
-rw-r--r--noncore/unsupported/oipkg/packagemanager.h94
-rw-r--r--noncore/unsupported/oipkg/packagemanagerbase.ui268
-rw-r--r--noncore/unsupported/oipkg/pkdesc.ui96
-rw-r--r--noncore/unsupported/oipkg/pkfind.ui51
-rw-r--r--noncore/unsupported/oipkg/pksettings.ui176
9 files changed, 0 insertions, 1636 deletions
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp
deleted file mode 100644
index 96a5e8d..0000000
--- a/noncore/unsupported/oipkg/main.cpp
+++ b/dev/null
@@ -1,33 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "packagemanager.h"
22
23#include <qpe/qpeapplication.h>
24
25int main( int argc, char ** argv )
26{
27 QPEApplication a( argc, argv );
28
29 PackageManager mw;
30 a.showMainDocumentWidget( &mw );
31
32 return a.exec();
33}
diff --git a/noncore/unsupported/oipkg/oipkg.pro b/noncore/unsupported/oipkg/oipkg.pro
deleted file mode 100644
index 87f8c5d..0000000
--- a/noncore/unsupported/oipkg/oipkg.pro
+++ b/dev/null
@@ -1,12 +0,0 @@
1 DESTDIR = $(OPIEDIR)/bin
2 TEMPLATE= app
3 CONFIG = qt warn_on release
4 HEADERS = packagemanager.h
5 SOURCES = packagemanager.cpp \
6 main.cpp
7INCLUDEPATH += $(OPIEDIR)/include
8 DEPENDPATH+= $(OPIEDIR)/include
9LIBS += -lqpe
10 INTERFACES= packagemanagerbase.ui pkdesc.ui pkfind.ui pksettings.ui
11 TARGET = oipkg
12
diff --git a/noncore/unsupported/oipkg/opie-oipkg.control b/noncore/unsupported/oipkg/opie-oipkg.control
deleted file mode 100644
index a5fa508..0000000
--- a/noncore/unsupported/oipkg/opie-oipkg.control
+++ b/dev/null
@@ -1,9 +0,0 @@
1Files: bin/oipkg apps/Settings/oipkg.desktop
2Priority: optional
3Section: opie/settings
4Maintainer: Patrick Vogt <tille@almana.ch>
5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION)
8Description: Package Manager
9 A GUI front-end to ipkg for the Opie environment.
diff --git a/noncore/unsupported/oipkg/packagemanager.cpp b/noncore/unsupported/oipkg/packagemanager.cpp
deleted file mode 100644
index 642eae9..0000000
--- a/noncore/unsupported/oipkg/packagemanager.cpp
+++ b/dev/null
@@ -1,897 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "packagemanager.h"
21#include "pkdesc.h"
22#include "pkfind.h"
23#include "pksettings.h"
24
25#include <qpe/process.h>
26#include <qpe/resource.h>
27#include <qpe/stringutil.h>
28#include <qpe/qpeapplication.h>
29#include <qpe/qcopenvelope_qws.h>
30#include <qpe/applnk.h>
31
32#include <qprogressbar.h>
33#include <qcombobox.h>
34#include <qdict.h>
35#include <qfile.h>
36#include <qlineedit.h>
37#include <qpushbutton.h>
38#include <qlistview.h>
39#include <qlistbox.h>
40#include <qmessagebox.h>
41#include <qpainter.h>
42#include <qpixmap.h>
43#include <qregexp.h>
44#include <qtextstream.h>
45#include <qtextview.h>
46#include <qtoolbutton.h>
47
48#include <stdlib.h>
49
50static QPixmap *pm_uninstalled=0;
51static QPixmap *pm_installed=0;
52static QPixmap *pm_uninstall=0;
53static QPixmap *pm_install=0;
54
55
56class PackageItem : public QCheckListItem {
57 bool installed;
58public:
59 PackageItem(QListView* lv, const QString& name, const QString& desc, const QString& size, bool inst ) :
60 QCheckListItem(lv,name,CheckBox), installed(inst)
61 {
62 setText(1,desc);
63 setText(2,size);
64 }
65
66 void paintCell( QPainter *p, const QColorGroup & cg,
67 int column, int width, int alignment )
68 {
69 if ( !p )
70 return;
71
72 p->fillRect( 0, 0, width, height(),
73 isSelected()? cg.highlight() : cg.base() );
74
75 if ( column != 0 ) {
76 // The rest is text
77 QListViewItem::paintCell( p, cg, column, width, alignment );
78 return;
79 }
80
81 QListView *lv = listView();
82 if ( !lv )
83 return;
84 int marg = lv->itemMargin();
85 int r = marg;
86
87 QPixmap pm = statePixmap();
88 p->drawPixmap(marg,(height()-pm.height())/2,pm);
89 r += pm.width()+1;
90
91 p->translate( r, 0 );
92 QListViewItem::paintCell( p, cg, column, width - r, alignment );
93 }
94
95 void paintFocus( QPainter *p, const QColorGroup & cg,
96 const QRect & r )
97 {
98 // Skip QCheckListItem
99 // (makes you wonder what we're getting from QCheckListItem)
100 QListViewItem::paintFocus(p,cg,r);
101 }
102
103 QPixmap statePixmap() const
104 {
105 if ( !isOn() ) {
106 if ( !installed )
107 return *pm_uninstalled;
108 else
109 return *pm_installed;
110 } else {
111 if ( !installed )
112 return *pm_install;
113 else
114 return *pm_uninstall;
115 }
116 }
117
118 QString name() const { return text(0); }
119 QString description() const { return text(1); }
120 bool isInstalled() const { return installed; }
121
122 QString key( int column, bool ascending ) const
123 {
124 if ( column == 2 ) {
125 QString t = text(2);
126 double bytes=t.toDouble();
127 if ( t.contains('M') ) bytes*=1024*1024;
128 else if ( t.contains('K') || t.contains('k') ) bytes*=1024;
129 if ( !ascending ) bytes=999999999-bytes;
130 return QString().sprintf("%09d",(int)bytes);
131 } else {
132 return QListViewItem::key(column,ascending);
133 }
134 }
135};
136
137/*
138 * Constructs a PackageManager which is a child of 'parent', with the
139 * name 'name' and widget flags set to 'f'
140 */
141PackageManager::PackageManager( QWidget* parent, const char* name, WFlags fl )
142 : PackageManagerBase( parent, name, fl )
143{
144 settings = new PackageManagerSettings(this,0,TRUE);
145 connect( settings->newserver, SIGNAL(clicked()), this, SLOT(newServer()) );
146 connect( settings->removeserver, SIGNAL(clicked()), this, SLOT(removeServer()) );
147 connect( settings->servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
148 connect( doit, SIGNAL(clicked()), this, SLOT(doIt()) );
149 settings->servername->setEnabled(FALSE);
150 settings->serverurl->setEnabled(FALSE);
151 serverurl.setAutoDelete(TRUE);
152
153 if (!pm_uninstalled) {
154 pm_uninstalled = new QPixmap(Resource::loadPixmap("uninstalled"));
155 pm_installed = new QPixmap(Resource::loadPixmap("installed"));
156 pm_install = new QPixmap(Resource::loadPixmap("install"));
157 pm_uninstall = new QPixmap(Resource::loadPixmap("uninstall"));
158 }
159
160 QFontMetrics fm = fontMetrics();
161 int w0 = fm.width(PackageManagerBase::tr("Package"))+30;
162 int w2 = fm.width("00000")+4;
163 list->setColumnWidth(0,w0);
164 list->setColumnWidth(1,228-w2-w0); // ### screen-biased
165 list->setColumnWidth(2,w2);
166 list->setColumnWidthMode(0,QListView::Manual);
167 list->setColumnWidthMode(1,QListView::Manual);
168 list->setColumnWidthMode(2,QListView::Manual);
169 list->setSelectionMode( QListView::Multi );
170 details = 0;
171 ipkg_old = 0;
172 readSettings();
173 updatePackageList();
174 progress->hide();
175}
176
177
178/*
179 * Destroys the object and frees any allocated resources
180 */
181PackageManager::~PackageManager()
182{
183 // no need to delete child widgets, Qt does it all for us
184}
185
186void PackageManager::newServer()
187{
188 int i = settings->servers->count();
189 if ( settings->servername->isEnabled() || settings->serverurl->text().isEmpty() ) {
190 serverurl.insert(i,new QString("http://"));
191 settings->servers->insertItem(tr("New"));
192 } else {
193 // allows one-level undo
194 serverurl.insert(i,new QString(settings->serverurl->text()));
195 settings->servers->insertItem(settings->servername->text());
196 }
197 settings->servers->setSelected(i,TRUE);
198 editServer(i);
199}
200
201void PackageManager::editServer(int i)
202{
203 if ( settings->servername->isEnabled() ) {
204 disconnect( settings->servername, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)) );
205 disconnect( settings->serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(urlChanged(const QString&)) );
206 } else {
207 settings->servername->setEnabled(TRUE);
208 settings->serverurl->setEnabled(TRUE);
209 }
210
211 settings->servername->setText( settings->servers->text(i) );
212 settings->serverurl->setText( *serverurl[i] );
213
214 editedserver = i;
215
216 connect( settings->servername, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)) );
217 connect( settings->serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(urlChanged(const QString&)) );
218}
219
220void PackageManager::removeServer()
221{
222 disconnect( settings->servername, SIGNAL(textChanged(const QString&)), this, SLOT(nameChanged(const QString&)) );
223 disconnect( settings->serverurl, SIGNAL(textChanged(const QString&)), this, SLOT(urlChanged(const QString&)) );
224 settings->servername->setText(settings->servers->text(editedserver));
225 settings->serverurl->setText(*serverurl[editedserver]);
226 disconnect( settings->servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
227 settings->servers->removeItem(editedserver);
228 connect( settings->servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
229 settings->servername->setEnabled(FALSE);
230 settings->serverurl->setEnabled(FALSE);
231}
232
233void PackageManager::nameChanged(const QString& t)
234{
235 disconnect( settings->servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
236 settings->servers->changeItem( t, editedserver );
237 connect( settings->servers, SIGNAL(highlighted(int)), this, SLOT(editServer(int)) );
238}
239
240void PackageManager::urlChanged(const QString& t)
241{
242 serverurl.replace(editedserver, new QString(t));
243}
244
245static void selectComboItem(QComboBox *cb, const QString s)
246{
247 for (int i=0; i<cb->count(); i++) {
248 if ( cb->text(i) == s ) {
249 cb->setCurrentItem(i);
250 return;
251 }
252 }
253}
254
255void PackageManager::updatePackageList()
256{
257 disconnect(section,SIGNAL(activated(int)),this,SLOT(updatePackageList()));
258 disconnect(subsection,SIGNAL(activated(int)),this,SLOT(updatePackageList()));
259
260 list->clear();
261 QString cursection = section->currentText();
262 QString cursubsection = subsection->currentText();
263 QString all=tr("All");
264 if ( cursection == all ) cursection=QString::null;
265 if ( cursubsection == all ) cursubsection=QString::null;
266 section->clear();
267 subsection->clear();
268
269 QDict<void> sections;
270 QDict<void> subsections;
271 QDict<void> installed;
272
273 QRegExp separatorRegExp( ":[\t ]+" );
274
275 QString status = ipkgStatusOutput();
276 if ( !status.isEmpty() ) {
277 QStringList lines = QStringList::split('\n',status,TRUE);
278 QString name;
279 QString status;
280 for (QStringList::Iterator it = lines.begin(); it!=lines.end(); ++it) {
281 QString line = *it;
282 if ( line.length()<=1 ) {
283 // EOR
284 if ( !name.isEmpty() ) {
285 if ( status.contains(" installed") )
286 installed.replace(name,(void*)1);
287 name="";
288 }
289 status="";
290 } else if ( line[0] == ' ' || line[0] == '\t' ) {
291 // continuation
292 } else {
293 int sep = line.find(separatorRegExp);
294 if ( sep >= 0 ) {
295 QString tag = line.left(sep);
296 if ( tag == "Package" ) {
297 name = line.mid(sep+2).simplifyWhiteSpace();
298 } else if ( tag == "Status" ) {
299 status = line.mid(sep+1);
300 }
301 }
302 }
303 }
304 }
305
306 QString info = ipkgInfoOutput();
307 if ( !info.isEmpty() ) {
308 QStringList lines = QStringList::split('\n',info,TRUE);
309 QString description_short;
310 QString name;
311 QString size;
312 QString sec;
313 for (QStringList::Iterator it = lines.begin(); it!=lines.end(); ++it) {
314 QString line = *it;
315 if ( line.length()<=1 ) {
316 // EOR
317 if ( !name.isEmpty() ) {
318 int sl = sec.find('/');
319 QString s = sl < 0 ? sec : sec.left(sl);
320 QString ss = sl < 0 ? QString::null : sec.mid(sl+1);
321 sections.replace(s,(void*)1);
322 if ( cursection.isNull()
323 || cursection == s
324 && (cursubsection.isNull() || cursubsection == ss) )
325 {
326 if ( !cursection.isNull() && !ss.isNull() )
327 subsections.replace(ss,(void*)1);
328 description_short[0] = description_short[0].upper();
329 if ( description_short.left(4) == "The " )
330 description_short = description_short.mid(4);
331 if ( description_short.left(2) == "A " )
332 description_short = description_short.mid(2);
333 description_short[0] = description_short[0].upper();
334 new PackageItem(list,name,description_short,size,
335 installed.find(name));
336 }
337 installed.remove( name );
338 }
339 name="";
340 size="";
341 sec="main";
342 } else if ( line[0] == ' ' || line[0] == '\t' ) {
343 // continuation
344 } else {
345 int sep = line.find(separatorRegExp);
346 if ( sep >= 0 ) {
347 QString tag = line.left(sep);
348 if ( tag == "Package" ) {
349 name = line.mid(sep+2).simplifyWhiteSpace();
350 } else if ( tag == "Description" ) {
351 description_short = line.mid(sep+2).simplifyWhiteSpace();
352 } else if ( tag == "Installed-Size" ) {
353 size = line.mid(sep+2).simplifyWhiteSpace();
354 } else if ( tag == "Section" ) {
355 sec = line.mid(sep+2).simplifyWhiteSpace();
356 }
357 }
358 }
359 }
360 if ( installed.count() && cursection.isNull() ) {
361 // we have some packages without description
362 QDictIterator<void> it( installed );
363 for( ; it.current(); ++it )
364 new PackageItem( list, it.currentKey(), "", "?" , TRUE );
365 }
366
367 QStringList s;
368 QDictIterator<void> it( sections );
369 for( ; it.current(); ++it )
370 s.append(it.currentKey());
371 s.sort();
372 section->insertItem(all);
373 section->insertStringList(s);
374 selectComboItem(section,cursection.isNull()?all:cursection);
375 if ( cursection.isNull() ) {
376 subsection->setEnabled(FALSE);
377 } else {
378 subsection->setEnabled(TRUE);
379 QStringList s;
380 QDictIterator<void> it( subsections );
381 for( ; it.current(); ++it )
382 s.append(it.currentKey());
383 s.sort();
384 subsection->insertItem(all);
385 subsection->insertStringList(s);
386 selectComboItem(subsection,cursubsection.isNull()?all:cursubsection);
387 }
388 } else {
389 new QListViewItem(list,"ERROR");
390 }
391
392 connect(section,SIGNAL(activated(int)),SLOT(updatePackageList()));
393 connect(subsection,SIGNAL(activated(int)),this,SLOT(updatePackageList()));
394}
395
396PackageItem* PackageManager::current() const
397{
398 return (PackageItem*)list->currentItem();
399}
400
401/*
402 * public slot
403 */
404void PackageManager::doCurrentDetails(bool multi)
405{
406 PackageItem* pit = current();
407 if ( pit ) {
408 if ( !details ) {
409 details = new PackageDetails;
410 connect( details->install, SIGNAL(clicked()),
411 this, SLOT(installCurrent()));
412 connect( details->remove, SIGNAL(clicked()),
413 this, SLOT(removeCurrent()));
414 details->description->setTextFormat(RichText);
415 }
416 if ( multi ) {
417 disconnect( details->ignore, SIGNAL(clicked()),
418 details, SLOT(close()));
419 connect( details->ignore, SIGNAL(clicked()),
420 this, SLOT(doNextDetails()));
421 } else {
422 disconnect( details->ignore, SIGNAL(clicked()),
423 this, SLOT(doNextDetails()));
424 connect( details->ignore, SIGNAL(clicked()),
425 details, SLOT(close()));
426 }
427 pit->setSelected(FALSE);
428 details->setCaption("Package: " + pit->name());
429 details->description->setText(fullDetails(pit->name()));
430 details->install->setEnabled(!pit->isInstalled());
431 details->remove->setEnabled(pit->isInstalled());
432 details->showMaximized();
433 }
434}
435
436void PackageManager::doDetails()
437{
438 doCurrentDetails(FALSE);
439}
440
441void PackageManager::doNextDetails()
442{
443 QListViewItem* i = list->firstChild();
444 for ( ; i; i = i->nextSibling() ) {
445 if ( i->isSelected() )
446 break;
447 }
448 list->setCurrentItem(i);
449 if ( i ) {
450 doCurrentDetails(TRUE);
451 } else if ( details )
452 details->close();
453}
454
455QString PackageManager::fullDetails(const QString& pk)
456{
457 QString status;
458 Process ipkg_status(QStringList() << "ipkg" << "info" << pk);
459 if ( ipkg_status.exec("",status) ) {
460 QStringList lines = QStringList::split('\n',status,TRUE);
461 QString description;
462 for (QStringList::Iterator it = lines.begin(); it!=lines.end(); ++it) {
463 QString line = *it;
464 if ( line == " ." ) {
465 description.append("<p>");
466 } else if ( line[0] == ' ' || line[0] == '\t' ) {
467 // continuation
468 description.append(" ");
469 description.append(Qtopia::escapeString(line));
470 } else {
471 int sep = line.find(QRegExp(":[\t ]+"));
472 if ( sep >= 0 ) {
473 QString tag = line.left(sep);
474 description.append("<br>");
475 description.append("<b>");
476 description.append(Qtopia::escapeString(tag));
477 description.append(":</b> ");
478 description.append(Qtopia::escapeString(line.mid(sep+2)));
479 } else {
480 description.append(" ");
481 description.append(Qtopia::escapeString(line));
482 }
483 }
484 }
485 return description;
486 }
487
488 return QString::null;
489}
490
491void PackageManager::installCurrent()
492{
493 current()->setOn(TRUE);
494 details->close();
495}
496
497void PackageManager::removeCurrent()
498{
499 current()->setOn(TRUE);
500 details->close();
501}
502
503bool PackageManager::readIpkgConfig(const QString& conffile)
504{
505 QFile conf(conffile);
506 if ( conf.open(IO_ReadOnly) ) {
507 QTextStream s(&conf);
508 settings->servers->clear();
509 serverurl.clear();
510 ipkg_old=0;
511 int currentserver=0;
512 while ( !s.atEnd() ) {
513 QString l = s.readLine();
514 QStringList token = QStringList::split(' ', l);
515 if ( token[0] == "src" || token[0] == "#src" ) {
516 currentserver=settings->servers->count();
517 serverurl.insert(settings->servers->count(),new QString(token[2]));
518 int a = token[0] == "src" ? 1 : 0;
519 int i = settings->servers->count();
520 settings->servers->insertItem(token[1]);
521 settings->servers->setSelected(i,a);
522 } else if ( token[0] == "dest" ) {
523 // needs UI
524 } else if ( token[0] == "option" ) {
525 // ### somehow need to use the settings from netsetup
526 // if ( token[1] == "http_proxy" )
527 // settings->http->setText(token[2]);
528 // else if ( token[1] == "ftp_proxy" )
529 // settings->ftp->setText(token[2]);
530 // else if ( token[1] == "proxy_username" )
531 // settings->username->setText(token[2]);
532 // else if ( token[1] == "proxy_password" )
533 // settings->password->setText(token[2]);
534 } else {
535 // Old style?
536 int eq = l.find('=');
537 if ( eq >= 0 ) {
538 QString v = l.mid(eq+1).stripWhiteSpace();
539 if ( v[0] == '"' || v[0] == '\'' ) {
540 int cl=v.find(v[0],1);
541 if ( cl >= 0 )
542 v = v.mid(1,cl-1);
543 }
544 if ( l.left(12) == "IPKG_SOURCE=" ) {
545 ipkg_old=1;
546 currentserver=settings->servers->count();
547 serverurl.insert(settings->servers->count(),new QString(v));
548 settings->servers->insertItem(v);
549 } else if ( l.left(13) == "#IPKG_SOURCE=" ) {
550 serverurl.insert(settings->servers->count(),new QString(v));
551 settings->servers->insertItem(v);
552 } else if ( l.left(10) == "IPKG_ROOT=" ) {
553 // ### no UI
554 // } else if ( l.left(20) == "IPKG_PROXY_USERNAME=" ) {
555 // settings->username->setText(v);
556 // } else if ( l.left(20) == "IPKG_PROXY_PASSWORD=" ) {
557 // settings->password->setText(v);
558 // } else if ( l.left(16) == "IPKG_PROXY_HTTP=" ) {
559 // settings->http->setText(v);
560 // } else if ( l.left(16) == "IPKG_PROXY_FTP=" ) {
561 // settings->ftp->setText(v);
562 }
563 }
564 }
565 }
566 if ( ipkg_old ) {
567 settings->servers->setSelectionMode(QListBox::Single);
568 settings->servers->setSelected(currentserver,TRUE);
569 }
570 return TRUE;
571 } else {
572 return FALSE;
573 }
574}
575
576/*
577 * public slot
578 */
579void PackageManager::doSettings()
580{
581 settings->showMaximized();
582 if ( settings->exec() ) {
583 writeSettings();
584 startRun();
585 runIpkg("update");
586 endRun();
587 updatePackageList();
588 } else {
589 readSettings();
590 }
591}
592
593void PackageManager::readSettings()
594{
595 // read from config file(s)
596 readIpkgConfig("/etc/ipkg.conf");
597}
598
599void PackageManager::writeSettings()
600{
601 QFile conf("/etc/ipkg.conf");
602 if ( conf.open(IO_WriteOnly) ) {
603 QTextStream s(&conf);
604 s << "# Written by Qtopia Package Manager\n";
605 if ( !ipkg_old ) {
606 for (int i=0; i<(int)settings->servers->count(); i++) {
607 QString url = serverurl[i] ? *serverurl[i] : QString("???");
608 // if ( !settings->servers->isSelected(i) )
609 // s << "#";
610 s << "src " << settings->servers->text(i) << " " << url << "\n";
611 }
612 s << "dest root /\n"; // ### need UI
613 // if ( !settings->username->text().isEmpty() )
614 // s << "option proxy_username " << settings->username->text() << "\n";
615 // if ( !settings->password->text().isEmpty() )
616 // s << "option proxy_password " << settings->password->text() << "\n";
617 // if ( !settings->http->text().isEmpty() )
618 // s << "option http_proxy " << settings->http->text() << "\n";
619 // if ( !settings->ftp->text().isEmpty() )
620 // s << "option ftp_proxy " << settings->ftp->text() << "\n";
621 } else {
622 // Old style
623 bool src_selected=FALSE;
624 for (int i=0; i<(int)settings->servers->count(); i++) {
625 if ( settings->servers->isSelected(i) ) {
626 src_selected=TRUE;
627 } else {
628 s << "#";
629 }
630 s << "IPKG_SOURCE=\"" << settings->servers->text(i) << "\"\n";
631 }
632 if ( !src_selected )
633 s << "IPKG_SOURCE=\"" << settings->servers->currentText() << "\"\n";
634 s << "IPKG_ROOT=/\n"
635 // << "IPKG_PROXY_USERNAME=\"" << settings->username->text() << "\"\n"
636 // << "IPKG_PROXY_PASSWORD=\"" << settings->password->text() << "\"\n"
637 // << "IPKG_PROXY_HTTP=\"" << settings->http->text() << "\"\n"
638 // << "IPKG_PROXY_FTP=\"" << settings->ftp->text() << "\"\n"
639 ;
640 }
641 conf.close();
642 }
643}
644
645/*
646 * public slot
647 */
648void PackageManager::doFind()
649{
650 Search s(this, 0, TRUE);
651 if ( s.exec() ) {
652 QString p = s.pattern->text();
653 if ( p.isEmpty() ) {
654 list->selectAll(FALSE);
655 } else {
656 selectPackages(findPackages(p));
657 doNextDetails();
658 }
659 }
660}
661
662void PackageManager::selectPackages( const QStringList& l )
663{
664 QDict<void> d;
665 for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
666 d.replace(*it,(void*)1);
667 QListViewItem* i;
668 for ( i = list->firstChild(); i; i = i->nextSibling() ) {
669 PackageItem* pit = (PackageItem*)i;
670 i->setSelected( d[pit->name()] );
671 }
672}
673
674QStringList PackageManager::findPackages( const QRegExp& r )
675{
676 QStringList matches;
677
678 QString info = ipkgInfoOutput();
679 if ( !info.isEmpty() ) {
680 QStringList lines = QStringList::split('\n',info,TRUE);
681 QRegExp re = r;
682 QString description="";
683 QString name;
684 for (QStringList::Iterator it = lines.begin(); it!=lines.end(); ++it) {
685 QString line = *it;
686 if ( line.length()<=1 ) {
687 // EOR
688 if ( re.match(description) >= 0 )
689 matches.append(name);
690 description="";
691 name="";
692 } else if ( line[0] == ' ' || line[0] == '\t' ) {
693 // continuation
694 description.append(" ");
695 description.append(Qtopia::escapeString(line));
696 } else {
697 int sep = line.find(QRegExp(":[\t ]+"));
698 if ( sep >= 0 ) {
699 QString tag = line.left(sep);
700 if ( tag == "Package" )
701 name = line.mid(sep+2).simplifyWhiteSpace();
702 if ( !description.isEmpty() )
703 description.append("<br>");
704 description.append("<b>");
705 description.append(Qtopia::escapeString(tag));
706 description.append(":</b> ");
707 description.append(Qtopia::escapeString(line.mid(sep+2)));
708 }
709 }
710 }
711 }
712
713 return matches;
714}
715
716/*
717 * public slot
718 */
719void PackageManager::doUpgrade()
720{
721 startMultiRun(2);
722 runIpkg("update");
723 runIpkg("upgrade");
724 updatePackageList();
725 endRun();
726}
727
728
729void PackageManager::doIt()
730{
731 bool ok = commitWithIpkg();
732 updatePackageList(); // things may have changed
733 if (!ok) qApp->beep();
734}
735
736bool PackageManager::commitWithIpkg()
737{
738 // A full implementation would do the following, but we'll just do
739 // it simply and non-interactively for now.
740 //
741 // setenv IPKG_CONF_DIR for a null $IPKG_CONF_DIR/ipkg.conf
742 // setenv IPKG_SOURCE, IPKG_ROOT, etc.
743 // run ipkg, processing interactivity as dialogs
744 // - "... (Y/I/N/O/D) [default=N] ?" -> ...
745 // - "[Press ENTER to continue]" (if D chosen above)
746 // - "The following packages are marked `Essential'... Install them now [Y/n] ?"
747 // - "The following packages...ready to be installed:... Install them now [Y/n] ?"
748 // return FALSE cancelled
749
750 QStringList to_remove, to_install;
751
752 for ( QListViewItem* i = list->firstChild(); i; i = i->nextSibling() ) {
753 PackageItem* pit = (PackageItem*)i;
754 if ( pit->isOn() ) {
755 if ( pit->isInstalled() )
756 to_remove.append(pit->name());
757 else
758 to_install.append(pit->name());
759 }
760 }
761
762 bool ok=TRUE;
763
764 int jobs = to_remove.count()+to_install.count();
765 if ( jobs ) {
766 startMultiRun(jobs);
767
768 if ( to_remove.count() ) {
769 for (QStringList::ConstIterator it=to_remove.begin(); it!=to_remove.end(); ++it) {
770 if ( runIpkg("remove " + *it) != 0 ) {
771 ok = FALSE;
772 }
773 }
774 }
775 if ( to_install.count() ) {
776 for (QStringList::ConstIterator it=to_install.begin(); it!=to_install.end(); ++it) {
777 if ( runIpkg("install " + *it) != 0 ) {
778 ok = FALSE;
779 }
780 }
781 }
782
783 // ##### If we looked in the list of files, we could send out accurate
784 // ##### messages. But we don't bother yet, and just do an "all".
785 QCopEnvelope e("QPE/System", "linkChanged(QString)");
786 QString lf = QString::null;
787 e << lf;
788
789#if QT_VERSION > 230 // a bug breaks this otherwise
790 if ( !ok )
791 QMessageBox::warning(this, "Error", "<p><tt>ipkg</tt> says something went wrong. Sorry.");
792#endif
793
794 endRun();
795 }
796
797 return ok;
798}
799
800QString PackageManager::ipkgStatusOutput()
801{
802 if ( cachedIpkgStatusOutput.isEmpty() ) {
803 Process ipkg_status( QStringList() << "ipkg" << "status" );
804 ipkg_status.exec( 0, cachedIpkgStatusOutput );
805 }
806 return QString::fromLocal8Bit( cachedIpkgStatusOutput );
807}
808
809QString PackageManager::ipkgInfoOutput()
810{
811 if ( cachedIpkgInfoOutput.isEmpty() ) {
812 Process ipkg_info( QStringList() << "ipkg" << "info" );
813 ipkg_info.exec( 0, cachedIpkgInfoOutput );
814 }
815 return QString::fromLocal8Bit( cachedIpkgInfoOutput );
816}
817
818void PackageManager::setCachedIpkgOutputDirty()
819{
820 cachedIpkgInfoOutput = cachedIpkgStatusOutput = QString::null;
821}
822
823void PackageManager::startMultiRun(int jobs)
824{
825 startRun();
826 progress->setTotalSteps(jobs);
827 progress->setProgress(0);
828}
829
830void PackageManager::startRun()
831{
832 progress->show();
833 doit->hide();
834}
835
836void PackageManager::endRun()
837{
838 doit->show();
839 progress->hide();
840}
841
842int PackageManager::runIpkg(const QString& args)
843{
844 if ( progress->progress() == -1 )
845 startMultiRun(1);
846 else
847 startRun();
848 QString cmd = "ipkg ";
849 if ( ipkg_old )
850 cmd += "</dev/null ";
851 else
852 cmd += "-force-defaults ";
853 int r = system((cmd+args).latin1());
854 progress->setProgress(progress->progress()+1);
855 setCachedIpkgOutputDirty();
856 endRun();
857 return r;
858}
859
860// simple hack to get support for ipkg mimetype
861void PackageManager::maybeInstall( const QString &ipk )
862{
863 int pos = ipk.findRev( "/" );
864 QString package = ipk.mid( pos + 1 );
865 pos = package.find ( "_" );
866 if ( pos != -1 )
867 package = package.left( pos );
868 switch ( QMessageBox::information( 0, tr( "Install Package" ),
869 tr("Are you sure you want to\ninstall package\n\n%1")
870 .arg(package), QMessageBox::Yes,
871 QMessageBox::No|QMessageBox::Default|QMessageBox::Escape, 0 ) ) {
872 case QMessageBox::Yes: {
873 startRun();
874 runIpkg("install " + ipk );
875 QCopEnvelope e("QPE/System", "linkChanged(QString)");
876 QString lf = QString::null;
877 e << lf;
878 endRun();
879 }
880 break;
881 case QMessageBox::No:
882 default:
883 // do nothing
884 break;
885 }
886}
887
888void PackageManager::setDocument(const QString& fileref)
889{
890 if ( fileref.isNull() )
891 return;
892 DocLnk doc( fileref );
893 if ( doc.file().isEmpty() )
894 return;
895 maybeInstall( doc.file() );
896 updatePackageList();
897}
diff --git a/noncore/unsupported/oipkg/packagemanager.h b/noncore/unsupported/oipkg/packagemanager.h
deleted file mode 100644
index a3f89d0..0000000
--- a/noncore/unsupported/oipkg/packagemanager.h
+++ b/dev/null
@@ -1,94 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef PACKAGEMANAGER_H
21#define PACKAGEMANAGER_H
22#include "packagemanagerbase.h"
23#include <qintdict.h>
24
25class PackageItem;
26class PackageDetails;
27class PackageManagerSettings;
28
29class PackageManager : public PackageManagerBase
30{
31 Q_OBJECT
32
33public:
34 PackageManager( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
35 ~PackageManager();
36
37
38public slots:
39 void doDetails();
40 void doSettings();
41 void doFind();
42 void doUpgrade();
43 void setDocument(const QString& fileref);
44
45protected slots:
46 void doIt();
47
48private slots:
49 void installCurrent();
50 void removeCurrent();
51 void doNextDetails();
52
53 void newServer();
54 void editServer(int);
55 void removeServer();
56 void nameChanged(const QString&);
57 void urlChanged(const QString&);
58 void updatePackageList();
59
60private:
61 void maybeInstall( const QString &ipk );
62 void startRun();
63 void endRun();
64 void startMultiRun(int jobs);
65 int runIpkg(const QString& args);
66 QString fullDetails(const QString& pk);
67
68 bool readIpkgConfig(const QString& conffile);
69
70 void doCurrentDetails(bool);
71 PackageItem* current() const;
72
73 QStringList findPackages( const QRegExp& re );
74 void selectPackages( const QStringList& l );
75
76 bool commitWithIpkg();
77
78 QString ipkgStatusOutput();
79 QString ipkgInfoOutput();
80 void setCachedIpkgOutputDirty();
81
82 PackageManagerSettings* settings;
83 QIntDict<QString> serverurl;
84 int editedserver;
85 int ipkg_old;
86 void writeSettings();
87 void readSettings();
88
89 PackageDetails* details;
90 QCString cachedIpkgStatusOutput;
91 QCString cachedIpkgInfoOutput;
92};
93
94#endif // PACKAGEMANAGER_H
diff --git a/noncore/unsupported/oipkg/packagemanagerbase.ui b/noncore/unsupported/oipkg/packagemanagerbase.ui
deleted file mode 100644
index 9d5a178..0000000
--- a/noncore/unsupported/oipkg/packagemanagerbase.ui
+++ b/dev/null
@@ -1,268 +0,0 @@
1<!DOCTYPE UI><UI>
2<class>PackageManagerBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Form1</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>257</width>
15 <height>290</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Package Manager</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <grid>
29 <property stdset="1">
30 <name>margin</name>
31 <number>3</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>3</number>
36 </property>
37 <widget row="0" column="0" >
38 <class>QLabel</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>TextLabel1</cstring>
42 </property>
43 <property stdset="1">
44 <name>text</name>
45 <string>Section:</string>
46 </property>
47 </widget>
48 <widget row="2" column="0" rowspan="1" colspan="3" >
49 <class>QLayoutWidget</class>
50 <property stdset="1">
51 <name>name</name>
52 <cstring>Layout1</cstring>
53 </property>
54 <property>
55 <name>layoutSpacing</name>
56 </property>
57 <hbox>
58 <property stdset="1">
59 <name>margin</name>
60 <number>0</number>
61 </property>
62 <property stdset="1">
63 <name>spacing</name>
64 <number>4</number>
65 </property>
66 <widget>
67 <class>QToolButton</class>
68 <property stdset="1">
69 <name>name</name>
70 <cstring>upgrade</cstring>
71 </property>
72 <property stdset="1">
73 <name>text</name>
74 <string>Upgrade all</string>
75 </property>
76 </widget>
77 <widget>
78 <class>QToolButton</class>
79 <property stdset="1">
80 <name>name</name>
81 <cstring>doit</cstring>
82 </property>
83 <property stdset="1">
84 <name>sizePolicy</name>
85 <sizepolicy>
86 <hsizetype>7</hsizetype>
87 <vsizetype>0</vsizetype>
88 </sizepolicy>
89 </property>
90 <property stdset="1">
91 <name>text</name>
92 <string>Do it!</string>
93 </property>
94 </widget>
95 <widget>
96 <class>QProgressBar</class>
97 <property stdset="1">
98 <name>name</name>
99 <cstring>progress</cstring>
100 </property>
101 </widget>
102 <widget>
103 <class>QToolButton</class>
104 <property stdset="1">
105 <name>name</name>
106 <cstring>settings_btn</cstring>
107 </property>
108 <property stdset="1">
109 <name>text</name>
110 <string></string>
111 </property>
112 <property stdset="1">
113 <name>pixmap</name>
114 <pixmap>image0</pixmap>
115 </property>
116 </widget>
117 <widget>
118 <class>QToolButton</class>
119 <property stdset="1">
120 <name>name</name>
121 <cstring>find_btn</cstring>
122 </property>
123 <property stdset="1">
124 <name>text</name>
125 <string></string>
126 </property>
127 <property stdset="1">
128 <name>pixmap</name>
129 <pixmap>image1</pixmap>
130 </property>
131 </widget>
132 <widget>
133 <class>QToolButton</class>
134 <property stdset="1">
135 <name>name</name>
136 <cstring>info_btn</cstring>
137 </property>
138 <property stdset="1">
139 <name>text</name>
140 <string></string>
141 </property>
142 <property stdset="1">
143 <name>pixmap</name>
144 <pixmap>image2</pixmap>
145 </property>
146 </widget>
147 </hbox>
148 </widget>
149 <widget row="0" column="2" >
150 <class>QComboBox</class>
151 <property stdset="1">
152 <name>name</name>
153 <cstring>subsection</cstring>
154 </property>
155 </widget>
156 <widget row="0" column="1" >
157 <class>QComboBox</class>
158 <property stdset="1">
159 <name>name</name>
160 <cstring>section</cstring>
161 </property>
162 </widget>
163 <widget row="1" column="0" rowspan="1" colspan="3" >
164 <class>QListView</class>
165 <column>
166 <property>
167 <name>text</name>
168 <string>Package</string>
169 </property>
170 <property>
171 <name>clickable</name>
172 <bool>true</bool>
173 </property>
174 <property>
175 <name>resizeable</name>
176 <bool>true</bool>
177 </property>
178 </column>
179 <column>
180 <property>
181 <name>text</name>
182 <string>Description</string>
183 </property>
184 <property>
185 <name>clickable</name>
186 <bool>true</bool>
187 </property>
188 <property>
189 <name>resizeable</name>
190 <bool>true</bool>
191 </property>
192 </column>
193 <column>
194 <property>
195 <name>text</name>
196 <string>Size</string>
197 </property>
198 <property>
199 <name>clickable</name>
200 <bool>true</bool>
201 </property>
202 <property>
203 <name>resizeable</name>
204 <bool>true</bool>
205 </property>
206 </column>
207 <property stdset="1">
208 <name>name</name>
209 <cstring>list</cstring>
210 </property>
211 <property stdset="1">
212 <name>allColumnsShowFocus</name>
213 <bool>true</bool>
214 </property>
215 </widget>
216 </grid>
217</widget>
218<images>
219 <image>
220 <name>image0</name>
221 <data format="XPM.GZ" length="1897">789c5dd3c972db381006e0bb9f82e5beb9527fb88baca939387b9c7851363b49e50082a4e445966dc98b3c35ef3e602f4c3cd6e9d3df683420f8f94e7472b41fed3cdf5aadddfad4477eee6ea29df676b1d8fcfcf5f73f5bdb491a2559546751bafd6c6b7bba8e7c74b0bcec0660124031ff0d26cfaec2474c6aaf6e4757bcbe1e9cc4630e7162fd66a3a5be50e7ea925d9969aeae34ff31388dd3d081f373752ec66f4bfd2b766da61b732af547ea4aebdfa8bde4b41a9c2559acf907b3aebf505bbf4fec7a7433ba663b7396b0cfd495fa44adfbe3ed68599f9b33f1f7c17932d6bf16e7b1d64fd5364f6b96fde896edf24aeb63b3e6976add9feecdb9e4fd68c7ebbbc1456a392a711117fcd8b05417da9fefaf70a31bb3d66fd4b59ed79bb5ff5cdd6afddde0322d139defc12c392dd585e61bb3e60bb62b751e9c9a0b39dfcc5cca7ed7ea5a723a339762cb6d3e9e679295added70bb3e62bf144e7c737b3e62fcd938c9daaedbe0e464bff477633a9f57c4e5c59bf2f83ab2c58ea0fcd15f7a735bba96a9df7caacf564ae1a36bfa7dad7addc0f3d9a6bcf39ffffb9dc252e67f37d3bef3ab92ff07e4ddb383ddf9eba9379c0efd1173ed5fc585dfa82f7e3dfdfb7c12de7fc5edba22d6bd98fdf6bdbb5e1c2b99e7fdfaeec529defa3ba54bf63779dd379b3c17dd9757dc9fe2aee53cd3f8fe6f5b4cbeec3373dbb53f792233137b27e7fb4ccffdeace7bb1a2db9f5efe53cd3b57d407068e0d1a2432f196698e3146738c70516b8c41257b896df052bac718b3bdce3019b903c62172fe4cde1155ee30ddee21dde630f1ff011fb38d09e8738c2149fc2b77bf88c2ff81ab26f360b8ec31427f88e1f884396842cfd3d2732e428506212b2fd3fd7715aa12610910b49f2e7bae99a1af2d492474cddffd7514f331434a3399d3edd2f6467744e17b4a04b5ad2155d3fd9ef986e688515ade9364c7bf8f43ee92eacbda707dad023ed6efffbd7d67f2c679e40</data>
222 </image>
223 <image>
224 <name>image1</name>
225 <data format="XPM.GZ" length="1182">789c55d34b739b301007f0bb3f05636e9e0e0181304ca78724b6f3b4e3043b76d2e94148c28f183b7ec7e9f4bb97d52ea4151cf4fbaf249619386b58e37ed76a9cd5b63bb19b494b4ec5c66aa87d9e9f7efefaf1bb56f702abb8796c79f56fb5ba6349abb75a6a9827c5dc76cd008e8801726c18c105ec1225f205e8b965b583840b288901d2368c0a9ac58218211551225320733dc9ccde47a01f33c962200372e613ef91dce50cd82772e4aba1085cdfbc7b0fc91517c00130644184d52b64e88566ef3b918766b126c6589d5734d536304a632f0e804fc038682aacee0ca5283a017e0285145a48e0033265a9a9ce88213200a641445dad916535238a54018740c963afe9037da410d89547d4d8c60752869203af89027947d4d29cec1aaa983753e033326578540b592ebe45aa5099a34e40c59550e6abbb216ae4a5a12eab2ba466c88b923a041e892172020420df2a9abd53a2409e1335726ba8339699bd076288dc130572032c6ac4bc62065c1a662517c40ce938b64885908e1926513a9b4c67735125f6fc6db1c897ab775926729d2ff27c53fcd465924e8a607f387e548938eef3c3f6789a7d259fdbf3e9c565ab6d9749e7eafae6b675b7beef564f17bdf6faa1dd7f7c4acac4e988a2c1ee60f89c94493146e3d1cbabeb255f493192840dfde4dfa48806c1ff09644efdcff7da5f08a60ed0</data>
226 </image>
227 <image>
228 <name>image2</name>
229 <data format="XPM.GZ" length="702">789c7dd1c96ac3301006e0bb9f4224b75092d891b550fa082d3d164a0f238d27abb33a1ba5ef5ecfd89098868e7cd0f75b23c97834501fefaf6a304a0e1554f3a8e20cf66a80c7b2bc7e7ebd7c27bd54abfac9ac4a7b4f496fa8a27adbac0b9e633def8fa5986b66ea783067cccc672ef3cc0d53a77aac659f8310b4d3c03c330d98dc08fb2db1e19c692736b513e652186c6e0373d7d2378c4c37b1e864f1b1617d29e145189c77b2f8da121bae985efbd46be6b665de300863cdc88496be61c5840800c282197430417a17420c10907962c63c9a98334b214688f276cac4820773cf244319192609a5e48f74ea9fa40f21e27d52f016d3d92d99132d80086ec97255ae3744dbbb2ec4dd9e4abc4f0e441576926379c2ce5978be5cbbc9704b84dd1bc29f64d8f43cfcae9fe7e417c79f9e92</data>
230 </image>
231</images>
232<connections>
233 <connection>
234 <sender>settings_btn</sender>
235 <signal>clicked()</signal>
236 <receiver>Form1</receiver>
237 <slot>doSettings()</slot>
238 </connection>
239 <connection>
240 <sender>find_btn</sender>
241 <signal>clicked()</signal>
242 <receiver>Form1</receiver>
243 <slot>doFind()</slot>
244 </connection>
245 <connection>
246 <sender>info_btn</sender>
247 <signal>clicked()</signal>
248 <receiver>Form1</receiver>
249 <slot>doDetails()</slot>
250 </connection>
251 <connection>
252 <sender>list</sender>
253 <signal>doubleClicked(QListViewItem*)</signal>
254 <receiver>Form1</receiver>
255 <slot>doDetails()</slot>
256 </connection>
257 <connection>
258 <sender>upgrade</sender>
259 <signal>clicked()</signal>
260 <receiver>Form1</receiver>
261 <slot>doUpgrade()</slot>
262 </connection>
263 <slot access="public">doFind()</slot>
264 <slot access="public">doDetails()</slot>
265 <slot access="public">doSettings()</slot>
266 <slot access="public">doUpgrade()</slot>
267</connections>
268</UI>
diff --git a/noncore/unsupported/oipkg/pkdesc.ui b/noncore/unsupported/oipkg/pkdesc.ui
deleted file mode 100644
index 494d3d6..0000000
--- a/noncore/unsupported/oipkg/pkdesc.ui
+++ b/dev/null
@@ -1,96 +0,0 @@
1<!DOCTYPE UI><UI>
2<class>PackageDetails</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Form7</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>221</width>
15 <height>291</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>(pkgname)</string>
21 </property>
22 <property>
23 <name>layoutMargin</name>
24 </property>
25 <property>
26 <name>layoutSpacing</name>
27 </property>
28 <vbox>
29 <property stdset="1">
30 <name>margin</name>
31 <number>6</number>
32 </property>
33 <property stdset="1">
34 <name>spacing</name>
35 <number>3</number>
36 </property>
37 <widget>
38 <class>QTextView</class>
39 <property stdset="1">
40 <name>name</name>
41 <cstring>description</cstring>
42 </property>
43 </widget>
44 <widget>
45 <class>QLayoutWidget</class>
46 <property stdset="1">
47 <name>name</name>
48 <cstring>Layout4</cstring>
49 </property>
50 <hbox>
51 <property stdset="1">
52 <name>margin</name>
53 <number>0</number>
54 </property>
55 <property stdset="1">
56 <name>spacing</name>
57 <number>6</number>
58 </property>
59 <widget>
60 <class>QToolButton</class>
61 <property stdset="1">
62 <name>name</name>
63 <cstring>install</cstring>
64 </property>
65 <property stdset="1">
66 <name>text</name>
67 <string>Install</string>
68 </property>
69 </widget>
70 <widget>
71 <class>QToolButton</class>
72 <property stdset="1">
73 <name>name</name>
74 <cstring>remove</cstring>
75 </property>
76 <property stdset="1">
77 <name>text</name>
78 <string>Remove</string>
79 </property>
80 </widget>
81 <widget>
82 <class>QToolButton</class>
83 <property stdset="1">
84 <name>name</name>
85 <cstring>ignore</cstring>
86 </property>
87 <property stdset="1">
88 <name>text</name>
89 <string>Ignore</string>
90 </property>
91 </widget>
92 </hbox>
93 </widget>
94 </vbox>
95</widget>
96</UI>
diff --git a/noncore/unsupported/oipkg/pkfind.ui b/noncore/unsupported/oipkg/pkfind.ui
deleted file mode 100644
index 7a24c00..0000000
--- a/noncore/unsupported/oipkg/pkfind.ui
+++ b/dev/null
@@ -1,51 +0,0 @@
1<!DOCTYPE UI><UI>
2<class>Search</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Form5</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>196</width>
15 <height>55</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Search Packages</string>
21 </property>
22 <hbox>
23 <property stdset="1">
24 <name>margin</name>
25 <number>11</number>
26 </property>
27 <property stdset="1">
28 <name>spacing</name>
29 <number>6</number>
30 </property>
31 <widget>
32 <class>QLabel</class>
33 <property stdset="1">
34 <name>name</name>
35 <cstring>TextLabel4</cstring>
36 </property>
37 <property stdset="1">
38 <name>text</name>
39 <string>Find:</string>
40 </property>
41 </widget>
42 <widget>
43 <class>QLineEdit</class>
44 <property stdset="1">
45 <name>name</name>
46 <cstring>pattern</cstring>
47 </property>
48 </widget>
49 </hbox>
50</widget>
51</UI>
diff --git a/noncore/unsupported/oipkg/pksettings.ui b/noncore/unsupported/oipkg/pksettings.ui
deleted file mode 100644
index f182752..0000000
--- a/noncore/unsupported/oipkg/pksettings.ui
+++ b/dev/null
@@ -1,176 +0,0 @@
1<!DOCTYPE UI><UI>
2<class>PackageManagerSettings</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>Form4</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>549</width>
15 <height>683</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Package Servers</string>
21 </property>
22 <grid>
23 <property stdset="1">
24 <name>margin</name>
25 <number>11</number>
26 </property>
27 <property stdset="1">
28 <name>spacing</name>
29 <number>6</number>
30 </property>
31 <widget row="3" column="0" rowspan="1" colspan="2" >
32 <class>QLayoutWidget</class>
33 <property stdset="1">
34 <name>name</name>
35 <cstring>Layout4</cstring>
36 </property>
37 <grid>
38 <property stdset="1">
39 <name>margin</name>
40 <number>0</number>
41 </property>
42 <property stdset="1">
43 <name>spacing</name>
44 <number>6</number>
45 </property>
46 <widget row="0" column="1" >
47 <class>QLineEdit</class>
48 <property stdset="1">
49 <name>name</name>
50 <cstring>servername</cstring>
51 </property>
52 </widget>
53 <widget row="0" column="0" >
54 <class>QLabel</class>
55 <property stdset="1">
56 <name>name</name>
57 <cstring>TextLabel1_3</cstring>
58 </property>
59 <property stdset="1">
60 <name>text</name>
61 <string>Name:</string>
62 </property>
63 </widget>
64 <widget row="1" column="1" >
65 <class>QLineEdit</class>
66 <property stdset="1">
67 <name>name</name>
68 <cstring>serverurl</cstring>
69 </property>
70 </widget>
71 <widget row="1" column="0" >
72 <class>QLabel</class>
73 <property stdset="1">
74 <name>name</name>
75 <cstring>TextLabel2_3</cstring>
76 </property>
77 <property stdset="1">
78 <name>text</name>
79 <string>URL:</string>
80 </property>
81 </widget>
82 </grid>
83 </widget>
84 <widget row="2" column="0" >
85 <class>QPushButton</class>
86 <property stdset="1">
87 <name>name</name>
88 <cstring>newserver</cstring>
89 </property>
90 <property stdset="1">
91 <name>text</name>
92 <string>New</string>
93 </property>
94 <property stdset="1">
95 <name>autoDefault</name>
96 <bool>false</bool>
97 </property>
98 </widget>
99 <widget row="2" column="1" >
100 <class>QPushButton</class>
101 <property stdset="1">
102 <name>name</name>
103 <cstring>removeserver</cstring>
104 </property>
105 <property stdset="1">
106 <name>text</name>
107 <string>Remove</string>
108 </property>
109 <property stdset="1">
110 <name>autoDefault</name>
111 <bool>false</bool>
112 </property>
113 </widget>
114 <widget row="1" column="0" rowspan="1" colspan="2" >
115 <class>QListBox</class>
116 <property stdset="1">
117 <name>name</name>
118 <cstring>servers</cstring>
119 </property>
120 <property stdset="1">
121 <name>selectionMode</name>
122 <enum>Multi</enum>
123 </property>
124 </widget>
125 <widget row="0" column="0" rowspan="1" colspan="2" >
126 <class>QLayoutWidget</class>
127 <property stdset="1">
128 <name>name</name>
129 <cstring>Layout2</cstring>
130 </property>
131 <hbox>
132 <property stdset="1">
133 <name>margin</name>
134 <number>0</number>
135 </property>
136 <property stdset="1">
137 <name>spacing</name>
138 <number>6</number>
139 </property>
140 <widget>
141 <class>QLabel</class>
142 <property stdset="1">
143 <name>name</name>
144 <cstring>Servers</cstring>
145 </property>
146 <property stdset="1">
147 <name>text</name>
148 <string>Servers</string>
149 </property>
150 </widget>
151 <spacer>
152 <property>
153 <name>name</name>
154 <cstring>Spacer2</cstring>
155 </property>
156 <property stdset="1">
157 <name>orientation</name>
158 <enum>Horizontal</enum>
159 </property>
160 <property stdset="1">
161 <name>sizeType</name>
162 <enum>Expanding</enum>
163 </property>
164 <property>
165 <name>sizeHint</name>
166 <size>
167 <width>20</width>
168 <height>20</height>
169 </size>
170 </property>
171 </spacer>
172 </hbox>
173 </widget>
174 </grid>
175</widget>
176</UI>