Diffstat (limited to 'core/pim/osearch/doclnkitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/osearch/doclnkitem.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <qpe/applnk.h> | 15 | #include <qpe/applnk.h> |
16 | #include <qfile.h> | 16 | #include <qfile.h> |
17 | #include <qtextstream.h> | 17 | #include <qtextstream.h> |
18 | #include <qfileinfo.h> | ||
19 | #include <qpe/qcopenvelope_qws.h> | ||
18 | 20 | ||
19 | DocLnkItem::DocLnkItem(OListViewItem* parent, DocLnk *app) | 21 | DocLnkItem::DocLnkItem(OListViewItem* parent, DocLnk *app) |
20 | : ResultItem(parent) | 22 | : ResultItem(parent) |
@@ -60,11 +62,20 @@ void DocLnkItem::action( int act ) | |||
60 | qDebug("action %i",act); | 62 | qDebug("action %i",act); |
61 | if (!_doc->isValid()) qDebug("INVALID"); | 63 | if (!_doc->isValid()) qDebug("INVALID"); |
62 | if (act == 0) _doc->execute(); | 64 | if (act == 0) _doc->execute(); |
65 | else if (act == 1){ | ||
66 | QFileInfo file( _doc->file() ); | ||
67 | qDebug("opening %s in filemanager", file.dirPath().latin1()); | ||
68 | QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)"); | ||
69 | e << file.dirPath(); | ||
70 | // QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)"); | ||
71 | // e << _doc->file(); | ||
72 | } | ||
63 | } | 73 | } |
64 | 74 | ||
65 | QIntDict<QString> DocLnkItem::actions() | 75 | QIntDict<QString> DocLnkItem::actions() |
66 | { | 76 | { |
67 | QIntDict<QString> result; | 77 | QIntDict<QString> result; |
68 | result.insert( 0, new QString( QObject::tr("open with ") + _doc->exec() ) ); | 78 | result.insert( 0, new QString( QObject::tr("open with ") + _doc->exec() ) ); |
79 | result.insert( 1, new QString( QObject::tr("open in filemanager") ) ); | ||
69 | return result; | 80 | return result; |
70 | } | 81 | } |