summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp13
1 files changed, 13 insertions, 0 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()
void NetworkPackageManager :: downloadPackage()
{
+ bool doUpdate = true;
if ( download->text() == "Download" )
{
// First, write out ipkg_conf file so that ipkg can use it
@@ -420,6 +421,7 @@ void NetworkPackageManager :: downloadPackage()
}
else if ( download->text() == "Remove" )
{
+ doUpdate = false;
for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
item != 0 ;
item = (QCheckListItem *)item->nextSibling() )
@@ -436,15 +438,26 @@ void NetworkPackageManager :: downloadPackage()
name.truncate( pos - 1 );
Package *p = dataMgr->getServer( serversList->currentText() )->getPackage( name );
+
+ QString msgtext;
+ msgtext.sprintf( "Are you sure you wish to delete\n%s?", (const char *)p->getPackageName() );
+ if ( QMessageBox::information( this, "Are you sure?",
+ msgtext, "No", "Yes" ) == 1 )
+ {
+ doUpdate = true;
QFile f( p->getFilename() );
f.remove();
}
}
}
+ }
+ if ( doUpdate )
+ {
dataMgr->reloadServerData();
serverSelected( -1 );
}
+}
void NetworkPackageManager :: applyChanges()