summaryrefslogtreecommitdiffstats
path: root/konqueror/iconview
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/iconview
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/iconview')
-rw-r--r--konqueror/iconview/konq_iconview.cc16
-rw-r--r--konqueror/iconview/konq_iconview.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/konqueror/iconview/konq_iconview.cc b/konqueror/iconview/konq_iconview.cc
index d90fe5290..595c02948 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 5a5f0a1ac..5c1584efc 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();