diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-04-30 20:40:17 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-04-30 22:01:35 +0900 |
commit | f3ddd5b7cd91574ac67d6c5dcf1c40093285d200 (patch) | |
tree | 0030dfb1fd9e2c42cdf603f9f4bb06f2fe32aef2 /konqueror/listview | |
parent | e539275ad3d719ae9b95c9e94760f078acc608af (diff) | |
download | tdebase-f3ddd5b7cd91574ac67d6c5dcf1c40093285d200.tar.gz tdebase-f3ddd5b7cd91574ac67d6c5dcf1c40093285d200.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>
Diffstat (limited to 'konqueror/listview')
-rw-r--r-- | konqueror/listview/konq_listviewwidget.cpp | 50 |
1 files changed, 27 insertions, 23 deletions
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 ) |