diff options
| author | David Faure <[email protected]> | 2008-10-13 21:54:03 +0000 |
|---|---|---|
| committer | David Faure <[email protected]> | 2008-10-13 21:54:03 +0000 |
| commit | 76fa5aec6b7af0740876db86c2eb0ef7f6270486 (patch) | |
| tree | 7fe9f39752ba70885a1b186333b7b5d9e1d35188 /src/dolphinpart.cpp | |
| parent | 3b77f108ae1d08e663d06394484c6f0c3100a12a (diff) | |
Konq popupmenu fix: we don't show the "Create new" submenu over subdirs in an iconview because you wouldn't see the just-created file/dir,
but let's show it in the case of the hiearchical details view ("folders expandable" option), since you can indeed see the new file/dir in that case. Peter: problem solved with itemsExpandable().
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=871109
Diffstat (limited to 'src/dolphinpart.cpp')
| -rw-r--r-- | src/dolphinpart.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp index 85ca9e473..05bc2216a 100644 --- a/src/dolphinpart.cpp +++ b/src/dolphinpart.cpp @@ -107,7 +107,7 @@ DolphinPart::DolphinPart(QWidget* parentWidget, QObject* parent, const QVariantL this, SLOT(slotRequestUrlChange(KUrl))); connect(m_view, SIGNAL(modeChanged()), this, SIGNAL(viewModeChanged())); // relay signal - + // Watch for changes that should result in updates to the // status bar text. connect(m_dirLister, SIGNAL(deleteItem(const KFileItem&)), @@ -393,6 +393,13 @@ void DolphinPart::slotOpenContextMenu(const KFileItem& _item, const KUrl&) if (addDel) editActions.append(actionCollection()->action("delete")); actionGroups.insert("editactions", editActions); + + // Normally KonqPopupMenu only shows the "Create new" subdir in the current view + // since otherwise the created file would not be visible. + // But in treeview mode we should allow it. + if (m_view->itemsExpandable()) + popupFlags |= KParts::BrowserExtension::ShowCreateDirectory; + } // TODO: We should change the signature of the slots (and signals) for being able |
