summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index dee834e..ccce401 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -362,6 +362,7 @@ void NetworkPackageManager :: upgradePackages()
362 362
363void NetworkPackageManager :: downloadPackage() 363void NetworkPackageManager :: downloadPackage()
364{ 364{
365 bool doUpdate = true;
365 if ( download->text() == "Download" ) 366 if ( download->text() == "Download" )
366 { 367 {
367 // First, write out ipkg_conf file so that ipkg can use it 368 // First, write out ipkg_conf file so that ipkg can use it
@@ -420,6 +421,7 @@ void NetworkPackageManager :: downloadPackage()
420 } 421 }
421 else if ( download->text() == "Remove" ) 422 else if ( download->text() == "Remove" )
422 { 423 {
424 doUpdate = false;
423 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild(); 425 for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
424 item != 0 ; 426 item != 0 ;
425 item = (QCheckListItem *)item->nextSibling() ) 427 item = (QCheckListItem *)item->nextSibling() )
@@ -436,14 +438,25 @@ void NetworkPackageManager :: downloadPackage()
436 name.truncate( pos - 1 ); 438 name.truncate( pos - 1 );
437 439
438 Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name ); 440 Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name );
439 QFile f( p->getFilename() ); 441
440 f.remove(); 442 QString msgtext;
443 msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() );
444 if ( QMessageBox::information( this, "Are you sure?",
445 msgtext, "No", "Yes" ) == 1 )
446 {
447 doUpdate = true;
448 QFile f( p->getFilename() );
449 f.remove();
450 }
441 } 451 }
442 } 452 }
443 } 453 }
444 454
445 dataMgr->reloadServerData(); 455 if ( doUpdate )
446 serverSelected( -1 ); 456 {
457 dataMgr->reloadServerData();
458 serverSelected( -1 );
459 }
447} 460}
448 461
449 462