summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp35
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp21
-rw-r--r--noncore/unsupported/oipkg/utils.cpp9
-rw-r--r--noncore/unsupported/oipkg/utils.h9
4 files changed, 37 insertions, 37 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 084900d..53db477 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -62,15 +62,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
packageListServers.update();
pvDebug(9,"packageListDocLnk.update");
- pvDebug(0,"no UPDATE of DocLnk");
packageListDocLnk.update();
pvDebug(9,"makeMenu");
makeMenu();
makeChannel();
- //opie is hardcoded default ;)
-// pvDebug(9,"section->setCurrentItem");
-// for (int i=0;i<section->count();i++)
-// if (section->text(i)=="opie")
-// section->setCurrentItem(i);
-// sectionChanged();
+
connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
@@ -152,10 +146,16 @@ void MainWindow::makeMenu()
addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
sectionBar->setHorizontalStretchable( true );
- QLabel *label = new QLabel( tr("Section: "), sectionBar );
- label->setBackgroundColor( sectionBar->backgroundColor() );
+ QLabel *label = new QLabel( sectionBar, "section" );
+// label->setBackgroundMode( NoBackground );
+ label->font().setPointSize( 8 );
+ label->setText( tr( "Section:" ) );
+ sectionBar->setStretchableWidget( label );
section = new QComboBox( false, sectionBar );
+ section->font().setPointSize( 8 );
label = new QLabel( " / ", sectionBar );
- label->setBackgroundColor( sectionBar->backgroundColor() );
+ label->font().setPointSize( 8 );
+// label->setBackgroundMode( PaletteForeground );
subsection = new QComboBox( false, sectionBar );
+ subsection->font().setPointSize( 8 );
a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
@@ -167,5 +167,5 @@ void MainWindow::makeMenu()
sectionAction->setToggleAction( true );
sectionAction->addTo( viewMenu );
- sectionBar->setStretchableWidget( section );
+// sectionBar->setStretchableWidget( section );
//FIND
@@ -173,5 +173,5 @@ void MainWindow::makeMenu()
addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
label = new QLabel( tr("Filter: "), findBar );
- label->setBackgroundColor( findBar->backgroundColor() );
+// label->setBackgroundMode( PaletteForeground );
findBar->setHorizontalStretchable( TRUE );
findEdit = new QLineEdit( findBar, "findEdit" );
@@ -194,5 +194,5 @@ void MainWindow::makeMenu()
addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
label = new QLabel( tr("ipkgfind: "), searchBar );
- label->setBackgroundColor( searchBar->backgroundColor() );
+// label->setBackgroundMode( PaletteForeground );
searchBar->setHorizontalStretchable( TRUE );
searchEdit = new QLineEdit( searchBar, "seachEdit" );
@@ -218,5 +218,5 @@ void MainWindow::makeMenu()
addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
label = new QLabel( tr("Destination: "), destBar );
- label->setBackgroundColor( destBar->backgroundColor() );
+// label->setBackgroundMode( PaletteForeground );
destBar->setHorizontalStretchable( TRUE );
destination = new QComboBox( false, destBar );
@@ -226,7 +226,7 @@ void MainWindow::makeMenu()
settings, SLOT(activeDestinationChange(int)) );
spacer = new QLabel( " ", destBar );
- spacer->setBackgroundColor( destBar->backgroundColor() );
+// spacer->setBackgroundMode( PaletteForeground );
CheckBoxLink = new QCheckBox( tr("Link"), destBar);
- CheckBoxLink->setBackgroundColor( destBar->backgroundColor() );
+// CheckBoxLink->setBackgroundMode( PaletteForeground );
CheckBoxLink->setChecked( settings->createLinks() );
connect( CheckBoxLink, SIGNAL(toggled(bool)),
@@ -286,4 +286,6 @@ void MainWindow::makeMenu()
sectionShow( cfg.readBoolEntry( "sectionBar", true ) );
destShow( cfg.readBoolEntry( "destBar", false ) );
+ setComboName(section,cfg.readEntry("default_section"));
+ sectionChanged();
}
@@ -296,4 +298,5 @@ MainWindow::~MainWindow()
cfg.writeEntry( "sectionBar", !sectionBar->isHidden() );
cfg.writeEntry( "destBar", !destBar->isHidden() );
+ cfg.writeEntry( "default_section", section->currentText() );
}
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index de1f162..4a8a389 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -68,4 +68,5 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
QString cmd = "/usr/bin/ipkg ";
#ifdef OPROCESS
+ ipkgProcess->kill();
ipkgProcess->clearArguments();
*ipkgProcess << "/usr/bin/ipkg ";
@@ -100,4 +101,6 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
//debug
+ delete ipkgProcess;
+ ipkgProcess = new OProcess();
ipkgProcess->clearArguments();
*ipkgProcess << "/bin/ls ";
@@ -171,5 +174,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
QString dest = settings->getDestinationUrlByName( d );
dest = dest==""?d:dest;
- if (dest == "/" ) return 0;
+ // if (dest == "/" ) return 0;
{
Config cfg( "oipkg", Config::User );
@@ -177,11 +180,17 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
QString statusDir = cfg.readEntry( "statusDir", "" );
}
- packFileName = dest+"/"+statusDir+"/info/"+packFileName+".list";
+ QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list";
QFile f( packFileName );
if ( ! f.open(IO_ReadOnly) )
{
- pvDebug(1," Panik! Could not open");
- out( "Panik!\n Could not open:\n"+packFileName );
- return (QStringList*)0;
+ out( "Could not open:\n"+packFileDir );
+ f.close();
+ packFileDir = "/"+statusDir+"/info/"+packFileName+".list";
+ f.setName( packFileDir );
+ if ( ! f.open(IO_ReadOnly) )
+ {
+ qDebug(" Panik! Could not open"+packFileDir);
+ out( "Could not open:\n"+packFileDir+"\n Panik!" );
+ }
}
QStringList *fileList = new QStringList();
@@ -191,4 +200,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
*fileList += t.readLine();
}
+ f.close();
return fileList;
}
@@ -196,4 +206,5 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
void PmIpkg::linkPackage( QString packFileName, QString dest )
{
+ if (dest == "root" || dest == "/" ) return;
QStringList *fileList = getList( packFileName, dest );
processFileList( fileList, dest );
diff --git a/noncore/unsupported/oipkg/utils.cpp b/noncore/unsupported/oipkg/utils.cpp
index 66dcf10..6821343 100644
--- a/noncore/unsupported/oipkg/utils.cpp
+++ b/noncore/unsupported/oipkg/utils.cpp
@@ -1,11 +1,3 @@
/***************************************************************************
- utils.cpp - description
- -------------------
- begin : Sun Apr 28 2002
- copyright : (C) 2002 by tille
- email : tille@handhelds.org
- ***************************************************************************/
-
-/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@@ -15,4 +7,5 @@
* *
***************************************************************************/
+// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
#include <qcombobox.h>
diff --git a/noncore/unsupported/oipkg/utils.h b/noncore/unsupported/oipkg/utils.h
index ecc70dc..da33eda 100644
--- a/noncore/unsupported/oipkg/utils.h
+++ b/noncore/unsupported/oipkg/utils.h
@@ -1,11 +1,3 @@
/***************************************************************************
- utils.h - description
- -------------------
- begin : Sun Apr 28 2002
- copyright : (C) 2002 by tille
- email : tille@handhelds.org
- ***************************************************************************/
-
-/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
@@ -15,4 +7,5 @@
* *
***************************************************************************/
+// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
void setComboName( QComboBox*, QString );