diff options
| author | Peter Penz <[email protected]> | 2010-11-18 16:18:07 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-11-18 16:18:07 +0000 |
| commit | 9a189645cc4218e0efe5a718a4ac46ed006e6512 (patch) | |
| tree | 59d2570e777756122b141fedfeb84ce93bb13b27 /src/views/viewproperties.cpp | |
| parent | 9e29e6426b149e05ab61b39f1969513c358fc1e7 (diff) | |
- When showing the trash content, use the details view with path as default view
- Assure that the original path is shown for the trash protocol within Dolphin
svn path=/trunk/KDE/kdebase/apps/; revision=1198481
Diffstat (limited to 'src/views/viewproperties.cpp')
| -rw-r--r-- | src/views/viewproperties.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index d5330ffaa..ed055e09e 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -53,9 +53,13 @@ ViewProperties::ViewProperties(const KUrl& url) : // We try and save it to the file .directory in the directory being viewed. // If the directory is not writable by the user or the directory is not local, // we store the properties information in a local file. - const bool isSearchUrl = url.protocol().contains("search"); - if (isSearchUrl) { + bool useDetailsViewWithPath = false; + if (url.protocol().contains("search")) { m_filePath = destinationDir("search"); + useDetailsViewWithPath = true; + } else if (url.protocol() == QLatin1String("trash")) { + m_filePath = destinationDir("trash"); + useDetailsViewWithPath = true; } else if (useGlobalViewProps) { m_filePath = destinationDir("global"); } else if (url.isLocalFile()) { @@ -73,11 +77,11 @@ ViewProperties::ViewProperties(const KUrl& url) : // If the .directory file does not exist or the timestamp is too old, // use default values instead. - const bool useDefaultProps = (!useGlobalViewProps || isSearchUrl) && + const bool useDefaultProps = (!useGlobalViewProps || useDetailsViewWithPath) && (!QFileInfo(file).exists() || (m_node->timestamp() < settings->viewPropsTimestamp())); if (useDefaultProps) { - if (isSearchUrl) { + if (useDetailsViewWithPath) { setViewMode(DolphinView::DetailsView); setAdditionalInfo(KFileItemDelegate::InformationList() << KFileItemDelegate::LocalPathOrUrl); } else { |
