summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore 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
@@ -61,17 +61,11 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags f ) :
61 pvDebug(9,"packageListServers.update"); 61 pvDebug(9,"packageListServers.update");
62 packageListServers.update(); 62 packageListServers.update();
63 pvDebug(9,"packageListDocLnk.update"); 63 pvDebug(9,"packageListDocLnk.update");
64 pvDebug(0,"no UPDATE of DocLnk");
65 packageListDocLnk.update(); 64 packageListDocLnk.update();
66 pvDebug(9,"makeMenu"); 65 pvDebug(9,"makeMenu");
67 makeMenu(); 66 makeMenu();
68 makeChannel(); 67 makeChannel();
69 //opie is hardcoded default ;) 68
70 //pvDebug(9,"section->setCurrentItem");
71// for (int i=0;i<section->count();i++)
72 // if (section->text(i)=="opie")
73 // section->setCurrentItem(i);
74// sectionChanged();
75 69
76 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) ); 70 connect( section, SIGNAL(activated(int)), SLOT(sectionChanged()) );
77 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) ); 71 connect( subsection, SIGNAL(activated(int)), SLOT(subSectionChanged()) );
@@ -151,12 +145,18 @@ void MainWindow::makeMenu()
151 sectionBar = new QPEToolBar( this ); 145 sectionBar = new QPEToolBar( this );
152 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); 146 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
153 sectionBar->setHorizontalStretchable( true ); 147 sectionBar->setHorizontalStretchable( true );
154 QLabel *label = new QLabel( tr("Section: "), sectionBar ); 148 QLabel *label = new QLabel( sectionBar, "section" );
155 label->setBackgroundColor( sectionBar->backgroundColor() ); 149// label->setBackgroundMode( NoBackground );
150 label->font().setPointSize( 8 );
151 label->setText( tr( "Section:" ) );
152 sectionBar->setStretchableWidget( label );
156 section = new QComboBox( false, sectionBar ); 153 section = new QComboBox( false, sectionBar );
154 section->font().setPointSize( 8 );
157 label = new QLabel( " / ", sectionBar ); 155 label = new QLabel( " / ", sectionBar );
158 label->setBackgroundColor( sectionBar->backgroundColor() ); 156 label->font().setPointSize( 8 );
157// label->setBackgroundMode( PaletteForeground );
159 subsection = new QComboBox( false, sectionBar ); 158 subsection = new QComboBox( false, sectionBar );
159 subsection->font().setPointSize( 8 );
160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 160 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); 161 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
162 a->addTo( sectionBar ); 162 a->addTo( sectionBar );
@@ -166,13 +166,13 @@ void MainWindow::makeMenu()
166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) ); 166 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
167 sectionAction->setToggleAction( true ); 167 sectionAction->setToggleAction( true );
168 sectionAction->addTo( viewMenu ); 168 sectionAction->addTo( viewMenu );
169 sectionBar->setStretchableWidget( section ); 169 // sectionBar->setStretchableWidget( section );
170 170
171 //FIND 171 //FIND
172 findBar = new QPEToolBar(this); 172 findBar = new QPEToolBar(this);
173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); 173 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
174 label = new QLabel( tr("Filter: "), findBar ); 174 label = new QLabel( tr("Filter: "), findBar );
175 label->setBackgroundColor( findBar->backgroundColor() ); 175// label->setBackgroundMode( PaletteForeground );
176 findBar->setHorizontalStretchable( TRUE ); 176 findBar->setHorizontalStretchable( TRUE );
177 findEdit = new QLineEdit( findBar, "findEdit" ); 177 findEdit = new QLineEdit( findBar, "findEdit" );
178 findBar->setStretchableWidget( findEdit ); 178 findBar->setStretchableWidget( findEdit );
@@ -193,7 +193,7 @@ void MainWindow::makeMenu()
193 searchBar = new QPEToolBar(this); 193 searchBar = new QPEToolBar(this);
194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); 194 addToolBar( searchBar, "Search", QMainWindow::Top, TRUE );
195 label = new QLabel( tr("ipkgfind: "), searchBar ); 195 label = new QLabel( tr("ipkgfind: "), searchBar );
196 label->setBackgroundColor( searchBar->backgroundColor() ); 196// label->setBackgroundMode( PaletteForeground );
197 searchBar->setHorizontalStretchable( TRUE ); 197 searchBar->setHorizontalStretchable( TRUE );
198 searchEdit = new QLineEdit( searchBar, "seachEdit" ); 198 searchEdit = new QLineEdit( searchBar, "seachEdit" );
199 searchBar->setStretchableWidget( searchEdit ); 199 searchBar->setStretchableWidget( searchEdit );
@@ -217,7 +217,7 @@ void MainWindow::makeMenu()
217 destBar = new QPEToolBar(this); 217 destBar = new QPEToolBar(this);
218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE ); 218 addToolBar( destBar, "Destination", QMainWindow::Top, TRUE );
219 label = new QLabel( tr("Destination: "), destBar ); 219 label = new QLabel( tr("Destination: "), destBar );
220 label->setBackgroundColor( destBar->backgroundColor() ); 220// label->setBackgroundMode( PaletteForeground );
221 destBar->setHorizontalStretchable( TRUE ); 221 destBar->setHorizontalStretchable( TRUE );
222 destination = new QComboBox( false, destBar ); 222 destination = new QComboBox( false, destBar );
223 destination->insertStringList( settings->getDestinationNames() ); 223 destination->insertStringList( settings->getDestinationNames() );
@@ -225,9 +225,9 @@ void MainWindow::makeMenu()
225 connect( destination, SIGNAL(activated(int)), 225 connect( destination, SIGNAL(activated(int)),
226 settings, SLOT(activeDestinationChange(int)) ); 226 settings, SLOT(activeDestinationChange(int)) );
227 spacer = new QLabel( " ", destBar ); 227 spacer = new QLabel( " ", destBar );
228 spacer->setBackgroundColor( destBar->backgroundColor() ); 228// spacer->setBackgroundMode( PaletteForeground );
229 CheckBoxLink = new QCheckBox( tr("Link"), destBar); 229 CheckBoxLink = new QCheckBox( tr("Link"), destBar);
230 CheckBoxLink->setBackgroundColor( destBar->backgroundColor() ); 230// CheckBoxLink->setBackgroundMode( PaletteForeground );
231 CheckBoxLink->setChecked( settings->createLinks() ); 231 CheckBoxLink->setChecked( settings->createLinks() );
232 connect( CheckBoxLink, SIGNAL(toggled(bool)), 232 connect( CheckBoxLink, SIGNAL(toggled(bool)),
233 settings, SLOT(linkEnabled(bool)) ); 233 settings, SLOT(linkEnabled(bool)) );
@@ -285,6 +285,8 @@ void MainWindow::makeMenu()
285 searchShow( cfg.readBoolEntry( "searchBar", true ) ); 285 searchShow( cfg.readBoolEntry( "searchBar", true ) );
286 sectionShow( cfg.readBoolEntry( "sectionBar", true ) ); 286 sectionShow( cfg.readBoolEntry( "sectionBar", true ) );
287 destShow( cfg.readBoolEntry( "destBar", false ) ); 287 destShow( cfg.readBoolEntry( "destBar", false ) );
288 setComboName(section,cfg.readEntry("default_section"));
289 sectionChanged();
288} 290}
289 291
290MainWindow::~MainWindow() 292MainWindow::~MainWindow()
@@ -295,6 +297,7 @@ MainWindow::~MainWindow()
295 cfg.writeEntry( "searchBar", !searchBar->isHidden() ); 297 cfg.writeEntry( "searchBar", !searchBar->isHidden() );
296 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() ); 298 cfg.writeEntry( "sectionBar", !sectionBar->isHidden() );
297 cfg.writeEntry( "destBar", !destBar->isHidden() ); 299 cfg.writeEntry( "destBar", !destBar->isHidden() );
300 cfg.writeEntry( "default_section", section->currentText() );
298 301
299} 302}
300 303
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
@@ -67,6 +67,7 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
67 QDir::setCurrent("/tmp"); 67 QDir::setCurrent("/tmp");
68 QString cmd = "/usr/bin/ipkg "; 68 QString cmd = "/usr/bin/ipkg ";
69#ifdef OPROCESS 69#ifdef OPROCESS
70 ipkgProcess->kill();
70 ipkgProcess->clearArguments(); 71 ipkgProcess->clearArguments();
71 *ipkgProcess << "/usr/bin/ipkg "; 72 *ipkgProcess << "/usr/bin/ipkg ";
72 cmd = ""; 73 cmd = "";
@@ -99,6 +100,8 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest )
99 *ipkgProcess << cmd; 100 *ipkgProcess << cmd;
100 101
101//debug 102//debug
103 delete ipkgProcess;
104 ipkgProcess = new OProcess();
102 ipkgProcess->clearArguments(); 105 ipkgProcess->clearArguments();
103 *ipkgProcess << "/bin/ls "; 106 *ipkgProcess << "/bin/ls ";
104//debug 107//debug
@@ -170,19 +173,25 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
170{ 173{
171 QString dest = settings->getDestinationUrlByName( d ); 174 QString dest = settings->getDestinationUrlByName( d );
172 dest = dest==""?d:dest; 175 dest = dest==""?d:dest;
173 if (dest == "/" ) return 0; 176 // if (dest == "/" ) return 0;
174 { 177 {
175 Config cfg( "oipkg", Config::User ); 178 Config cfg( "oipkg", Config::User );
176 cfg.setGroup( "Common" ); 179 cfg.setGroup( "Common" );
177 QString statusDir = cfg.readEntry( "statusDir", "" ); 180 QString statusDir = cfg.readEntry( "statusDir", "" );
178 } 181 }
179 packFileName = dest+"/"+statusDir+"/info/"+packFileName+".list"; 182 QString packFileDir = dest+"/"+statusDir+"/info/"+packFileName+".list";
180 QFile f( packFileName ); 183 QFile f( packFileName );
181 if ( ! f.open(IO_ReadOnly) ) 184 if ( ! f.open(IO_ReadOnly) )
182 { 185 {
183 pvDebug(1," Panik! Could not open"); 186 out( "Could not open:\n"+packFileDir );
184 out( "Panik!\n Could not open:\n"+packFileName ); 187 f.close();
185 return (QStringList*)0; 188 packFileDir = "/"+statusDir+"/info/"+packFileName+".list";
189 f.setName( packFileDir );
190 if ( ! f.open(IO_ReadOnly) )
191 {
192 qDebug(" Panik! Could not open"+packFileDir);
193 out( "Could not open:\n"+packFileDir+"\n Panik!" );
194 }
186 } 195 }
187 QStringList *fileList = new QStringList(); 196 QStringList *fileList = new QStringList();
188 QTextStream t( &f ); 197 QTextStream t( &f );
@@ -190,11 +199,13 @@ QStringList* PmIpkg::getList( QString packFileName, QString d )
190 { 199 {
191 *fileList += t.readLine(); 200 *fileList += t.readLine();
192 } 201 }
202 f.close();
193 return fileList; 203 return fileList;
194} 204}
195 205
196void PmIpkg::linkPackage( QString packFileName, QString dest ) 206void PmIpkg::linkPackage( QString packFileName, QString dest )
197{ 207{
208 if (dest == "root" || dest == "/" ) return;
198 QStringList *fileList = getList( packFileName, dest ); 209 QStringList *fileList = getList( packFileName, dest );
199 processFileList( fileList, dest ); 210 processFileList( fileList, dest );
200 delete fileList; 211 delete fileList;
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,12 +1,4 @@
1/*************************************************************************** 1/***************************************************************************
2 utils.cpp - description
3 -------------------
4 begin : Sun Apr 28 2002
5 copyright : (C) 2002 by tille
6 email : tille@handhelds.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * * 2 * *
11 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
@@ -14,6 +6,7 @@
14 * (at your option) any later version. * 6 * (at your option) any later version. *
15 * * 7 * *
16 ***************************************************************************/ 8 ***************************************************************************/
9// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
17 10
18#include <qcombobox.h> 11#include <qcombobox.h>
19#include <qstring.h> 12#include <qstring.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,12 +1,4 @@
1/*************************************************************************** 1/***************************************************************************
2 utils.h - description
3 -------------------
4 begin : Sun Apr 28 2002
5 copyright : (C) 2002 by tille
6 email : tille@handhelds.org
7 ***************************************************************************/
8
9/***************************************************************************
10 * * 2 * *
11 * This program is free software; you can redistribute it and/or modify * 3 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by * 4 * it under the terms of the GNU General Public License as published by *
@@ -14,5 +6,6 @@
14 * (at your option) any later version. * 6 * (at your option) any later version. *
15 * * 7 * *
16 ***************************************************************************/ 8 ***************************************************************************/
9// (c) 2002 Patrick S. Vogt <tille@handhelds.org>
17 10
18void setComboName( QComboBox*, QString ); 11void setComboName( QComboBox*, QString );