Store the origin dbdir inside the GUI doc history, so we can later fetch documents from external indexes

This commit is contained in:
Jean-Francois Dockes
2018-05-31 15:01:17 +02:00
parent 3b6dd445e3
commit 6441eea8aa
9 changed files with 137 additions and 54 deletions
+1 -4
View File
@@ -876,10 +876,7 @@ bool Preview::loadDocInCurrentTab(const Rcl::Doc &idoc, int docnum)
// Enter document in document history
string udi;
if (idoc.getmeta(Rcl::Doc::keyudi, &udi)) {
historyEnterDoc(g_dynconf, udi);
}
historyEnterDoc(rcldb, g_dynconf, idoc);
editor->setFocus();
emit(previewExposed(this, m_searchId, docnum));
+1 -1
View File
@@ -80,7 +80,7 @@ bool RclMain::containerUpToDate(Rcl::Doc& doc)
}
// We can only run indexing on the main index (dbidx 0)
bool ismainidx = rcldb->whatDbIdx(doc) == 0;
bool ismainidx = rcldb->fromMainIndex(doc);
// Indexer already running?
bool ixnotact = (m_indexerState == IXST_NOTRUNNING);
+5 -3
View File
@@ -310,7 +310,9 @@ void RclMain::startNativeViewer(Rcl::Doc doc, int pagenum, QString term)
}
}
bool enterHistory = false;
// Can't remember what enterHistory was actually for. Set it to
// true always for now
bool enterHistory = true;
bool istempfile = false;
LOGDEB("StartNativeViewer: groksipath " << groksipath << " wantsf " <<
@@ -451,8 +453,8 @@ void RclMain::execViewer(const map<string, string>& subs, bool enterHistory,
stb->showMessage(msg, 10000);
}
if (!enterHistory)
historyEnterDoc(g_dynconf, doc.meta[Rcl::Doc::keyudi]);
if (enterHistory)
historyEnterDoc(rcldb, g_dynconf, doc);
// Do the zeitgeist thing
zg_send_event(ZGSEND_OPEN, doc);