summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-07-17 06:52:46 (GMT)
committer Michele Calgaro <michele.calgaro@yahoo.it>2015-08-27 14:32:31 (GMT)
commit3aa5fc08e534faf627981e5547b90ccab9eadac4 (patch)
tree6715138034a20191981ffb811d694a98204a4a8f
parentae35100db0302f629251d4a8b4f976bea8afbdd3 (diff)
downloadtdebase-3aa5fc08.zip
tdebase-3aa5fc08.tar.gz
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>
-rw-r--r--doc/konqueror/filemanager.docbook4
-rw-r--r--konqueror/iconview/konq_iconview.cc16
-rw-r--r--konqueror/iconview/konq_iconview.h1
-rw-r--r--konqueror/listview/konq_listviewwidget.cc26
-rw-r--r--konqueror/listview/konq_listviewwidget.h1
5 files changed, 46 insertions, 2 deletions
diff --git a/doc/konqueror/filemanager.docbook b/doc/konqueror/filemanager.docbook
index a1ef9eb..ee73d79 100644
--- a/doc/konqueror/filemanager.docbook
+++ b/doc/konqueror/filemanager.docbook
@@ -176,9 +176,9 @@ tree:</para>
icon -- mdash; or if you have already <quote>selected</quote> it (see below) -- mdash; then just press
<keycap>Enter</keycap>.</para></listitem>
<listitem><para>To go up the folder tree you can click on the <guiicon>Up
-</guiicon> button in the Toolbar, use<keycombo action="simul">&Alt;<keysym>Up Arrow</keysym></keycombo>, or use the Menubar
+</guiicon> button in the Toolbar, use <keycombo action="simul">&Alt;<keysym>Up Arrow</keysym></keycombo>, use the Menubar
<menuchoice><guimenu>Go</guimenu><guimenuitem>Up</guimenuitem></menuchoice>
-option.</para></listitem>
+option or just double click with the &LMB; on an empty area, i.e. not over an item name.</para></listitem>
</itemizedlist>
<para>To <quote>select</quote> a file or folder in the displayed folder
diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc
index d90fe52..595c029 100644
--- a/konqueror/iconview/konq_iconview.cc
+++ b/konqueror/iconview/konq_iconview.cc
@@ -348,6 +348,8 @@ KonqKfmIconView::KonqKfmIconView( TQWidget *parentWidget, TQObject *parent, cons
this, TQT_SLOT( slotMouseButtonClicked(int, TQIconViewItem*, const TQPoint&)) );
connect( m_pIconView, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*, const TQPoint&)),
this, TQT_SLOT( slotContextMenuRequested(TQIconViewItem*, const TQPoint&)) );
+ connect( m_pIconView, TQT_SIGNAL( mouseDoubleClicked(TQIconViewItem*)),
+ this, TQT_SLOT( slotDoubleClicked(TQIconViewItem*)) );
// Signals needed to implement the spring loading folders behavior
connect( m_pIconView, TQT_SIGNAL( held( TQIconViewItem * ) ),
@@ -861,6 +863,20 @@ void KonqKfmIconView::slotMouseButtonClicked(int _button, TQIconViewItem* _item,
mmbClicked( _item ? static_cast<KFileIVI*>(_item)->item() : 0L );
}
+void KonqKfmIconView::slotDoubleClicked(TQIconViewItem *_item)
+{
+ if (!_item)
+ {
+ KParts::URLArgs args;
+ args.trustedSource = true;
+ KURL upURL = m_dirLister->url().upURL();
+ if (!upURL.isEmpty())
+ {
+ m_extension->openURLRequest(upURL, args);
+ }
+ }
+}
+
void KonqKfmIconView::slotStarted()
{
// Only emit started if this comes after openURL, i.e. it's not for an update.
diff --git a/konqueror/iconview/konq_iconview.h b/konqueror/iconview/konq_iconview.h
index 5a5f0a1..5c1584e 100644
--- a/konqueror/iconview/konq_iconview.h
+++ b/konqueror/iconview/konq_iconview.h
@@ -97,6 +97,7 @@ protected slots:
void slotReturnPressed( TQIconViewItem *item );
void slotMouseButtonPressed(int, TQIconViewItem*, const TQPoint&);
void slotMouseButtonClicked(int, TQIconViewItem*, const TQPoint&);
+ void slotDoubleClicked(TQIconViewItem*);
void slotContextMenuRequested(TQIconViewItem*, const TQPoint&);
void slotOnItem( TQIconViewItem *item );
void slotOnViewport();
diff --git a/konqueror/listview/konq_listviewwidget.cc b/konqueror/listview/konq_listviewwidget.cc
index ad7ada2..b7dd24c 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 ae79e5c..613f012 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 );