diff options
| author | Peter Penz <[email protected]> | 2007-05-01 09:12:24 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-05-01 09:12:24 +0000 |
| commit | 91d143816848744842eb17498455f31903ef912f (patch) | |
| tree | fb75b4c5211f2feae3f0ca521dd0b15b49c14263 /src | |
| parent | e9b902c4f2b741543e0bbf52f464106e58820f72 (diff) | |
Respect global single/double click setting for the icons- and details view (thanks to Sam Abed for the patch!). PS: I did not introduce an executed()-signal in KListView, as:
* In general we want to avoid having Kxxx-view classes for existing Qxxx-view classes like this was the case in KDE3. Qt4 allows us to use custom models + delegates and hence there should be no need to introduce KListView, KTreeView or KColumnView.
* It looks like KListView will be renamed to KCategoryView and it's open yet whether it it will be available outside the scope of a file manager for KDE 4.0.
* The details view is derived from QTreeView and the columns view is derived from QColumnView -> adjusting KListView won't help here :-)
svn path=/trunk/KDE/kdebase/apps/; revision=659994
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphindetailsview.cpp | 9 | ||||
| -rw-r--r-- | src/dolphiniconsview.cpp | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 6544940b1..af503723a 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -60,8 +60,13 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)), this, SLOT(setSortIndicatorOrder(Qt::SortOrder))); - connect(this, SIGNAL(clicked(const QModelIndex&)), - controller, SLOT(triggerItem(const QModelIndex&))); + if (KGlobalSettings::singleClick()) { + connect(this, SIGNAL(clicked(const QModelIndex&)), + controller, SLOT(triggerItem(const QModelIndex&))); + } else { + connect(this, SIGNAL(doubleClicked(const QModelIndex&)), + controller, SLOT(triggerItem(const QModelIndex&))); + } connect(this, SIGNAL(activated(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 43718a0d1..35789f754 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -42,8 +42,13 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle viewport()->setAttribute(Qt::WA_Hover); - connect(this, SIGNAL(clicked(const QModelIndex&)), - controller, SLOT(triggerItem(const QModelIndex&))); + if (KGlobalSettings::singleClick()) { + connect(this, SIGNAL(clicked(const QModelIndex&)), + controller, SLOT(triggerItem(const QModelIndex&))); + } else { + connect(this, SIGNAL(doubleClicked(const QModelIndex&)), + controller, SLOT(triggerItem(const QModelIndex&))); + } connect(this, SIGNAL(activated(const QModelIndex&)), controller, SLOT(triggerItem(const QModelIndex&))); connect(controller, SIGNAL(showPreviewChanged(bool)), |
