author | tille <tille> | 2002-05-12 14:06:06 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-12 14:06:06 (UTC) |
commit | f388350086510b261c496c232da7302f4ec81cc3 (patch) (side-by-side diff) | |
tree | 472aad42f650028bfd7fae66be6a19f37e2a26e0 | |
parent | c1f023c19bbee54a3a0575bd6035b133592edcfc (diff) | |
download | opie-f388350086510b261c496c232da7302f4ec81cc3.zip opie-f388350086510b261c496c232da7302f4ec81cc3.tar.gz opie-f388350086510b261c496c232da7302f4ec81cc3.tar.bz2 |
fixed filename for remote files
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.cpp | 24 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/mainwindow.h | 3 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/package.cpp | 4 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 2 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistitem.cpp | 5 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/packagelistremote.cpp | 2 |
6 files changed, 8 insertions, 32 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp index 1c56aae..9c4c752 100644 --- a/noncore/unsupported/oipkg/mainwindow.cpp +++ b/noncore/unsupported/oipkg/mainwindow.cpp @@ -32,29 +32,25 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) : QMainWindow( parent, name, f ) { setCaption( tr("Package Manager") ); settings = new PackageManagerSettings(this,0,TRUE); listViewPackages = new PackageListView( this,"listViewPackages",settings ); setCentralWidget( listViewPackages ); listViewPackages->addList( tr("feeds"), &packageListServers ); listViewPackages->addList( tr("ipkgfind"), &packageListSearch ); listViewPackages->addList( tr("documents"), &packageListDocLnk ); -// wait = new QMessageBox(tr("oipkg"),tr("Please wait")//,QMessageBox::Information,QMessageBox::NoButton,QMessageBox::NoButton,QMessageBox::NoButton); -// wait = new QMessageBox(this); -// wait->setText(tr("Please wait")); ipkg = new PmIpkg( settings, this ); -// settings->setIpkg( ipkg ); packageListServers.setSettings( settings ); packageListSearch.setSettings( settings ); packageListDocLnk.setSettings( settings ); pvDebug(9,"packageListServers.update"); packageListServers.update(); pvDebug(9,"packageListDocLnk.update"); packageListDocLnk.update(); pvDebug(9,"makeMenu"); makeMenu(); makeChannel(); //opie is hardcoded default ;) // pvDebug(9,"section->setCurrentItem"); @@ -260,51 +256,42 @@ void MainWindow::runIpkg() ipkg->commit(); ipkg->clearLists(); // ##### If we looked in the list of files, we could send out accurate // ##### messages. But we don't bother yet, and just do an "all". QCopEnvelope e("QPE/System", "linkChanged(QString)"); QString lf = QString::null; e << lf; displayList(); } void MainWindow::updateList() { -// wait->show(); - QTimer *t = new QTimer( this ); - connect( t, SIGNAL(timeout()), SLOT( rotateUpdateIcon() ) ); - t->start( 0, false ); packageListServers.clear(); packageListSearch.clear(); packageListDocLnk.clear(); ipkg->update(); packageListServers.update(); packageListSearch.update(); packageListDocLnk.update(); - t->stop(); -// wait->hide(); } void MainWindow::filterList() { -// wait->show(); QString f = ""; if ( findAction->isOn() ) f = findEdit->text(); packageListServers.filterPackages( f ); -// wait->hide(); } void MainWindow::displayList() { -// wait->hide(); filterList(); listViewPackages->display(); } void MainWindow::sectionChanged() { disconnect( section, SIGNAL( activated(int) ), this, SLOT( sectionChanged() ) ); disconnect( subsection, SIGNAL(activated(int) ), this, SLOT( subSectionChanged() ) ); subsection->clear(); packageListServers.setSection( section->currentText() ); @@ -399,35 +386,24 @@ void MainWindow::searchClose() void MainWindow::destShow(bool b) { if (b) destBar->show(); else destBar->hide(); destAction->setOn( b ); } void MainWindow::destClose() { destAction->setOn( false ); } -void MainWindow::rotateUpdateIcon() -{ - pvDebug(2, "MainWindow::rotateUpdateIcon"); - if ( updateIcon ) - updateAction->setIconSet( Resource::loadIconSet( "oipkg/update" ) ); - else - updateAction->setIconSet( Resource::loadIconSet( "oipkg/update2" ) ); - updateIcon = !updateIcon; -} - - void MainWindow::setDocument(const QString &fileName) { if ( !QFile::exists( fileName ) ) return; ipkg->installFile( fileName ); QCopEnvelope e("QPE/System", "linkChanged(QString)"); QString lf = QString::null; e << lf; exit; } void MainWindow::makeChannel() diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h index ce3e761..4a5e8bf 100644 --- a/noncore/unsupported/oipkg/mainwindow.h +++ b/noncore/unsupported/oipkg/mainwindow.h @@ -80,18 +80,15 @@ private: QAction *searchAction; QAction *searchCommit; QPEToolBar *searchBar; QLineEdit *searchEdit; QAction *sectionAction; QPEToolBar *sectionBar; QComboBox *section; QComboBox *subsection; QAction *destAction; QPEToolBar *destBar; QComboBox *destination; QCheckBox* CheckBoxLink; -// QMessageBox *wait; -private slots: - void rotateUpdateIcon(); }; #endif diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp index 4542e42..8c5f0ea 100644 --- a/noncore/unsupported/oipkg/package.cpp +++ b/noncore/unsupported/oipkg/package.cpp @@ -41,24 +41,25 @@ Package::Package( QStringList pack, PackageManagerSettings *s ) { init(s); parsePackage( pack ); } Package::Package( QString n, PackageManagerSettings *s ) { init(s); if ( !QFile::exists( n ) ) { _name = QString( n ); }else{ + pvDebug(2,"remote file: "+n); parseIpkgFile( n ); _useFileName = true; _fileName = QString( n ); } } Package::Package( Package *pi ) { init(pi->settings); copyValues( pi ); } @@ -333,25 +334,26 @@ void Package::processed() else _status = "installed"; } QString Package::dest() { if ( installed()||(!installed() && _toProcess) ) return _dest!=""?_dest:settings->getDestinationName(); else return ""; } void Package::setDest( QString d ) { - _dest = d; + if ( d == "remote") _useFileName = true; + else _dest = d; } void Package::setOn() { _toProcess = true; } bool Package::link() { if ( _dest == "root" || (!installed() && !_toProcess) ) return false; return _link; } diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index 8f835b7..1b572e0 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -166,27 +166,27 @@ void PackageList::readFileEntries( QString filename, QString dest ) QFile f( filename ); if ( !f.open(IO_ReadOnly) ) return; QTextStream *statusStream = new QTextStream( &f ); while ( !statusStream ->eof() ) { QString line = statusStream->readLine(); if ( line.find(QRegExp("[\n\t ]*")) || line == "" ) { //end of package if ( ! packEntry.isEmpty() ) { Package *p = new Package( packEntry, settings ); - p->setDest( dest ); if ( p ) { + p->setDest( dest ); insertPackage( p ); packEntry.clear(); } } }else{ packEntry << line; }; } delete statusStream; return; } diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp index c743a49..55047d5 100644 --- a/noncore/unsupported/oipkg/packagelistitem.cpp +++ b/noncore/unsupported/oipkg/packagelistitem.cpp @@ -24,30 +24,31 @@ PackageListItem::PackageListItem(QListViewItem *lvi, Package *pi, PackageManager : QCheckListItem(lvi,pi->name(),CheckBox) { init(pi,s); } void PackageListItem::init( Package *pi, PackageManagerSettings *s) { package = pi; settings = s; setExpandable( true ); QCheckListItem *item; nameItem = new QCheckListItem( this, "" ); - item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); + item = new QCheckListItem( this, QObject::tr("Description: ")+pi->desc() ); + item = new QCheckListItem( this, QObject::tr("Size: ")+pi->size() ); destItem = new QCheckListItem( this, "" ); linkItem = new QCheckListItem( this, "" ); statusItem = new QCheckListItem( this, "" ); QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") ); - item = new QCheckListItem( otherItem, QObject::tr("Description: ")+pi->desc() ); + item = new QCheckListItem( otherItem, QObject::tr("Install Name: ")+pi->installName() ); QDict<QString> *fields = pi->getFields(); QDictIterator<QString> it( *fields ); while ( it.current() ) { item = new QCheckListItem( otherItem, QString(it.currentKey()+": "+*it.current()) ); ++it; } displayDetails(); if (!pm_uninstalled) { pm_uninstalled = new QPixmap(Resource::loadPixmap("oipkg/uninstalled")); pm_uninstalled_old = new QPixmap(Resource::loadPixmap("oipkg/uninstalledOld")); diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp index e37f256..bb29e80 100644 --- a/noncore/unsupported/oipkg/packagelistremote.cpp +++ b/noncore/unsupported/oipkg/packagelistremote.cpp @@ -36,14 +36,14 @@ void PackageListRemote::update() // use file for output cmd += " --output-document="+redirect; //http://ipkgfind.handhelds.org/packages.phtml?format=pda&query=ipkg&searchtype=package§ion= QString server="http://ipkgfind.handhelds.org/"; cmd += " \""+server+"/packages.phtml"; cmd += "?format=pda&searchtype=package§ion="; cmd += "&query="+searchString; cmd += "\""; pvDebug(4,"search :"+cmd); r = system(cmd.latin1()); - readFileEntries( redirect ); + readFileEntries( redirect, "remote" ); } |