summaryrefslogtreecommitdiff
authortille <tille>2003-05-12 14:31:12 (UTC)
committer tille <tille>2003-05-12 14:31:12 (UTC)
commitca02db5ebfc5e44c3b216c12757683bac246ba23 (patch) (side-by-side diff)
tree76ac70e5ae3a434b195d2eb42885357984f0a1fd
parent0529ba8905f07e3eafaa36920e13b8619b09d5b1 (diff)
downloadopie-ca02db5ebfc5e44c3b216c12757683bac246ba23.zip
opie-ca02db5ebfc5e44c3b216c12757683bac246ba23.tar.gz
opie-ca02db5ebfc5e44c3b216c12757683bac246ba23.tar.bz2
add open in filemanager
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/applnkitem.cpp11
-rw-r--r--core/pim/osearch/doclnkitem.cpp11
2 files changed, 22 insertions, 0 deletions
diff --git a/core/pim/osearch/applnkitem.cpp b/core/pim/osearch/applnkitem.cpp
index 2152da4..1e7b1fb 100644
--- a/core/pim/osearch/applnkitem.cpp
+++ b/core/pim/osearch/applnkitem.cpp
@@ -15,2 +15,4 @@
#include <qpe/applnk.h>
+#include <qfileinfo.h>
+#include <qpe/qcopenvelope_qws.h>
@@ -42,2 +44,10 @@ void AppLnkItem::action( int act )
if (act == 0) _app->execute();
+ else if (act == 1){
+ QFileInfo file( _app->file() );
+ qDebug("opening %s in filemanager", file.dirPath().latin1());
+ QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)");
+ e << file.dirPath();
+// QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)");
+ // e << _app->file();
+ }
}
@@ -48,2 +58,3 @@ QIntDict<QString> AppLnkItem::actions()
result.insert( 0, new QString( QObject::tr("execute") ) );
+ result.insert( 1, new QString( QObject::tr("open in filemanager") ) );
return result;
diff --git a/core/pim/osearch/doclnkitem.cpp b/core/pim/osearch/doclnkitem.cpp
index 75dee58..04d08ca 100644
--- a/core/pim/osearch/doclnkitem.cpp
+++ b/core/pim/osearch/doclnkitem.cpp
@@ -17,2 +17,4 @@
#include <qtextstream.h>
+#include <qfileinfo.h>
+#include <qpe/qcopenvelope_qws.h>
@@ -62,2 +64,10 @@ void DocLnkItem::action( int act )
if (act == 0) _doc->execute();
+ else if (act == 1){
+ QFileInfo file( _doc->file() );
+ qDebug("opening %s in filemanager", file.dirPath().latin1());
+ QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)");
+ e << file.dirPath();
+// QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)");
+ // e << _doc->file();
+ }
}
@@ -68,2 +78,3 @@ QIntDict<QString> DocLnkItem::actions()
result.insert( 0, new QString( QObject::tr("open with ") + _doc->exec() ) );
+ result.insert( 1, new QString( QObject::tr("open in filemanager") ) );
return result;