Diffstat (limited to 'noncore/unsupported/oipkg/pmipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index fe200f5..1798c80 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp | |||
@@ -265,98 +265,88 @@ void PmIpkg::startDialog() | |||
265 | QGroupBox *GroupBox1 = new QGroupBox( installDialog, "Ipkg" ); | 265 | QGroupBox *GroupBox1 = new QGroupBox( installDialog, "Ipkg" ); |
266 | GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().mayShrinkVertically() ) ); | 266 | GroupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)3, GroupBox1->sizePolicy().mayShrinkVertically() ) ); |
267 | GroupBox1->setTitle( tr( "Ipkg options" ) ); | 267 | GroupBox1->setTitle( tr( "Ipkg options" ) ); |
268 | GroupBox1->setColumnLayout(0, Qt::Vertical ); | 268 | GroupBox1->setColumnLayout(0, Qt::Vertical ); |
269 | GroupBox1->layout()->setSpacing( 0 ); | 269 | GroupBox1->layout()->setSpacing( 0 ); |
270 | GroupBox1->layout()->setMargin( 0 ); | 270 | GroupBox1->layout()->setMargin( 0 ); |
271 | QGridLayout *GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); | 271 | QGridLayout *GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); |
272 | GroupBox1Layout->setAlignment( Qt::AlignTop ); | 272 | GroupBox1Layout->setAlignment( Qt::AlignTop ); |
273 | GroupBox1Layout->setSpacing( 3 ); | 273 | GroupBox1Layout->setSpacing( 3 ); |
274 | GroupBox1Layout->setMargin( 3 ); | 274 | GroupBox1Layout->setMargin( 3 ); |
275 | _force_depends = new QCheckBox( GroupBox1, "_force_depends" ); | 275 | _force_depends = new QCheckBox( GroupBox1, "_force_depends" ); |
276 | _force_depends->setText( tr( "-force-depends" ) ); | 276 | _force_depends->setText( tr( "-force-depends" ) ); |
277 | _force_depends->setAutoResize( TRUE ); | 277 | _force_depends->setAutoResize( TRUE ); |
278 | _force_depends->setChecked(true); | 278 | _force_depends->setChecked(true); |
279 | GroupBox1Layout->addWidget( _force_depends, 0, 0 ); | 279 | GroupBox1Layout->addWidget( _force_depends, 0, 0 ); |
280 | _force_reinstall = new QCheckBox( GroupBox1, "_force_reinstall" ); | 280 | _force_reinstall = new QCheckBox( GroupBox1, "_force_reinstall" ); |
281 | _force_reinstall->setText( tr( "-force-reinstall" ) ); | 281 | _force_reinstall->setText( tr( "-force-reinstall" ) ); |
282 | _force_reinstall->setAutoResize( TRUE ); | 282 | _force_reinstall->setAutoResize( TRUE ); |
283 | GroupBox1Layout->addWidget( _force_reinstall, 1, 0 ); | 283 | GroupBox1Layout->addWidget( _force_reinstall, 1, 0 ); |
284 | _force_remove = new QCheckBox( GroupBox1, "_force_remove" ); | 284 | _force_remove = new QCheckBox( GroupBox1, "_force_remove" ); |
285 | _force_remove->setText( tr( "-force-removal-of-essential-packages" ) ); | 285 | _force_remove->setText( tr( "-force-removal-of-essential-packages" ) ); |
286 | _force_remove->setAutoResize( TRUE ); | 286 | _force_remove->setAutoResize( TRUE ); |
287 | GroupBox1Layout->addWidget( _force_remove, 1, 0 ); | 287 | GroupBox1Layout->addWidget( _force_remove, 1, 0 ); |
288 | RunWindowLayout->addWidget( GroupBox1 , 3, 0 ); | 288 | RunWindowLayout->addWidget( GroupBox1 , 3, 0 ); |
289 | |||
290 | // connect( doItButton, SIGNAL( clicked() ), | ||
291 | // this, SLOT( doIt() ) ); | ||
292 | // connect( installButton, SIGNAL( clicked() ), | ||
293 | // this, SLOT( install() ) ); | ||
294 | // connect( removeButton, SIGNAL( clicked() ), | ||
295 | // this, SLOT( remove() ) ); | ||
296 | // connect( cancelButton, SIGNAL( clicked() ), | ||
297 | // installDialog, SLOT( close() ) ); | ||
298 | installDialog->showMaximized(); | 289 | installDialog->showMaximized(); |
299 | if ( installDialog->exec() ) doIt(); | 290 | if ( installDialog->exec() ) doIt(); |
300 | installDialog->close(); | 291 | installDialog->close(); |
301 | out(tr("<b>All done.</b>")); | 292 | out(tr("<b>All done.</b>")); |
302 | } | 293 | } |
303 | 294 | ||
304 | void PmIpkg::doIt() | 295 | void PmIpkg::doIt() |
305 | { | 296 | { |
306 | show( true ); | 297 | show( true ); |
307 | remove(); | 298 | remove(); |
308 | install(); | 299 | install(); |
309 | } | 300 | } |
310 | 301 | ||
311 | 302 | ||
312 | void PmIpkg::remove() | 303 | void PmIpkg::remove() |
313 | { | 304 | { |
314 | if ( to_remove.count() == 0 ) return; | 305 | if ( to_remove.count() == 0 ) return; |
315 | 306 | ||
316 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); | 307 | out("<b>"+tr("Removing")+"<br>"+tr("please wait")+"</b><br><hr>"); |
317 | 308 | ||
318 | QStringList *fileList; | 309 | QStringList *fileList; |
319 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) | 310 | for (Package *it=to_remove.first(); it != 0; it=to_remove.next() ) |
320 | { | 311 | { |
321 | if ( it->link() )fileList = getList( it->name(), it->dest() ); | 312 | if ( it->link() )fileList = getList( it->name(), it->dest() ); |
322 | if ( runIpkg("remove " + it->name()) == 0) | 313 | if ( runIpkg("remove " + it->name()) == 0) |
323 | { | 314 | { |
324 | runwindow->progress->setProgress( 1 + runwindow->progress->progress() ); | 315 | runwindow->progress->setProgress( 1 + runwindow->progress->progress() ); |
325 | linkOpp = removeLink; | 316 | linkOpp = removeLink; |
326 | if ( it->link() ) | 317 | if ( it->link() ) |
327 | { | 318 | { |
328 | out( "<br>removing links<br>" ); | 319 | out( "<br>removing links<br>" ); |
329 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 320 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); |
330 | processFileList( fileList, it->dest() ); | 321 | processFileList( fileList, it->dest() ); |
331 | } | 322 | } |
332 | it->processed(); | 323 | it->processed(); |
333 | 324 | ||
334 | out("<br><hr>"); | 325 | out("<br><hr>"); |
335 | }else{ | 326 | }else{ |
336 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); | 327 | out("<b>"+tr("Error while removing")+"</b><hr>"+it->name()); |
337 | } | 328 | } |
338 | pvDebug(2,"delete File List"); | ||
339 | if ( it->link() )delete fileList; | 329 | if ( it->link() )delete fileList; |
340 | } | 330 | } |
341 | out("<br>"); | 331 | out("<br>"); |
342 | } | 332 | } |
343 | 333 | ||
344 | 334 | ||
345 | void PmIpkg::install() | 335 | void PmIpkg::install() |
346 | { | 336 | { |
347 | if ( to_install.count() == 0 ) return; | 337 | if ( to_install.count() == 0 ) return; |
348 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); | 338 | out("<b>"+tr("Installing")+"<br>"+tr("please wait")+"</b><br>"); |
349 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) | 339 | for (Package *it=to_install.first(); it != 0; it=to_install.next() ) |
350 | { | 340 | { |
351 | 341 | ||
352 | if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) | 342 | if ( runIpkg("install " + it->installName(), it->dest() ) == 0 ) |
353 | { | 343 | { |
354 | runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress()); | 344 | runwindow->progress->setProgress( it->size().toInt() + runwindow->progress->progress()); |
355 | linkOpp = createLink; | 345 | linkOpp = createLink; |
356 | if ( it->link() ) | 346 | if ( it->link() ) |
357 | { | 347 | { |
358 | out( "<br>creating links<br>" ); | 348 | out( "<br>creating links<br>" ); |
359 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); | 349 | out( "for package "+it->name()+" in "+it->dest()+"<br>" ); |
360 | makeLinks( it ); | 350 | makeLinks( it ); |
361 | } | 351 | } |
362 | it->processed(); | 352 | it->processed(); |