From 9cc9ed1e746477c59b1fd3d572cdce052f0ccf85 Mon Sep 17 00:00:00 2001 From: llornkcor Date: Wed, 13 Oct 2004 22:09:54 +0000 Subject: add proper case handling --- (limited to 'noncore/apps/advancedfm') diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index 8b98898..e770304 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -196,18 +196,20 @@ void AdvancedFm::doDelete() { }; } else { - if(doMsg) { - switch ( QMessageBox::warning(this,tr("Delete"), - tr("

Really delete %1?

").arg( myFile ), - tr("Yes"), tr("No"), 0, 0, 1) ) { - case 1: - return; - break; - default: - return; - break; - }; - } + if(doMsg) { + switch ( QMessageBox::warning(this,tr("Delete"), + tr("

Really delete %1?

").arg( myFile ), + tr("Yes"), tr("No"), 0, 0, 1) ) { + case 0; + break; + case 1: + return; + break; + default: + return; + break; + }; + } QString cmd="rm "+f; QFile file(f); @@ -322,6 +324,8 @@ void AdvancedFm::copy() { switch ( QMessageBox::warning(this,tr("File Exists!"), tr("

%1 already exists. Ok to overwrite?

").arg(item), tr("Yes"),tr("No"),0,0,1)) { + case 0; + break; case 1: return; break; @@ -430,7 +434,6 @@ void AdvancedFm::copySameDir() { tr("

%1 already exists. Do you really want to delete it?

").arg(destFile), tr("Yes"),tr("No"),0,0,1) ) { case 0: - f.remove(); break; case 1: -- cgit v0.9.0.2