┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2009-07-11 18:56:03 +0000
committerPeter Penz <[email protected]>2009-07-11 18:56:03 +0000
commit430c2e768c58399bc998df8cd3f499f1bd48b9ea (patch)
tree722bd38f3e1bef90df20120cd42eb03cc4df0532 /src
parent00cc24a9ba88ce6aac51dcdd2027fdd79387907c (diff)
Don't open folders on a single-click in the column view when the mouse settings specify double-click. Originally this was meant as a kind of feature (open files on double-click, but folders still on single-click), but it has been received as bug.
BUG: 198464 svn path=/trunk/KDE/kdebase/apps/; revision=995029
Diffstat (limited to 'src')
-rw-r--r--src/dolphincolumnwidget.cpp48
-rw-r--r--src/dolphincolumnwidget.h2
2 files changed, 14 insertions, 36 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp
index c8bff0290..b4c9f11c1 100644
--- a/src/dolphincolumnwidget.cpp
+++ b/src/dolphincolumnwidget.cpp
@@ -500,28 +500,6 @@ void DolphinColumnWidget::slotEntered(const QModelIndex& index)
m_view->m_controller->emitItemEntered(index);
}
-void DolphinColumnWidget::slotClicked(const QModelIndex& index)
-{
- DolphinController* controller = m_view->m_controller;
- if (KGlobalSettings::singleClick()) {
- controller->triggerItem(index);
- } else {
- // even when using double click, a directory should be opened
- // after the first click
- const KFileItem item = controller->itemForIndex(index);
- if (!item.isNull() && item.isDir()) {
- controller->triggerItem(index);
- }
- }
-}
-
-void DolphinColumnWidget::slotDoubleClicked(const QModelIndex& index)
-{
- if (!KGlobalSettings::singleClick()) {
- m_view->m_controller->triggerItem(index);
- }
-}
-
void DolphinColumnWidget::requestActivation()
{
m_view->m_controller->setItemView(this);
@@ -547,12 +525,13 @@ void DolphinColumnWidget::activate()
{
setFocus(Qt::OtherFocusReason);
- connect(this, SIGNAL(clicked(const QModelIndex&)),
- m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
- connect(this, SIGNAL(clicked(const QModelIndex&)),
- this, SLOT(slotClicked(const QModelIndex&)));
- connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
- this, SLOT(slotDoubleClicked(const QModelIndex&)));
+ if (KGlobalSettings::singleClick()) {
+ 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(triggerItem(const QModelIndex&)));
+ }
if (selectionModel() && selectionModel()->currentIndex().isValid()) {
selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), QItemSelectionModel::SelectCurrent);
@@ -564,12 +543,13 @@ void DolphinColumnWidget::activate()
void DolphinColumnWidget::deactivate()
{
clearFocus();
- disconnect(this, SIGNAL(clicked(const QModelIndex&)),
- m_view->m_controller, SLOT(requestTab(const QModelIndex&)));
- disconnect(this, SIGNAL(clicked(const QModelIndex&)),
- this, SLOT(slotClicked(const QModelIndex&)));
- disconnect(this, SIGNAL(doubleClicked(const QModelIndex&)),
- this, SLOT(slotDoubleClicked(const QModelIndex&)));
+ if (KGlobalSettings::singleClick()) {
+ 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(triggerItem(const QModelIndex&)));
+ }
const QModelIndex current = selectionModel()->currentIndex();
selectionModel()->clear();
diff --git a/src/dolphincolumnwidget.h b/src/dolphincolumnwidget.h
index 02c9aea81..03e406f75 100644
--- a/src/dolphincolumnwidget.h
+++ b/src/dolphincolumnwidget.h
@@ -138,8 +138,6 @@ protected:
private slots:
void slotEntered(const QModelIndex& index);
- void slotClicked(const QModelIndex& index);
- void slotDoubleClicked(const QModelIndex& index);
void requestActivation();
void updateFont();