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: peter.penz@gmx.at
svn path=/trunk/KDE/kdebase/apps/; revision=871109
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&)),
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
}
void DolphinView::updateZoomLevel(int oldZoomLevel)
-{
+{
const int newZoomLevel = ZoomLevelInfo::zoomLevelForIconSize(itemView()->iconSize());
if (oldZoomLevel != newZoomLevel) {
m_controller->setZoomLevel(newZoomLevel);
KUrl::List DolphinView::simplifiedSelectedUrls() const
{
KUrl::List list = selectedUrls();
- if ((m_detailsView != 0) && m_detailsView->itemsExpandable()) {
+ if (itemsExpandable() ) {
list = KonqOperations::simplifiedUrlList(list);
}
return list;
}
+bool DolphinView::itemsExpandable() const
+{
+ return (m_detailsView != 0) && m_detailsView->itemsExpandable();
+}
+
#include "dolphinview.moc"
void setTabsForFilesEnabled(bool tabsForFiles);
bool isTabsForFilesEnabled() const;
+ /**
+ * Returns true if the current view allows folders to be expanded,
+ * i.e. presents a hierarchical view to the user.
+ */
+ bool itemsExpandable() const;
+
public slots:
/**
* Changes the directory to \a url. If the current directory is equal to