summaryrefslogtreecommitdiff
authortille <tille>2002-05-26 12:17:56 (UTC)
committer tille <tille>2002-05-26 12:17:56 (UTC)
commit602e52f454a3d3a5cd973f3d7957d2d96f86464e (patch) (unidiff)
treeeff9aabdbf44804c1dcc42639eaa00fa92dd200c
parent26eb036407dbade370032dcca6af49d682f0ebf3 (diff)
downloadopie-602e52f454a3d3a5cd973f3d7957d2d96f86464e.zip
opie-602e52f454a3d3a5cd973f3d7957d2d96f86464e.tar.gz
opie-602e52f454a3d3a5cd973f3d7957d2d96f86464e.tar.bz2
do not close update windows when not successful
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/mainwindow.cpp2
-rw-r--r--noncore/unsupported/oipkg/package.cpp2
-rw-r--r--noncore/unsupported/oipkg/pmipkg.cpp5
3 files changed, 5 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/mainwindow.cpp b/noncore/unsupported/oipkg/mainwindow.cpp
index 9c4c752..27c9f4c 100644
--- a/noncore/unsupported/oipkg/mainwindow.cpp
+++ b/noncore/unsupported/oipkg/mainwindow.cpp
@@ -118,62 +118,62 @@ void MainWindow::makeMenu()
118 QString::null, 0, this, 0 ); 118 QString::null, 0, this, 0 );
119 connect( cfgact, SIGNAL( activated() ), 119 connect( cfgact, SIGNAL( activated() ),
120 SLOT( showSettings() ) ); 120 SLOT( showSettings() ) );
121 cfgact->addTo( cfgMenu ); 121 cfgact->addTo( cfgMenu );
122 122
123 cfgact = new QAction( tr( "Servers" ), 123 cfgact = new QAction( tr( "Servers" ),
124 QString::null, 0, this, 0 ); 124 QString::null, 0, this, 0 );
125 connect( cfgact, SIGNAL( activated() ), 125 connect( cfgact, SIGNAL( activated() ),
126 SLOT( showSettingsSrv() ) ); 126 SLOT( showSettingsSrv() ) );
127 cfgact->addTo( cfgMenu ); 127 cfgact->addTo( cfgMenu );
128 cfgact = new QAction( tr( "Destinations" ), 128 cfgact = new QAction( tr( "Destinations" ),
129 QString::null, 0, this, 0 ); 129 QString::null, 0, this, 0 );
130 connect( cfgact, SIGNAL( activated() ), 130 connect( cfgact, SIGNAL( activated() ),
131 SLOT( showSettingsDst() ) ); 131 SLOT( showSettingsDst() ) );
132 cfgact->addTo( cfgMenu ); 132 cfgact->addTo( cfgMenu );
133 133
134 QAction *a; 134 QAction *a;
135 135
136 // SECTIONS 136 // SECTIONS
137 sectionBar = new QPEToolBar( this ); 137 sectionBar = new QPEToolBar( this );
138 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE ); 138 addToolBar( sectionBar, "Section", QMainWindow::Top, TRUE );
139 sectionBar->setHorizontalStretchable( true ); 139 sectionBar->setHorizontalStretchable( true );
140 QLabel *label = new QLabel( tr("Section: "), sectionBar ); 140 QLabel *label = new QLabel( tr("Section: "), sectionBar );
141 label->setBackgroundColor( sectionBar->backgroundColor() ); 141 label->setBackgroundColor( sectionBar->backgroundColor() );
142 sectionBar->setStretchableWidget( label );
143 section = new QComboBox( false, sectionBar ); 142 section = new QComboBox( false, sectionBar );
144 label = new QLabel( " / ", sectionBar ); 143 label = new QLabel( " / ", sectionBar );
145 label->setBackgroundColor( sectionBar->backgroundColor() ); 144 label->setBackgroundColor( sectionBar->backgroundColor() );
146 subsection = new QComboBox( false, sectionBar ); 145 subsection = new QComboBox( false, sectionBar );
147 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 146 a = new QAction( tr( "Close Section" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
148 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) ); 147 connect( a, SIGNAL( activated() ), this, SLOT( sectionClose() ) );
149 a->addTo( sectionBar ); 148 a->addTo( sectionBar );
150 setSections(); 149 setSections();
151 setSubSections(); 150 setSubSections();
152 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 ); 151 sectionAction = new QAction( tr( "Sections" ), QString::null, 0, this, 0 );
153 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) ); 152 connect( sectionAction, SIGNAL( toggled(bool) ), this, SLOT( sectionShow(bool) ) );
154 sectionAction->setToggleAction( true ); 153 sectionAction->setToggleAction( true );
155 sectionAction->addTo( viewMenu ); 154 sectionAction->addTo( viewMenu );
155 sectionBar->setStretchableWidget( section );
156 156
157 //FIND 157 //FIND
158 findBar = new QPEToolBar(this); 158 findBar = new QPEToolBar(this);
159 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE ); 159 addToolBar( findBar, "Filter", QMainWindow::Top, TRUE );
160 label = new QLabel( tr("Filter: "), findBar ); 160 label = new QLabel( tr("Filter: "), findBar );
161 label->setBackgroundColor( findBar->backgroundColor() ); 161 label->setBackgroundColor( findBar->backgroundColor() );
162 findBar->setHorizontalStretchable( TRUE ); 162 findBar->setHorizontalStretchable( TRUE );
163 findEdit = new QLineEdit( findBar, "findEdit" ); 163 findEdit = new QLineEdit( findBar, "findEdit" );
164 findBar->setStretchableWidget( findEdit ); 164 findBar->setStretchableWidget( findEdit );
165 connect( findEdit, SIGNAL( textChanged( const QString & ) ), 165 connect( findEdit, SIGNAL( textChanged( const QString & ) ),
166 this, SLOT( displayList() ) ); 166 this, SLOT( displayList() ) );
167 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); 167 a = new QAction( tr( "Clear Find" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 );
168 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) ); 168 connect( a, SIGNAL( activated() ), findEdit, SLOT( clear() ) );
169 a->addTo( findBar ); 169 a->addTo( findBar );
170 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); 170 a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 );
171 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); 171 connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) );
172 a->addTo( findBar ); 172 a->addTo( findBar );
173 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 ); 173 findAction = new QAction( tr( "Filter" ), QString::null, 0, this, 0 );
174 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) ); 174 connect( findAction, SIGNAL( toggled(bool) ), this, SLOT( findShow(bool) ) );
175 findAction->setToggleAction( true ); 175 findAction->setToggleAction( true );
176 findAction->addTo( viewMenu ); 176 findAction->addTo( viewMenu );
177 177
178 //SEARCH 178 //SEARCH
179 searchBar = new QPEToolBar(this); 179 searchBar = new QPEToolBar(this);
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index 8c5f0ea..bfb48b3 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -29,49 +29,49 @@ void Package::init( PackageManagerSettings *s )
29 _name = ""; 29 _name = "";
30 _toProcess = false; 30 _toProcess = false;
31 _useFileName = false; 31 _useFileName = false;
32 _old = false; 32 _old = false;
33 _status = ""; 33 _status = "";
34 _dest = settings->getDestinationName(); 34 _dest = settings->getDestinationName();
35 _link = settings->createLinks(); 35 _link = settings->createLinks();
36 _versions=0; 36 _versions=0;
37 _version=""; 37 _version="";
38} 38}
39 39
40Package::Package( QStringList pack, PackageManagerSettings *s ) 40Package::Package( QStringList pack, PackageManagerSettings *s )
41 { 41 {
42 init(s); 42 init(s);
43 parsePackage( pack ); 43 parsePackage( pack );
44} 44}
45 45
46Package::Package( QString n, PackageManagerSettings *s ) 46Package::Package( QString n, PackageManagerSettings *s )
47 { 47 {
48 init(s); 48 init(s);
49 if ( !QFile::exists( n ) ) 49 if ( !QFile::exists( n ) )
50 { 50 {
51 _name = QString( n ); 51 _name = QString( n );
52 }else{ 52 }else{
53 pvDebug(2,"remote file: "+n); 53 pvDebug(4,"remote file: "+n);
54 parseIpkgFile( n ); 54 parseIpkgFile( n );
55 _useFileName = true; 55 _useFileName = true;
56 _fileName = QString( n ); 56 _fileName = QString( n );
57 } 57 }
58} 58}
59 59
60Package::Package( Package *pi ) 60Package::Package( Package *pi )
61{ 61{
62 init(pi->settings); 62 init(pi->settings);
63 copyValues( pi ); 63 copyValues( pi );
64} 64}
65 65
66 66
67void Package::setValue( QString n, QString t ) 67void Package::setValue( QString n, QString t )
68{ 68{
69 if ( n == "Package" ) 69 if ( n == "Package" )
70 { 70 {
71 _name = QString( t ); 71 _name = QString( t );
72 }else if ( n == "Installed-Size" ) 72 }else if ( n == "Installed-Size" )
73 { 73 {
74 _size = t; 74 _size = t;
75// }else if ( n == "Priority") 75// }else if ( n == "Priority")
76// { 76// {
77 77
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp
index 30777c2..0fa4c61 100644
--- a/noncore/unsupported/oipkg/pmipkg.cpp
+++ b/noncore/unsupported/oipkg/pmipkg.cpp
@@ -319,50 +319,51 @@ void PmIpkg::install()
319 319
320void PmIpkg::createLinks( const QString &dest ) 320void PmIpkg::createLinks( const QString &dest )
321{ 321{
322 pvDebug(2,"PmIpkg::createLinks "+dest); 322 pvDebug(2,"PmIpkg::createLinks "+dest);
323 linkOpp=createLink; 323 linkOpp=createLink;
324 QString url = settings->getDestinationUrlByName( dest ); 324 QString url = settings->getDestinationUrlByName( dest );
325 url = url==""?dest:url; 325 url = url==""?dest:url;
326 processLinkDir( "/opt", url ); 326 processLinkDir( "/opt", url );
327 processLinkDir( "/usr", url ); 327 processLinkDir( "/usr", url );
328} 328}
329 329
330void PmIpkg::removeLinks( const QString &dest ) 330void PmIpkg::removeLinks( const QString &dest )
331{ 331{
332 pvDebug(2,"PmIpkg::removeLinks "+dest); 332 pvDebug(2,"PmIpkg::removeLinks "+dest);
333 linkOpp=removeLink; 333 linkOpp=removeLink;
334 QString url = settings->getDestinationUrlByName( dest ); 334 QString url = settings->getDestinationUrlByName( dest );
335 url = url==""?dest:url; 335 url = url==""?dest:url;
336 processLinkDir( "/opt", url ); 336 processLinkDir( "/opt", url );
337 processLinkDir( "/usr", url ); 337 processLinkDir( "/usr", url );
338} 338}
339 339
340void PmIpkg::update() 340void PmIpkg::update()
341{ 341{
342 show(); 342 show();
343 runIpkg( "update" ); 343 if ( runIpkg( "update" ) )
344 runwindow->close(); 344 runwindow->close();
345 else out("An error occurred!\nPlease check the log.");
345} 346}
346 347
347void PmIpkg::out( QString o ) 348void PmIpkg::out( QString o )
348{ 349{
349 runwindow->outPut->append(o); 350 runwindow->outPut->append(o);
350 runwindow->outPut->setCursorPosition(runwindow->outPut->numLines() + 1,0,FALSE); 351 runwindow->outPut->setCursorPosition(runwindow->outPut->numLines() + 1,0,FALSE);
351} 352}
352 353
353 354
354 355
355 356
356void PmIpkg::show() 357void PmIpkg::show()
357{ 358{
358 if (!runwindow->isVisible()) 359 if (!runwindow->isVisible())
359 { 360 {
360 runwindow->showMaximized(); 361 runwindow->showMaximized();
361 runwindow->show(); 362 runwindow->show();
362 } 363 }
363 runwindow->outPut->setText(""); 364 runwindow->outPut->setText("");
364} 365}
365 366
366void PmIpkg::installFile(const QString &fileName, const QString &dest) 367void PmIpkg::installFile(const QString &fileName, const QString &dest)
367{ 368{
368 369