Using recoll as an embedded document opener for the unity lens was broken

This commit is contained in:
Jean-Francois Dockes
2012-10-20 09:25:35 +02:00
parent 25ed3bbb68
commit de5763f663
3 changed files with 23 additions and 5 deletions
+8
View File
@@ -424,6 +424,14 @@ void RclMain::viewUrl()
if (!rcldb->getDoc(udi, doc) || doc.pc == -1)
return;
// StartNativeViewer needs a db source to call getEnclosing() on.
Rcl::Query *query = new Rcl::Query(rcldb);
DocSequenceDb *src =
new DocSequenceDb(RefCntr<Rcl::Query>(query), "",
RefCntr<Rcl::SearchData>(new Rcl::SearchData));
m_source = RefCntr<DocSequence>(src);
// Start a native viewer if the mimetype has one defined, else a
// preview.
string apptag;
+3 -2
View File
@@ -122,8 +122,9 @@ int DocSequenceDb::getFirstMatchPage(Rcl::Doc &doc, string& term)
bool DocSequenceDb::getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc)
{
if (!setQuery())
return false;
// Note: no need for setQuery here, we're just passing through a
// query-independant request
string udi;
if (!FileInterner::getEnclosing(doc.url, doc.ipath, pdoc.url, pdoc.ipath,
udi))