summaryrefslogtreecommitdiffstats
path: root/konqueror
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-04-30 20:40:17 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-04-30 22:21:04 +0900
commita71726c715a9552c74592e57b00de75aa4f3bb05 (patch)
treef10b570dd40ce30e67e7a5b4e7cec5c397c70a2a /konqueror
parent218009e6d69d283e343988f229d070b9768a5757 (diff)
downloadtdebase-a71726c715a9552c74592e57b00de75aa4f3bb05.tar.gz
tdebase-a71726c715a9552c74592e57b00de75aa4f3bb05.zip
konqueror: add option to enable/disable using double click to navitage to the parent folder. This resolves issue #329
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit f3ddd5b7cd91574ac67d6c5dcf1c40093285d200)
Diffstat (limited to 'konqueror')
-rw-r--r--konqueror/konqueror.kcfg6
-rw-r--r--konqueror/listview/konq_listviewwidget.cpp50
2 files changed, 33 insertions, 23 deletions
diff --git a/konqueror/konqueror.kcfg b/konqueror/konqueror.kcfg
index 4049e8791..041fe4a46 100644
--- a/konqueror/konqueror.kcfg
+++ b/konqueror/konqueror.kcfg
@@ -45,6 +45,12 @@
<whatsthis>Checking this option will allow files to be renamed by clicking directly on the icon name.</whatsthis>
<!-- checked -->
</entry>
+ <entry key="DoubleClickMoveToParent" type="Bool">
+ <default>true</default>
+ <label>Double click on empty area to move to parent folder</label>
+ <whatsthis>When this option is enabled, double clicking an empty area will navigate to the parent folder.</whatsthis>
+ <!-- checked -->
+ </entry>
<entry key="ShowDeleteCommand" type="Bool">
<default>true</default>
<label>Show 'Delete' menu entries which bypass the trashcan</label>
diff --git a/konqueror/listview/konq_listviewwidget.cpp b/konqueror/listview/konq_listviewwidget.cpp
index ef70fe949..e1cfa9bb2 100644
--- a/konqueror/listview/konq_listviewwidget.cpp
+++ b/konqueror/listview/konq_listviewwidget.cpp
@@ -525,33 +525,37 @@ void KonqBaseListViewWidget::contentsWheelEvent( TQWheelEvent *e )
void KonqBaseListViewWidget::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
- if (m_rubber) {
- TQRect r(m_rubber->normalize());
- delete m_rubber;
- m_rubber = NULL;
- repaintContents(r, false);
- }
-
- TQPoint vp = contentsToViewport(e->pos());
- KonqBaseListViewItem* item = isExecuteArea(vp) ?
- static_cast<KonqBaseListViewItem*>(itemAt(vp)) : NULL;
+ if (m_rubber)
+ {
+ TQRect r(m_rubber->normalize());
+ delete m_rubber;
+ m_rubber = NULL;
+ repaintContents(r, false);
+ }
- if (item) {
+ TQPoint vp = contentsToViewport(e->pos());
+ KonqBaseListViewItem* item = isExecuteArea(vp) ?
+ static_cast<KonqBaseListViewItem*>(itemAt(vp)) : NULL;
+
+ if (item)
+ {
TDEListView::contentsMouseDoubleClickEvent(e);
- }
- else {
+ }
+ else if (m_pSettings->doubleClickMoveToParent())
+ {
KParts::URLArgs args;
args.trustedSource = true;
- KURL baseURL(m_dirLister->url().internalReferenceURL());
- if (baseURL.isEmpty())
- {
- baseURL = m_dirLister->url();
- }
- KURL upURL = baseURL.upURL();
- if (!upURL.isEmpty()) {
- m_pBrowserView->extension()->openURLRequest(upURL, args);
- }
- }
+ KURL baseURL(m_dirLister->url().internalReferenceURL());
+ if (baseURL.isEmpty())
+ {
+ baseURL = m_dirLister->url();
+ }
+ KURL upURL = baseURL.upURL();
+ if (!upURL.isEmpty())
+ {
+ m_pBrowserView->extension()->openURLRequest(upURL, args);
+ }
+ }
}
void KonqBaseListViewWidget::leaveEvent( TQEvent *e )