summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/advancedfm/advancedfmMenu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp
index 062a013..f46503c 100644
--- a/noncore/apps/advancedfm/advancedfmMenu.cpp
+++ b/noncore/apps/advancedfm/advancedfmMenu.cpp
@@ -42,97 +42,97 @@
42 42
43#include <stdlib.h> 43#include <stdlib.h>
44#include <unistd.h> 44#include <unistd.h>
45#include <sys/stat.h> 45#include <sys/stat.h>
46#include <dirent.h> 46#include <dirent.h>
47 47
48 48
49void AdvancedFm::doDirChange() 49void AdvancedFm::doDirChange()
50{ 50{
51 ListClicked( CurrentView()->currentItem()); 51 ListClicked( CurrentView()->currentItem());
52} 52}
53 53
54void AdvancedFm::showMenuHidden() 54void AdvancedFm::showMenuHidden()
55{ 55{
56 if (b) 56 if (b)
57 { 57 {
58 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 58 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
59 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 59 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
60 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 60 fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
61// b=FALSE; 61// b=FALSE;
62 62
63 } 63 }
64 else 64 else
65 { 65 {
66 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 66 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
67 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 67 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
68 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); 68 fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
69// b=TRUE; 69// b=TRUE;
70 } 70 }
71 populateView(); 71 populateView();
72// populateRemoteView(); 72// populateRemoteView();
73// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true"); 73// if(b) qDebug("<<<<<<<<<<<<<<<<<<<<<<<<<<<< true");
74 if(b) b = false; else b = true; 74 if(b) b = false; else b = true;
75} 75}
76 76
77void AdvancedFm::showHidden() 77void AdvancedFm::showHidden()
78{ 78{
79 if (b) 79 if (b)
80 { 80 {
81 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 81 CurrentDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
82 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All); 82 OtherDir()->setFilter( QDir::Files | QDir::Dirs | QDir::Hidden | QDir::All);
83// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE); 83// fileMenu->setItemChecked( fileMenu->idAt(0),TRUE);
84// b=FALSE; 84// b=FALSE;
85 85
86 } 86 }
87 else 87 else
88 { 88 {
89 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 89 CurrentDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
90 s OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); 90 OtherDir()->setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All);
91// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE); 91// fileMenu->setItemChecked( fileMenu->idAt(0),FALSE);
92// b=TRUE; 92// b=TRUE;
93 } 93 }
94 populateView(); 94 populateView();
95} 95}
96 96
97QString AdvancedFm::dealWithSymName(const QString &fileName) 97QString AdvancedFm::dealWithSymName(const QString &fileName)
98{ 98{
99 QString strItem = fileName; 99 QString strItem = fileName;
100 return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4); 100 return strItem.right( (strItem.length() - strItem.find("->",0,TRUE)) - 4);
101} 101}
102 102
103void AdvancedFm::runThis() 103void AdvancedFm::runThis()
104{ 104{
105 QString fs; 105 QString fs;
106 QDir *thisDir = CurrentDir(); 106 QDir *thisDir = CurrentDir();
107 107
108 QString curFile = CurrentView()->currentItem()->text(0); 108 QString curFile = CurrentView()->currentItem()->text(0);
109 QString path = thisDir->canonicalPath(); 109 QString path = thisDir->canonicalPath();
110 110
111 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink 111 if( curFile.find("@",0,TRUE) !=-1 || curFile.find("->",0,TRUE) !=-1 ) //if symlink
112 112
113 curFile = dealWithSymName((const QString&)curFile); 113 curFile = dealWithSymName((const QString&)curFile);
114 114
115 if(curFile != "../") 115 if(curFile != "../")
116 { 116 {
117 117
118 fs = getFileSystemType((const QString &) path); 118 fs = getFileSystemType((const QString &) path);
119 QFileInfo fileInfo( path + "/" + curFile); 119 QFileInfo fileInfo( path + "/" + curFile);
120 qDebug( fileInfo.owner()); 120 qDebug( fileInfo.owner());
121 121
122 if( (fileInfo.permission( QFileInfo::ExeUser) 122 if( (fileInfo.permission( QFileInfo::ExeUser)
123 | fileInfo.permission( QFileInfo::ExeGroup) 123 | fileInfo.permission( QFileInfo::ExeGroup)
124 | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) { 124 | fileInfo.permission( QFileInfo::ExeOther)) // & fs.find("vfat",0,TRUE) == -1) {
125 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) { 125 | fs == "vfat" && fileInfo.filePath().contains("/bin") ) {
126 QCopEnvelope e("QPE/System", "execute(QString)" ); 126 QCopEnvelope e("QPE/System", "execute(QString)" );
127 e << curFile; 127 e << curFile;
128 } 128 }
129 else 129 else
130 { 130 {
131 curFile = path + "/" + curFile; 131 curFile = path + "/" + curFile;
132 DocLnk nf(curFile); 132 DocLnk nf(curFile);
133 QString execStr = nf.exec(); 133 QString execStr = nf.exec();
134 qDebug( execStr); 134 qDebug( execStr);
135 if( execStr.isEmpty() ) 135 if( execStr.isEmpty() )
136 { 136 {
137 } 137 }
138 else 138 else