mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
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
This commit is contained in:
parent
e9b902c4f2
commit
91d1438168
2 changed files with 14 additions and 4 deletions
|
@ -60,8 +60,13 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr
|
||||||
connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)),
|
connect(parent, SIGNAL(sortOrderChanged(Qt::SortOrder)),
|
||||||
this, SLOT(setSortIndicatorOrder(Qt::SortOrder)));
|
this, SLOT(setSortIndicatorOrder(Qt::SortOrder)));
|
||||||
|
|
||||||
|
if (KGlobalSettings::singleClick()) {
|
||||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||||
controller, SLOT(triggerItem(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&)),
|
connect(this, SIGNAL(activated(const QModelIndex&)),
|
||||||
controller, SLOT(triggerItem(const QModelIndex&)));
|
controller, SLOT(triggerItem(const QModelIndex&)));
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,13 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
|
||||||
|
|
||||||
viewport()->setAttribute(Qt::WA_Hover);
|
viewport()->setAttribute(Qt::WA_Hover);
|
||||||
|
|
||||||
|
if (KGlobalSettings::singleClick()) {
|
||||||
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
connect(this, SIGNAL(clicked(const QModelIndex&)),
|
||||||
controller, SLOT(triggerItem(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&)),
|
connect(this, SIGNAL(activated(const QModelIndex&)),
|
||||||
controller, SLOT(triggerItem(const QModelIndex&)));
|
controller, SLOT(triggerItem(const QModelIndex&)));
|
||||||
connect(controller, SIGNAL(showPreviewChanged(bool)),
|
connect(controller, SIGNAL(showPreviewChanged(bool)),
|
||||||
|
|
Loading…
Reference in a new issue