┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/urlnavigatorbutton.cpp
diff options
context:
space:
mode:
authorAaron J. Seigo <[email protected]>2007-03-03 03:07:04 +0000
committerAaron J. Seigo <[email protected]>2007-03-03 03:07:04 +0000
commit9d24c28b4ba3ac62b698a53925f9747850959d63 (patch)
tree62ee86ecba7cc36e8c3e766f2f3c4334ae496956 /src/urlnavigatorbutton.cpp
parent73f6409fe052a063d1089b76f7de5b4832c22c68 (diff)
respect the show hidden files settingin the url nav bar
svn path=/trunk/KDE/kdebase/apps/; revision=638732
Diffstat (limited to 'src/urlnavigatorbutton.cpp')
-rw-r--r--src/urlnavigatorbutton.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/urlnavigatorbutton.cpp b/src/urlnavigatorbutton.cpp
index 3be037ced..c97a560ba 100644
--- a/src/urlnavigatorbutton.cpp
+++ b/src/urlnavigatorbutton.cpp
@@ -270,7 +270,7 @@ void UrlNavigatorButton::startListJob()
}
const KUrl& url = urlNavigator()->url(m_index);
- m_listJob = KIO::listDir(url, false, false);
+ m_listJob = KIO::listDir(url, false, urlNavigator()->showHiddenFiles());
m_subdirs.clear(); // just to be ++safe
connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
@@ -286,6 +286,8 @@ void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
KIO::UDSEntryList::const_iterator it = entries.constBegin();
KIO::UDSEntryList::const_iterator itEnd = entries.constEnd();
+
+ bool showHidden = urlNavigator()->showHiddenFiles();
while (it != itEnd) {
QString name;
//bool isDir = false;
@@ -314,7 +316,11 @@ void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
*/
if (entry.isDir()) {
- m_subdirs.append(entry.stringValue(KIO::UDS_NAME));
+ QString dir = entry.stringValue(KIO::UDS_NAME);
+
+ if (!showHidden || (dir != "." && dir != "..")) {
+ m_subdirs.append(entry.stringValue(KIO::UDS_NAME));
+ }
}
++it;