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

View File

@ -424,6 +424,14 @@ void RclMain::viewUrl()
if (!rcldb->getDoc(udi, doc) || doc.pc == -1) if (!rcldb->getDoc(udi, doc) || doc.pc == -1)
return; 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 // Start a native viewer if the mimetype has one defined, else a
// preview. // preview.
string apptag; string apptag;

View File

@ -122,8 +122,9 @@ int DocSequenceDb::getFirstMatchPage(Rcl::Doc &doc, string& term)
bool DocSequenceDb::getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc) bool DocSequenceDb::getEnclosing(Rcl::Doc& doc, Rcl::Doc& pdoc)
{ {
if (!setQuery()) // Note: no need for setQuery here, we're just passing through a
return false; // query-independant request
string udi; string udi;
if (!FileInterner::getEnclosing(doc.url, doc.ipath, pdoc.url, pdoc.ipath, if (!FileInterner::getEnclosing(doc.url, doc.ipath, pdoc.url, pdoc.ipath,
udi)) udi))

View File

@ -38,9 +38,18 @@
<h2><a name="b_latest">recoll 1.18.0</a></h2> <h2><a name="b_latest">recoll 1.18.0</a></h2>
<li>On systems such as Debian Stable which use Evince version 2.x as <li>Opening embedded documents from the Unity Lens does not
a PDF viewer, the default "Open" command for PDF files will work.</li>
not work. You need to edit the command:
<li>It seems that a click in the snippets window can crash
recoll the very first time it is used. I could never reproduce
this on later runs and it is not known what causes the
problem. Just restart the application, and things should stay
up the next times.</li>
<li>On systems such as Debian Stable which use Evince version
2.x (not 3.x) as PDF viewer, the default "Open" command for
PDF files will not work. You need to edit the command:
in <em>Preferences->GUI&nbsp;configuration</em>, in <em>Preferences->GUI&nbsp;configuration</em>,
uncheck <em>Use&nbsp;desktop&nbsp;preferences...</em>, then uncheck <em>Use&nbsp;desktop&nbsp;preferences...</em>, then
click <em>Choose&nbsp;editor&nbsp;applications</em>, and for click <em>Choose&nbsp;editor&nbsp;applications</em>, and for