summaryrefslogtreecommitdiff
path: root/noncore/apps/advancedfm/advancedfmMenu.cpp
Unidiff
Diffstat (limited to 'noncore/apps/advancedfm/advancedfmMenu.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 575833a..2201960 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -1,12 +1,12 @@
1/*************************************************************************** 1/***************************************************************************
2 AdvancedFm.cpp 2 AdvancedFm.cpp
3 ------------------- 3 -------------------
4 ** Created: Sat Mar 9 23:33:09 2002 4 ** Created: Sat Mar 9 23:33:09 2002
5 copyright : (C) 2002 by ljp 5 copyright : (C) 2002 by ljp
6 email : ljp@llornkcor.com 6 email : ljp@llornkcor.com
7 * This program is free software; you can redistribute it and/or modify * 7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by * 8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or * 9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. * 10 * (at your option) any later version. *
11 ***************************************************************************/ 11 ***************************************************************************/
12#include "advancedfm.h" 12#include "advancedfm.h"
@@ -200,13 +200,13 @@ void AdvancedFm::doDelete()
200 myFile = myFile.left( myFile.find(" -> ",0,TRUE)); 200 myFile = myFile.left( myFile.find(" -> ",0,TRUE));
201 201
202 QString f = CurrentDir()->canonicalPath(); 202 QString f = CurrentDir()->canonicalPath();
203 if(f.right(1).find("/",0,TRUE) == -1) 203 if(f.right(1).find("/",0,TRUE) == -1)
204 f += "/"; 204 f += "/";
205 f += myFile; 205 f += myFile;
206 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) 206 if(QDir(f).exists() && !QFileInfo(f).isSymLink() ) //if file is a directory
207 { 207 {
208 switch ( QMessageBox::warning( this, tr("Delete Directory?"), tr("Really delete\n") + f + 208 switch ( QMessageBox::warning( this, tr("Delete Directory?"), tr("Really delete\n") + f +
209 "\nand all it's contents ?" 209 "\nand all it's contents ?"
210 ,tr("Yes"),tr("No"),0,0,1) ) 210 ,tr("Yes"),tr("No"),0,0,1) )
211 { 211 {
212 case 0: 212 case 0:
@@ -230,14 +230,19 @@ void AdvancedFm::doDelete()
230 return; 230 return;
231 break; 231 break;
232 }; 232 };
233 } 233 }
234 QString cmd="rm "+f; 234 QString cmd="rm "+f;
235 QFile file(f); 235 QFile file(f);
236 if(QFileInfo(myFile).fileName().find("../",0,TRUE)==-1) 236 if(QFileInfo(myFile).fileName().find("../",0,TRUE)==-1) {
237 file.remove(); 237 qDebug("remove link files "+f);
238// AppLnk lnk(f);
239// qDebug(lnk.linkFile());
240// lnk.removeLinkFile();
241 file.remove();
242 }
238 } 243 }
239 } 244 }
240 } 245 }
241 populateView(); 246 populateView();
242} 247}
243 248
@@ -882,6 +887,10 @@ void AdvancedFm::okRename()
882 oldName = ""; 887 oldName = "";
883 888
884 view->takeItem( view->currentItem() ); 889 view->takeItem( view->currentItem() );
885 delete view->currentItem(); 890 delete view->currentItem();
886 populateView(); 891 populateView();
887} 892}
893
894void AdvancedFm::openSearch() {
895
896}