┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShaun Reich <[email protected]>2009-02-06 02:52:23 +0000
committerShaun Reich <[email protected]>2009-02-06 02:52:23 +0000
commit2a3e27b9fe8beae4fb93dce428c692936caaa03c (patch)
treef2d921891f0524d997e69487f188c756e58d7bd2 /src
parent5e20f374e306e75aa4881e598eb72bf8ffeeb1e7 (diff)
The column view did not obey single/double-click navigation settings, it does now. The signals were only connected to the singleClick(), not the doubleClick() method. They are now also connected/disconnected according to the setting that is set globally.
svn path=/trunk/KDE/kdebase/apps/; revision=921975
Diffstat (limited to 'src')
-rw-r--r--src/dolphincolumnwidget.cpp28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp
index 4a6527c1b..037818cec 100644
--- a/src/dolphincolumnwidget.cpp
+++ b/src/dolphincolumnwidget.cpp
@@ -414,7 +414,7 @@ void DolphinColumnWidget::contextMenuEvent(QContextMenuEvent* event)
const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos());
Q_ASSERT(m_view->m_controller->itemView() == this);
- m_view->m_controller->triggerContextMenuRequest(pos);
+ m_view->m_controller->triggerContextMenuRequest(event->pos());
}
void DolphinColumnWidget::wheelEvent(QWheelEvent* event)
@@ -493,10 +493,17 @@ void DolphinColumnWidget::activate()
{
setFocus(Qt::OtherFocusReason);
- connect(this, SIGNAL(clicked(const QModelIndex&)),
+ if (KGlobalSettings::singleClick()) {
+ connect(this, SIGNAL(clicked(const QModelIndex&)),
m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
- connect(this, SIGNAL(clicked(const QModelIndex&)),
+ connect(this, SIGNAL(clicked(const QModelIndex&)),
m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
+ } else {
+ connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
+ connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
+ }
if (selectionModel() && selectionModel()->currentIndex().isValid())
selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), QItemSelectionModel::SelectCurrent);
@@ -507,10 +514,17 @@ void DolphinColumnWidget::activate()
void DolphinColumnWidget::deactivate()
{
clearFocus();
-
- disconnect(this, SIGNAL(clicked(const QModelIndex&)),
- m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
-
+ if (KGlobalSettings::singleClick()) {
+ disconnect(this, SIGNAL(clicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
+ disconnect(this, SIGNAL(clicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
+ } else {
+ disconnect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
+ disconnect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ m_view->m_controller, SLOT(triggerItem(const QModelIndex&)));
+ }
const QModelIndex current = selectionModel()->currentIndex();
selectionModel()->clear();
selectionModel()->setCurrentIndex(current, QItemSelectionModel::NoUpdate);