summaryrefslogtreecommitdiff
path: root/core/pim/osearch/applnkitem.cpp
Unidiff
Diffstat (limited to 'core/pim/osearch/applnkitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/osearch/applnkitem.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/pim/osearch/applnkitem.cpp b/core/pim/osearch/applnkitem.cpp
index 19e765e..ca54eef 100644
--- a/core/pim/osearch/applnkitem.cpp
+++ b/core/pim/osearch/applnkitem.cpp
@@ -3,28 +3,29 @@
3// C++ Implementation: $MODULE$ 3// C++ Implementation: $MODULE$
4// 4//
5// Description: 5// Description:
6// 6//
7// 7//
8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003 8// Author: Patrick S. Vogt <tille@handhelds.org>, (C) 2003
9// 9//
10// Copyright: See COPYING file that comes with this distribution 10// Copyright: See COPYING file that comes with this distribution
11// 11//
12// 12//
13#include "applnkitem.h" 13#include "applnkitem.h"
14 14
15#include <opie2/odebug.h>
16
15#include <qpe/applnk.h> 17#include <qpe/applnk.h>
16#include <qpe/qcopenvelope_qws.h> 18#include <qpe/qcopenvelope_qws.h>
17 19
18
19AppLnkItem::AppLnkItem(OListViewItem* parent, AppLnk *app) 20AppLnkItem::AppLnkItem(OListViewItem* parent, AppLnk *app)
20 : ResultItem(parent) 21 : ResultItem(parent)
21{ 22{
22 _app = app; 23 _app = app;
23 setText(0, _app->name() ); 24 setText(0, _app->name() );
24 setPixmap(0, _app->pixmap() ); 25 setPixmap(0, _app->pixmap() );
25} 26}
26 27
27 28
28AppLnkItem::~AppLnkItem() 29AppLnkItem::~AppLnkItem()
29{ 30{
30} 31}
@@ -34,25 +35,25 @@ QString AppLnkItem::toRichText()
34{ 35{
35 QString text; 36 QString text;
36 text += "<b><h3>" + _app->name() + "</b></h3><br>"; 37 text += "<b><h3>" + _app->name() + "</b></h3><br>";
37 text += _app->comment() + "<br>"; 38 text += _app->comment() + "<br>";
38 text += "<br>`" + _app->exec() + "`<br>"; 39 text += "<br>`" + _app->exec() + "`<br>";
39 text += "<br>`" + _app->file() + "`<br>"; 40 text += "<br>`" + _app->file() + "`<br>";
40 text += "<br>`" + _app->linkFile() + "`<br>"; 41 text += "<br>`" + _app->linkFile() + "`<br>";
41 return text; 42 return text;
42} 43}
43 44
44void AppLnkItem::action( int act ) 45void AppLnkItem::action( int act )
45{ 46{
46 if (!_app->isValid()) qDebug("INVALID"); 47 if (!_app->isValid()) Opie::Core::odebug << "INVALID" << oendl;
47 if (act == 0) _app->execute(); 48 if (act == 0) _app->execute();
48 else if (act == 1){ 49 else if (act == 1){
49 QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)"); 50 QCopEnvelope e("QPE/Application/advancedfm", "setDocument(QString)");
50 e << _app->linkFile(); 51 e << _app->linkFile();
51 } 52 }
52} 53}
53 54
54QIntDict<QString> AppLnkItem::actions() 55QIntDict<QString> AppLnkItem::actions()
55{ 56{
56 QIntDict<QString> result; 57 QIntDict<QString> result;
57 result.insert( 0, new QString( QObject::tr("execute") ) ); 58 result.insert( 0, new QString( QObject::tr("execute") ) );
58 result.insert( 1, new QString( QObject::tr("open in filemanager") ) ); 59 result.insert( 1, new QString( QObject::tr("open in filemanager") ) );