summaryrefslogtreecommitdiff
authortille <tille>2002-06-21 12:44:34 (UTC)
committer tille <tille>2002-06-21 12:44:34 (UTC)
commite6834009bf23492e009258e3881ce183cf9e27a0 (patch) (side-by-side diff)
treeba5fb74b2ee5e70b5157cd5eb935f8760c5b208d
parent3be39e6c8af27a43d4b09bf08b4c739c342b5de3 (diff)
downloadopie-e6834009bf23492e009258e3881ce183cf9e27a0.zip
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.gz
opie-e6834009bf23492e009258e3881ce183cf9e27a0.tar.bz2
fixes
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp53
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp37
2 files changed, 71 insertions, 19 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 233eae6..7df1d6b 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -45,3 +45,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
listViewPackages->addList( tr("ipkgfind"), &packageListSearch );
- listViewPackages->addList( tr("documents"), &packageListDocLnk );
+//listViewPackages->addList( tr("documents"), &packageListDocLnk );
ipkg = new PmIpkg( settings, this );
@@ -53,3 +53,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f = 0 ) :
pvDebug(9,"packageListDocLnk.update");
- packageListDocLnk.update();
+ pvDebug(0,"no UPDATE of DocLnk");
+// packageListDocLnk.update();
pvDebug(9,"makeMenu");
@@ -84,3 +85,3 @@ void MainWindow::makeMenu()
QPopupMenu *cfgMenu = new QPopupMenu( menuBar );
- // QPopupMenu *sectMenu = new QPopupMenu( menuBar );
+ QPopupMenu *helpMenu = new QPopupMenu( menuBar );
@@ -91,3 +92,3 @@ void MainWindow::makeMenu()
menuBar->insertItem( tr( "Settings" ), cfgMenu );
- // menuBar->insertItem( tr( "Sections" ), sectMenu );
+ menuBar->insertItem( tr( "Help" ), helpMenu );
@@ -231,2 +232,39 @@ void MainWindow::makeMenu()
+// helpMenu
+ helpMenu->insertSeparator();
+ a = new QAction( tr( "Package Actions" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ helpMenu->insertSeparator();
+ a = new QAction( tr( "Install" ),
+ Resource::loadPixmap( "oipkg/install" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "Remove" ),
+ Resource::loadPixmap( "oipkg/uninstall" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ helpMenu->insertSeparator();
+ a = new QAction( tr( "Package Status" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ helpMenu->insertSeparator();
+ a = new QAction( tr( "New version, installed" ),
+ Resource::loadPixmap( "oipkg/installed" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "New version, not installed" ),
+ Resource::loadPixmap( "oipkg/uninstalled" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "Old version, installed" ),
+ Resource::loadPixmap( "oipkg/installedOld" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "Old version, not installed" ),
+ Resource::loadPixmap( "oipkg/uninstalledOld" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "Old version, new version installed" ),
+ Resource::loadPixmap( "oipkg/uninstalledOldinstalledNew" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+ a = new QAction( tr( "New version, old version installed" ),
+ Resource::loadPixmap( "oipkg/uninstalledInstalledOld" ), QString::null, 0, this, 0 );
+ a->addTo( helpMenu );
+// a = new QAction( tr( "" ),
+// Resource::loadPixmap( "oipkg/" ), QString::null, 0, this, 0 );
+// a->addTo( helpMenu );
+
// configure the menus
@@ -256,3 +294,3 @@ void MainWindow::runIpkg()
ipkg->loadList( &packageListSearch );
- ipkg->loadList( &packageListDocLnk );
+//ipkg->loadList( &packageListDocLnk );
ipkg->loadList( &packageListServers );
@@ -272,3 +310,4 @@ void MainWindow::updateList()
packageListSearch.clear();
- packageListDocLnk.clear();
+
+// packageListDocLnk.clear();
ipkg->update();
@@ -276,3 +315,3 @@ void MainWindow::updateList()
packageListSearch.update();
- packageListDocLnk.update();
+// packageListDocLnk.update();
}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 0817247..7d0e246 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -5,5 +5,3 @@
-//#infdef OPROCESS
#include <opie/oprocess.h>
-//#endif
#include <qpe/resource.h>
@@ -31,2 +29,4 @@
+//#define OPROCESS
+
PmIpkg::PmIpkg( PackageManagerSettings* s, QWidget* p, const char * name, WFlags f )
@@ -128,9 +128,9 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
fp = popen( (const char *) cmd, "r");
- if ( !fp ) {
+ if ( fp == NULL ) {
qDebug("Could not execute '" + cmd + "'! err=%d", fp);
- pclose(fp);
out("\nError while executing "+ cmd+"\n\n");
- return false;
+ ret = false;
} else {
- while ( fgets( line, sizeof line, fp)) {
+ while ( fgets( line, sizeof line, fp) != NULL)
+ {
lineStr = line;
@@ -138,4 +138,3 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
//Configuring opie-oipkg...Done
- if (lineStr.contains("Done"))
- ret = true;
+ if (lineStr.contains("Done")) ret = true;
if (lineStr!=lineStrOld)
@@ -145,4 +144,4 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
}
- pclose(fp);
}
+ pclose(fp);
#endif
@@ -236,4 +235,4 @@ void PmIpkg::processLinkDir( QString file, QString dest )
{
- const char *instFile = strdup( (file).ascii() );
- const char *linkFile = strdup( (destFile).ascii());
+ const char *instFile = strdup( (file).latin1() );
+ const char *linkFile = strdup( (destFile).latin1());
if( linkOpp==createLink )
@@ -244,3 +243,3 @@ void PmIpkg::processLinkDir( QString file, QString dest )
} else {
- const char *linkFile = strdup( (destFile).ascii());
+ const char *linkFile = strdup( (destFile).latin1());
if( linkOpp==removeLink )
@@ -355,2 +354,16 @@ void PmIpkg::install()
qDebug("install loop %i of %i installing %s",i,to_install.count(),to_install.at(i)->installName().latin1()); //pvDebug
+ if (to_install.at(i)->link())
+ {
+ // hack to have package.list
+ // in "dest"/usr/lib/ipkg/info/
+ QString rds = settings->getDestinationUrlByName("root");
+ QString lds = settings->getDestinationUrlByName(to_install.at(i)->dest());
+ QString listFile = "usr/lib/ipkg/lists/"+to_install.at(i)->name()+".list";
+ rds += listFile;
+ lds += listFile;
+ const char *rd = rds.latin1();
+ const char *ld = lds.latin1();
+ pvDebug(4, "linking: "+rds+" -> "+lds );
+ symlink( rd, ld );
+ }
if ( runIpkg("install " + to_install.at(i)->installName(), to_install.at(i)->dest() ))