From: Peter Penz Date: Fri, 27 Jun 2008 20:20:33 +0000 (+0000) Subject: Also allow to use the selection toggle when double click is used. This allows to... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/15979f49c00ef380a1d19f38c0467283e5841ec5 Also allow to use the selection toggle when double click is used. This allows to select/deselect files without CTRL key. BUG: 165115 svn path=/trunk/KDE/kdebase/apps/; revision=825325 --- diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 3b94d42ac..1d4837b12 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -121,9 +121,8 @@ DolphinColumnWidget::DolphinColumnWidget(QWidget* parent, 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())); diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index e33b57500..7c42d13fc 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -100,17 +100,19 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr if (KGlobalSettings::singleClick()) { connect(this, SIGNAL(clicked(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); - if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { - m_selectionManager = new SelectionManager(this); - connect(m_selectionManager, SIGNAL(selectionChanged()), - this, SLOT(requestActivation())); - connect(m_controller, SIGNAL(urlChanged(const KUrl&)), - m_selectionManager, SLOT(reset())); - } } else { connect(this, SIGNAL(doubleClicked(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); } + + if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { + m_selectionManager = new SelectionManager(this); + connect(m_selectionManager, SIGNAL(selectionChanged()), + this, SLOT(requestActivation())); + connect(m_controller, SIGNAL(urlChanged(const KUrl&)), + m_selectionManager, SLOT(reset())); + } + connect(this, SIGNAL(entered(const QModelIndex&)), this, SLOT(slotEntered(const QModelIndex&))); connect(this, SIGNAL(viewportEntered()), diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 3cb9b929d..059ce89ab 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -67,17 +67,19 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle if (KGlobalSettings::singleClick()) { connect(this, SIGNAL(clicked(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); - if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { - m_selectionManager = new SelectionManager(this); - connect(m_selectionManager, SIGNAL(selectionChanged()), - this, SLOT(requestActivation())); - connect(m_controller, SIGNAL(urlChanged(const KUrl&)), - m_selectionManager, SLOT(reset())); - } } else { connect(this, SIGNAL(doubleClicked(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); } + + if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { + m_selectionManager = new SelectionManager(this); + connect(m_selectionManager, SIGNAL(selectionChanged()), + this, SLOT(requestActivation())); + connect(m_controller, SIGNAL(urlChanged(const KUrl&)), + m_selectionManager, SLOT(reset())); + } + connect(this, SIGNAL(entered(const QModelIndex&)), controller, SLOT(emitItemEntered(const QModelIndex&))); connect(this, SIGNAL(viewportEntered()),