summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/main.cpp1
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp51
-rw-r--r--noncore/unsupported/oipkg/mainwindow.h6
-rw-r--r--noncore/unsupported/oipkg/oipkg.pro2
-rw-r--r--noncore/unsupported/oipkg/package.cpp6
-rw-r--r--noncore/unsupported/oipkg/package.h1
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.cpp36
-rw-r--r--noncore/unsupported/oipkg/packagelistdoclnk.h22
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.cpp8
-rw-r--r--noncore/unsupported/oipkg/packagelistitem.h1
-rw-r--r--noncore/unsupported/oipkg/packagelistremote.cpp14
-rw-r--r--noncore/unsupported/oipkg/packagelistremote.h2
-rw-r--r--noncore/unsupported/oipkg/packagelistview.cpp3
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp21
-rw-r--r--noncore/unsupported/oipkg/pmipkg.h4
-rw-r--r--noncore/unsupported/oipkg/settings.h9
16 files changed, 125 insertions, 62 deletions
diff --git a/noncore/unsupported/oipkg/main.cpp b/noncore/unsupported/oipkg/main.cpp
index 5cef2dc..bacc973 100644
--- a/noncore/unsupported/oipkg/main.cpp
+++ b/noncore/unsupported/oipkg/main.cpp
@@ -18,2 +18,3 @@ int main( int argc, char ** argv )
MainWindow mw;
+ if (debugLevel < 4)
QMessageBox::information( &mw, "oipkg","While ipkg is working\noipkg is hanging.\nPlease be patient!");
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 0422d65..b668660 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -40,4 +40,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
setCentralWidget( listViewPackages );
- listViewPackages->addList( tr("local"), &packageList );
+ 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);
@@ -47,5 +48,7 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
// settings->setIpkg( ipkg );
- packageList.setSettings( settings );
+ packageListServers.setSettings( settings );
packageListSearch.setSettings( settings );
- packageList.update();
+ packageListDocLnk.setSettings( settings );
+ packageListServers.update();
+ packageListDocLnk.update();
makeMenu();
@@ -246,5 +249,6 @@ void MainWindow::runIpkg()
{
- packageList.allPackages();
+ packageListServers.allPackages();
ipkg->loadList( packageListSearch );
- ipkg->commit( packageList );
+ ipkg->loadList( packageListDocLnk );
+ ipkg->commit( packageListServers );
// ##### If we looked in the list of files, we could send out accurate
@@ -263,5 +267,9 @@ void MainWindow::updateList()
t->start( 0, false );
- packageList.clear();
+ packageListServers.clear();
+ packageListSearch.clear();
+ packageListDocLnk.clear();
ipkg->update();
- packageList.update();
+ packageListServers.update();
+ packageListSearch.update();
+ packageListDocLnk.update();
t->stop();
@@ -275,3 +283,3 @@ void MainWindow::filterList()
if ( findAction->isOn() ) f = findEdit->text();
- packageList.filterPackages( f );
+ packageListServers.filterPackages( f );
// wait->hide();
@@ -284,21 +292,2 @@ void MainWindow::displayList()
listViewPackages->display();
-//// if (!rootLocal)
-//// {
-// QCheckListItem *rootLocal = new QCheckListItem(listViewPackages,tr("local"));
-// QCheckListItem *rootSearch = new QCheckListItem(listViewPackages,tr("ipkgfind"));
-//// }
-// listViewPackages->clear();
-// Package *pack = packageList.first();
-// PackageListItem *item;
-// while( pack )
-// {
-// item = new PackageListItem( rootLocal, pack, settings );
-// pack = packageList.next();
-// }
-// pack = packageListSearch.first();
-// while( pack )
-// {
-// item = new PackageListItem( rootSearch, pack, settings );
-// pack = packageListSearch.next();
-// }
}
@@ -312,3 +301,3 @@ void MainWindow::sectionChanged()
subsection->clear();
- packageList.setSection( section->currentText() );
+ packageListServers.setSection( section->currentText() );
setSubSections();
@@ -327,3 +316,3 @@ void MainWindow::subSectionChanged()
this, SLOT( subSectionChanged() ) );
- packageList.setSubSection( subsection->currentText() );
+ packageListServers.setSubSection( subsection->currentText() );
connect( section, SIGNAL( activated(int) ),
@@ -338,3 +327,3 @@ void MainWindow::setSections()
section->clear();
- section->insertStringList( packageList.getSections() );
+ section->insertStringList( packageListServers.getSections() );
}
@@ -344,3 +333,3 @@ void MainWindow::setSubSections()
subsection->clear();
- subsection->insertStringList( packageList.getSubSections() );
+ subsection->insertStringList( packageListServers.getSubSections() );
}
diff --git a/noncore/unsupported/oipkg/mainwindow.h b/noncore/unsupported/oipkg/mainwindow.h
index 4a73b78..f6023b0 100644
--- a/noncore/unsupported/oipkg/mainwindow.h
+++ b/noncore/unsupported/oipkg/mainwindow.h
@@ -11,2 +11,3 @@
#include "packagelistlocal.h"
+#include "packagelistdoclnk.h"
#include "pmipkg.h"
@@ -70,7 +71,6 @@ private:
PackageManagerSettings *settings;
- PackageListLocal packageList;
+ PackageListLocal packageListServers;
PackageListRemote packageListSearch;
+ PackageListDocLnk packageListDocLnk;
PackageListView *listViewPackages;
-// QCheckListItem* rootSearch;
-// QCheckListItem* rootLocal;
QAction *runAction;
diff --git a/noncore/unsupported/oipkg/oipkg.pro b/noncore/unsupported/oipkg/oipkg.pro
index 98f92c8..6ee1963 100644
--- a/noncore/unsupported/oipkg/oipkg.pro
+++ b/noncore/unsupported/oipkg/oipkg.pro
@@ -7,2 +7,3 @@ HEADERS = mainwindow.h \
pmipkg.h \
+ packagelistdoclnk.h \
utils.h \
@@ -17,2 +18,3 @@ SOURCES = main.cpp \
utils.cpp \
+ packagelistdoclnk.cpp \
packagelistview.cpp \
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index f992641..9280d89 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -50,3 +50,2 @@ Package::Package( QString n, PackageManagerSettings *s )
parseIpkgFile( n );
- _toProcess = true;
_useFileName = true;
@@ -368 +367,6 @@ QDict<QString>* Package::getFields()
}
+
+QString Package::status()
+{
+ return _status;
+}
diff --git a/noncore/unsupported/oipkg/package.h b/noncore/unsupported/oipkg/package.h
index fc725bc..257d9c7 100644
--- a/noncore/unsupported/oipkg/package.h
+++ b/noncore/unsupported/oipkg/package.h
@@ -52,2 +52,3 @@ class Package //: public QObject
QDict<QString>* getFields();
+ QString status();
public slots:
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.cpp b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
new file mode 100644
index 0000000..575ac62
--- a/dev/null
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.cpp
@@ -0,0 +1,36 @@
+
+#include "packagelistdoclnk.h"
+
+#include <qpe/applnk.h>
+#include <qlist.h>
+
+#include "package.h"
+#include "pksettings.h"
+
+PackageListDocLnk::PackageListDocLnk(PackageManagerSettings* s)
+ : PackageList(s)
+{
+ PackageListDocLnk();
+}
+
+PackageListDocLnk::PackageListDocLnk()
+ : PackageList()
+{
+ doclnkset = new DocLnkSet("/mnt/nfs/ipk","application/ipkg");
+}
+
+PackageListDocLnk::~PackageListDocLnk()
+{
+}
+
+
+
+void PackageListDocLnk::update()
+{
+ pvDebug(2,"PackageListDocLnk::update ");
+ QList<DocLnk> packlist = doclnkset->children();
+ for (DocLnk *pack =packlist.first(); pack != 0; pack=packlist.next() )
+ {
+ insertPackage( new Package(pack->file(), settings) );
+ }
+}
diff --git a/noncore/unsupported/oipkg/packagelistdoclnk.h b/noncore/unsupported/oipkg/packagelistdoclnk.h
new file mode 100644
index 0000000..3864ace
--- a/dev/null
+++ b/noncore/unsupported/oipkg/packagelistdoclnk.h
@@ -0,0 +1,22 @@
+#ifndef PACKAGELISTDOCLNK_H
+#define PACKAGELISTDOCLNK_H
+
+#include "packagelist.h"
+#include "debug.h"
+
+class DocLnkSet;
+
+class PackageListDocLnk : public PackageList
+{
+public:
+ PackageListDocLnk();
+ PackageListDocLnk( PackageManagerSettings* s);
+ virtual ~PackageListDocLnk();
+public slots:
+ void update();
+private:
+ DocLnkSet *doclnkset;
+};
+
+
+#endif
diff --git a/noncore/unsupported/oipkg/packagelistitem.cpp b/noncore/unsupported/oipkg/packagelistitem.cpp
index 2f81714..45aaf1d 100644
--- a/noncore/unsupported/oipkg/packagelistitem.cpp
+++ b/noncore/unsupported/oipkg/packagelistitem.cpp
@@ -34,2 +34,3 @@ void PackageListItem::init( Package *pi, PackageManagerSettings *s)
linkItem = new QCheckListItem( this, "" );
+ statusItem = new QCheckListItem( this, "" );
QCheckListItem *otherItem = new QCheckListItem( this, QObject::tr("other") );
@@ -131,5 +132,7 @@ void PackageListItem::displayDetails()
{
- QString sod = " ("+package->sizeUnits();
+ QString sod;
+ sod += package->sizeUnits().isEmpty()?QString(""):QString(package->sizeUnits());
+ //sod += QString(package->dest().isEmpty()?"":QObject::tr(" on ")+package->dest());
sod += package->dest().isEmpty()?QString(""):QString(QObject::tr(" on ")+package->dest());
- sod += ")";
+ sod = sod.isEmpty()?QString(""):QString(" ("+sod+")");
setText(0, package->name()+sod );
@@ -138,2 +141,3 @@ void PackageListItem::displayDetails()
destItem->setText( 0, QObject::tr("Destination: ")+package->dest() );
+ statusItem->setText( 0, QObject::tr("Status: ")+package->status() );
repaint();
diff --git a/noncore/unsupported/oipkg/packagelistitem.h b/noncore/unsupported/oipkg/packagelistitem.h
index b128f0d..65e9711 100644
--- a/noncore/unsupported/oipkg/packagelistitem.h
+++ b/noncore/unsupported/oipkg/packagelistitem.h
@@ -34,2 +34,3 @@ private:
QCheckListItem *linkItem;
+ QCheckListItem *statusItem;
PackageManagerSettings *settings;
diff --git a/noncore/unsupported/oipkg/packagelistremote.cpp b/noncore/unsupported/oipkg/packagelistremote.cpp
index 721d4a6..1ec7292 100644
--- a/noncore/unsupported/oipkg/packagelistremote.cpp
+++ b/noncore/unsupported/oipkg/packagelistremote.cpp
@@ -24,2 +24,8 @@ void PackageListRemote::query(QString s)
{
+ searchString = s;
+}
+
+void PackageListRemote::update()
+{
+ pvDebug(2,"PackageListRemote::update");
int r=0;
@@ -34,3 +40,3 @@ void PackageListRemote::query(QString s)
cmd += "?format=pda&searchtype=package&section=";
- cmd += "&query="+s;
+ cmd += "&query="+searchString;
cmd += "\"";
@@ -40,8 +46,2 @@ void PackageListRemote::query(QString s)
readFileEntries( redirect );
-
-}
-
-void PackageListRemote::update()
-{
- pvDebug(2,"PackageListRemote::update\ndoing nothing ");
}
diff --git a/noncore/unsupported/oipkg/packagelistremote.h b/noncore/unsupported/oipkg/packagelistremote.h
index 147da1e..87bf10d 100644
--- a/noncore/unsupported/oipkg/packagelistremote.h
+++ b/noncore/unsupported/oipkg/packagelistremote.h
@@ -16,2 +16,4 @@ public slots:
void update();
+private:
+ QString searchString;
};
diff --git a/noncore/unsupported/oipkg/packagelistview.cpp b/noncore/unsupported/oipkg/packagelistview.cpp
index 5137c64..b6b520b 100644
--- a/noncore/unsupported/oipkg/packagelistview.cpp
+++ b/noncore/unsupported/oipkg/packagelistview.cpp
@@ -130,3 +130,4 @@ void PackageListView::addList( QString n, PackageList* pl)
PackageLists.insert(n, pl);
- rootItems.insert(n, new QCheckListItem(this,n));
+ QCheckListItem *item = new QCheckListItem(this,n);
+ rootItems.insert(n, item);
}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 2559a51..be9d6da 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -32,3 +32,2 @@ PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlag
settings = s;
- runwindowopen = false;
runwindow = new RunWindow( p, name, true, f );
@@ -75,3 +74,3 @@ int PmIpkg::runIpkg(const QString& args, const QString& dest )
QString o = "start";
- Process *ipkg = new Process( "ls");//cmd );
+ Process *ipkg = new Process( cmd );
out( "running:<br>\n"+ipkg->arguments().join(" ")+"<br>\n" );
@@ -162,5 +161,5 @@ void PmIpkg::processLinkDir( QString file, QString dest )
{
- pvDebug( 7,"PmIpkg::processLinkDir "+file+" to "+ dest);
- if (linkOpp==createLink) pvDebug( 2,"opp: createLink");
- if (linkOpp==removeLink) pvDebug( 2,"opp:removeLink");
+ pvDebug( 4,"PmIpkg::processLinkDir "+file+" to "+ dest);
+ if (linkOpp==createLink) pvDebug( 4,"opp: createLink");
+ if (linkOpp==removeLink) pvDebug( 4,"opp: removeLink");
if ( dest == "???" || dest == "" ) return;
@@ -172,2 +171,3 @@ void PmIpkg::processLinkDir( QString file, QString dest )
{
+ pvDebug(4, "process dir "+file);
QDir destDir( destFile );
@@ -181,3 +181,2 @@ void PmIpkg::processLinkDir( QString file, QString dest )
{
- pvDebug(4, "process dir "+fi->absFilePath());
processLinkDir( fi->absFilePath(), dest );
@@ -228,5 +227,5 @@ void PmIpkg::commit( PackageList pl )
{
- sizecount = 0;
- QString rem="<b>"+tr("To remove:")+"</b><br>\n";
- QString inst="<b>"+tr("To install:")+"</b><br>\n";
+ int sizecount = 0;
+// QString rem="<b>"+tr("To remove:")+"</b><br>\n";
+// QString inst="<b>"+tr("To install:")+"</b><br>\n";
loadList(pl);
@@ -236,2 +235,3 @@ void PmIpkg::commit( PackageList pl )
sizecount += to_install.at(i)->size().toInt();
+ runwindow->progress->setTotalSteps(sizecount);
startDialog();
@@ -323,3 +323,3 @@ void PmIpkg::remove()
it->processed();
-
+// to_install.take( it );
out("<br><hr>");
@@ -352,2 +352,3 @@ void PmIpkg::install()
it->processed();
+// to_install.take( it->name() );
out("<br><hr>");
diff --git a/noncore/unsupported/oipkg/pmipkg.h b/noncore/unsupported/oipkg/pmipkg.h
index fa00048..3799969 100644
--- a/noncore/unsupported/oipkg/pmipkg.h
+++ b/noncore/unsupported/oipkg/pmipkg.h
@@ -41,3 +41,3 @@ public slots:
private:
- int sizecount;
+// int sizecount;
PackageManagerSettings* settings;
@@ -47,3 +47,3 @@ private:
QList<Package> to_install;
- bool runwindowopen;
+// bool runwindowopen;
QString fileNameToInstall;
diff --git a/noncore/unsupported/oipkg/settings.h b/noncore/unsupported/oipkg/settings.h
index 3be4334..bab7a4f 100644
--- a/noncore/unsupported/oipkg/settings.h
+++ b/noncore/unsupported/oipkg/settings.h
@@ -23,3 +23,5 @@ public:
-public slots:
+public slots: /** No descriptions */
+ void createLinks();
+ void removeLinks();
void writeInstallationSettings();
@@ -63,5 +65,2 @@ private:
#endif
- /** No descriptions */
- void createLinks();
- /** No descriptions */
- void removeLinks();
+