[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: [patch] dolphin respect single/double click preference
From: "Sam Abed" <samabed () gmail ! com>
Date: 2007-04-30 14:29:07
Message-ID: c5d4ac100704300729i1b5f0c8dua161d78a3512f340 () mail ! gmail ! com
[Download RAW message or body]
Hi,
I noticed dolphin doesn't take into account my
doubleClick/singleClick preference.
attached is a trivial patch to make it happen, by adding a clickedOpen signal.
I left columnView as is, not sure how it 'should' work with respect to
the preference.
Sam
["dolphonDblClick.patch" (text/x-patch)]
Index: klistview.cpp
===================================================================
--- klistview.cpp (revision 658723)
+++ klistview.cpp (working copy)
@@ -31,6 +31,8 @@
#include "klistview_p.h"
#include "kitemcategorizer.h"
+#include <kglobalsettings.h>
+
KListView::Private::Private(KListView *listView)
: listView(listView)
, modelSortCapable(false)
@@ -66,6 +68,13 @@
: QListView(parent)
, d(new Private(this))
{
+ if ( KGlobalSettings::singleClick() ) {
+ connect(this, SIGNAL(clicked(const QModelIndex&)),
+ this, SIGNAL(clickedOpen(const QModelIndex&)));
+ } else {
+ connect(this, SIGNAL(doubleClicked(const QModelIndex&)),
+ this, SIGNAL(clickedOpen(const QModelIndex&)));
+ }
}
KListView::~KListView()
Index: dolphindetailsview.cpp
===================================================================
--- dolphindetailsview.cpp (revision 658723)
+++ dolphindetailsview.cpp (working copy)
@@ -60,7 +60,7 @@
connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)),
this, SLOT(setSortIndicatorOrder(Qt::SortOrder)));
- connect(this, SIGNAL(clicked(const QModelIndex&)),
+ connect(this, SIGNAL(clickedOpen(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
connect(this, SIGNAL(activated(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
Index: dolphiniconsview.cpp
===================================================================
--- dolphiniconsview.cpp (revision 658723)
+++ dolphiniconsview.cpp (working copy)
@@ -42,7 +42,7 @@
viewport()->setAttribute(Qt::WA_Hover);
- connect(this, SIGNAL(clicked(const QModelIndex&)),
+ connect(this, SIGNAL(clickedOpen(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
connect(this, SIGNAL(activated(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
Index: klistview.h
===================================================================
--- klistview.h (revision 658723)
+++ klistview.h (working copy)
@@ -84,6 +84,8 @@
virtual void itemsLayoutChanged();
+signals:
+ void clickedOpen(const QModelIndex&);
private:
class Private;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic