summaryrefslogtreecommitdiff
authortille <tille>2003-05-12 17:02:40 (UTC)
committer tille <tille>2003-05-12 17:02:40 (UTC)
commit21157bf1102d428cebc9d8c80eb5c15b0a311328 (patch) (side-by-side diff)
tree554fdb58a7ee3bd8dceec050207bc1ea7fc8fe3a
parent8a87ca1f7de6a205b47986db8ad4a082f39b9c34 (diff)
downloadopie-21157bf1102d428cebc9d8c80eb5c15b0a311328.zip
opie-21157bf1102d428cebc9d8c80eb5c15b0a311328.tar.gz
opie-21157bf1102d428cebc9d8c80eb5c15b0a311328.tar.bz2
added support for advfm
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/osearch/applnkitem.cpp8
-rw-r--r--core/pim/osearch/doclnkitem.cpp7
2 files changed, 5 insertions, 10 deletions
diff --git a/core/pim/osearch/applnkitem.cpp b/core/pim/osearch/applnkitem.cpp
index 1e7b1fb..0d04be6 100644
--- a/core/pim/osearch/applnkitem.cpp
+++ b/core/pim/osearch/applnkitem.cpp
@@ -26,36 +26,34 @@ AppLnkItem::AppLnkItem(OListViewItem* parent, AppLnk *app)
AppLnkItem::~AppLnkItem()
{
}
QString AppLnkItem::toRichText()
{
QString text;
text += "<b><h3>" + _app->name() + "</b></h3><br>";
text += _app->comment() + "<br>";
text += "<br>`" + _app->exec() + "`<br>";
+ text += "<br>`" + _app->file() + "`<br>";
+ text += "<br>`" + _app->linkFile() + "`<br>";
return text;
}
void AppLnkItem::action( int act )
{
if (!_app->isValid()) qDebug("INVALID");
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();
+ e << _app->linkFile();
}
}
QIntDict<QString> AppLnkItem::actions()
{
QIntDict<QString> result;
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 04d08ca..95402b9 100644
--- a/core/pim/osearch/doclnkitem.cpp
+++ b/core/pim/osearch/doclnkitem.cpp
@@ -26,24 +26,25 @@ DocLnkItem::DocLnkItem(OListViewItem* parent, DocLnk *app)
}
DocLnkItem::~DocLnkItem()
{
}
QString DocLnkItem::toRichText()
{
QString text;
text += "<b><h3>" + _doc->name() + "</b></h3><br>";
text += _doc->comment() + "<br>";
text += "File: " + _doc->file() + "<br>";
+ text += "Link: " + _doc->linkFile() + "<br>";
text += "Mimetype: " + _doc->type() + "<br>";
if ( _doc->type().contains( "text" ) ){
text += "<br><br><hr><br>";
QFile f(_doc->file());
if ( f.open(IO_ReadOnly) ) {
QTextStream t( &f );
while ( !t.eof() )
text += t.readLine() + "<br>";
}
f.close();
}
/* text += "<br><br>`";
@@ -54,28 +55,24 @@ QString DocLnkItem::toRichText()
for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
text += QString::number( i++) + " - " + *it ;
}
return text;
}
void DocLnkItem::action( int act )
{
qDebug("action %i",act);
if (!_doc->isValid()) qDebug("INVALID");
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();
+ e << _doc->file();
}
}
QIntDict<QString> DocLnkItem::actions()
{
QIntDict<QString> result;
result.insert( 0, new QString( QObject::tr("open with ") + _doc->exec() ) );
result.insert( 1, new QString( QObject::tr("open in filemanager") ) );
return result;
}