summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp137
1 files changed, 80 insertions, 57 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 4802771..f25048a 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -159,2 +159,5 @@ void AdvancedFm::doDelete() {
159 break; 159 break;
160 default:
161 return;
162 break;
160 }; 163 };
@@ -180,12 +183,14 @@ void AdvancedFm::doDelete() {
180 case 0: 183 case 0:
181 { 184 {
182 f=f.left(f.length()-1); 185 f=f.left(f.length()-1);
183 QString cmd="rm -rf "+f; 186 QString cmd="rm -rf "+f;
184 startProcess( (const QString)cmd.latin1() ); 187 startProcess( (const QString)cmd.latin1() );
185 populateView(); 188 populateView();
186 } 189 }
187 break; 190 break;
188 case 1: 191 case 1:
189 // exit 192 // exit
190 break; 193 break;
194 default:
195 break;
191 }; 196 };
@@ -194,9 +199,12 @@ void AdvancedFm::doDelete() {
194 if(doMsg) { 199 if(doMsg) {
195 switch ( QMessageBox::warning(this,tr("Delete"), 200 switch ( QMessageBox::warning(this,tr("Delete"),
196 tr("<p>Really delete %1?</p>").arg( myFile ), 201 tr("<p>Really delete %1?</p>").arg( myFile ),
197 tr("Yes"), tr("No"), 0, 0, 1) ) { 202 tr("Yes"), tr("No"), 0, 0, 1) ) {
198 case 1: 203 case 1:
199 return; 204 return;
200 break; 205 break;
201 }; 206 default:
207 return;
208 break;
209 };
202 } 210 }
@@ -286,8 +294,11 @@ void AdvancedFm::copy() {
286 { 294 {
287 case 0: 295 case 0:
288 doMsg=false; 296 doMsg=false;
289 break; 297 break;
290 case 1: 298 case 1:
291 return; 299 return;
292 break; 300 break;
301 default:
302 return;
303 break;
293 }; 304 };
@@ -310,9 +321,12 @@ void AdvancedFm::copy() {
310 if(doMsg) { 321 if(doMsg) {
311 switch ( QMessageBox::warning(this,tr("File Exists!"), 322 switch ( QMessageBox::warning(this,tr("File Exists!"),
312 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item), 323 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(item),
313 tr("Yes"),tr("No"),0,0,1)) { 324 tr("Yes"),tr("No"),0,0,1)) {
314 case 1: 325 case 1:
315 return; 326 return;
316 break; 327 break;
317 }; 328 default:
329 return;
330 break;
331 };
318 } 332 }
@@ -359,12 +373,15 @@ void AdvancedFm::copyAs() {
359 if( f.exists()) { 373 if( f.exists()) {
360 switch (QMessageBox::warning(this,tr("File Exists!"), 374 switch (QMessageBox::warning(this,tr("File Exists!"),
361 tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item), 375 tr("<P> %1 already exists. Ok to overwrite?</p>").arg(item),
362 tr("Yes"),tr("No"),0,0,1) ) { 376 tr("Yes"),tr("No"),0,0,1) ) {
363 case 0: 377 case 0:
364 f.remove(); 378 f.remove();
365 break; 379 break;
366 case 1: 380 case 1:
367 return; 381 return;
368 break; 382 break;
369 }; 383 default:
384 return;
385 break;
386 };
370 } 387 }
@@ -411,13 +428,16 @@ void AdvancedFm::copySameDir() {
411 if( f.exists()) { 428 if( f.exists()) {
412 switch (QMessageBox::warning(this,tr("Delete"), 429 switch (QMessageBox::warning(this,tr("Delete"),
413 tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile), 430 tr("<p> %1 already exists. Do you really want to delete it?</P>").arg(destFile),
414 tr("Yes"),tr("No"),0,0,1) ) { 431 tr("Yes"),tr("No"),0,0,1) ) {
415 case 0: 432 case 0:
416 433
417 f.remove(); 434 f.remove();
418 break; 435 break;
419 case 1: 436 case 1:
420 return; 437 return;
421 break; 438 break;
422 }; 439 default:
440 return;
441 break;
442 };
423 } 443 }
@@ -469,9 +489,12 @@ void AdvancedFm::move() {
469 if( f.exists()) { 489 if( f.exists()) {
470 switch ( QMessageBox::warning(this,tr("File Exists!"), 490 switch ( QMessageBox::warning(this,tr("File Exists!"),
471 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile), 491 tr("<p>%1 already exists. Ok to overwrite?</P>").arg(destFile),
472 tr("Yes"),tr("No"),0,0,1)) { 492 tr("Yes"),tr("No"),0,0,1)) {
473 case 1: 493 case 1:
474 return; 494 return;
475 break; 495 break;
476 }; 496 default:
497 return;
498 break;
499 };
477 if( !copyFile( curFile, destFile) ) { 500 if( !copyFile( curFile, destFile) ) {