#include "dolphin_columnmodesettings.h"
#include "dolphin_generalsettings.h"
#include "draganddrophelper.h"
+#include "folderexpander.h"
#include "iconmanager.h"
#include "selectionmanager.h"
#include "tooltipmanager.h"
m_proxyModel->setSortOrder(dolphinView->sortOrder());
setModel(m_proxyModel);
- const bool useSelManager = KGlobalSettings::singleClick() &&
- DolphinSettings::instance().generalSettings()->showSelectionToggle();
- if (useSelManager) {
+
+ if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) {
m_selectionManager = new SelectionManager(this);
connect(m_selectionManager, SIGNAL(selectionChanged()),
this, SLOT(requestActivation()));
connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()),
this, SLOT(updateFont()));
+
+ FolderExpander* folderExpander = new FolderExpander(this, m_proxyModel);
+ folderExpander->setEnabled(DolphinSettings::instance().generalSettings()->autoExpandFolders());
+ connect (folderExpander, SIGNAL(enterDir(const QModelIndex&)),
+ m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
}
DolphinColumnWidget::~DolphinColumnWidget()
Q_ASSERT(m_view->m_controller->itemView() == this);
m_view->m_controller->triggerUrlChangeRequest(m_url);
}
+ Q_ASSERT(m_active);
QListView::contextMenuEvent(event);
clearSelection();
}
- if (index.isValid() || m_active) {
- // Only open a context menu above an item or if the mouse is above
- // the active column.
- const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos());
- Q_ASSERT(m_view->m_controller->itemView() == this);
- m_view->m_controller->triggerContextMenuRequest(pos);
- }
+ const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos());
+ Q_ASSERT(m_view->m_controller->itemView() == this);
+ m_view->m_controller->triggerContextMenuRequest(pos);
}
void DolphinColumnWidget::wheelEvent(QWheelEvent* event)