summaryrefslogtreecommitdiff
authorandyq <andyq>2002-11-02 14:02:34 (UTC)
committer andyq <andyq>2002-11-02 14:02:34 (UTC)
commite622033e90f34ba60075f30a9049b0b266c61cb5 (patch) (side-by-side diff)
tree19c93b79359661222902edf71e9ea89c6ff66aef
parentcf34849ac5c3eb9d16929cc88834973910209f74 (diff)
downloadopie-e622033e90f34ba60075f30a9049b0b266c61cb5.zip
opie-e622033e90f34ba60075f30a9049b0b266c61cb5.tar.gz
opie-e622033e90f34ba60075f30a9049b0b266c61cb5.tar.bz2
Nows asks before deleting local ipk files
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
@@ -363,4 +363,5 @@ void NetworkPackageManager :: upgradePackages()
void NetworkPackageManager :: downloadPackage()
{
+ bool doUpdate = true;
if ( download->text() == "Download" )
{
@@ -421,4 +422,5 @@ void NetworkPackageManager :: downloadPackage()
else if ( download->text() == "Remove" )
{
+ doUpdate = false;
for ( QCheckListItem *item = (QCheckListItem *)packagesList->firstChild();
item != 0 ;
@@ -437,4 +439,11 @@ void NetworkPackageManager :: downloadPackage()
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();
@@ -442,8 +451,12 @@ void NetworkPackageManager :: downloadPackage()
}
}
+ }
+ if ( doUpdate )
+ {
dataMgr->reloadServerData();
serverSelected( -1 );
}
+}