summaryrefslogtreecommitdiffstats
path: root/konqueror/listview
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-07-17 15:52:46 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-08-27 23:32:31 +0900
commit3aa5fc08e534faf627981e5547b90ccab9eadac4 (patch)
tree6715138034a20191981ffb811d694a98204a4a8f /konqueror/listview
parentae35100db0302f629251d4a8b4f976bea8afbdd3 (diff)
downloadtdebase-3aa5fc08e534faf627981e5547b90ccab9eadac4.tar.gz
tdebase-3aa5fc08e534faf627981e5547b90ccab9eadac4.zip
Added new functionality to Konqueror.
Double clicking on an empty area in the listview or iconview widget will navigate to the parent folder. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'konqueror/listview')
-rw-r--r--konqueror/listview/konq_listviewwidget.cc26
-rw-r--r--konqueror/listview/konq_listviewwidget.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc
index ad7ada2c4..b7dd24c4b 100644
--- a/konqueror/listview/konq_listviewwidget.cc
+++ b/konqueror/listview/konq_listviewwidget.cc
@@ -522,6 +522,32 @@ void KonqBaseListViewWidget::contentsWheelEvent( TQWheelEvent *e )
TDEListView::contentsWheelEvent( 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 (item) {
+ TDEListView::contentsMouseDoubleClickEvent(e);
+ }
+ else {
+ KParts::URLArgs args;
+ args.trustedSource = true;
+ KURL upURL = m_dirLister->url().upURL();
+ if (!upURL.isEmpty()) {
+ m_pBrowserView->extension()->openURLRequest(upURL, args);
+ }
+ }
+}
+
void KonqBaseListViewWidget::leaveEvent( TQEvent *e )
{
if ( m_activeItem != 0 )
diff --git a/konqueror/listview/konq_listviewwidget.h b/konqueror/listview/konq_listviewwidget.h
index ae79e5c03..613f012b3 100644
--- a/konqueror/listview/konq_listviewwidget.h
+++ b/konqueror/listview/konq_listviewwidget.h
@@ -214,6 +214,7 @@ protected:
virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
virtual void contentsMouseMoveEvent( TQMouseEvent *e );
virtual void contentsWheelEvent( TQWheelEvent * e );
+ virtual void contentsMouseDoubleClickEvent( TQMouseEvent *e );
virtual void leaveEvent( TQEvent *e );