Only create the snippets menu entry if doc has pages. Add code for a snippets window link inside the result list

This commit is contained in:
Jean-Francois Dockes 2012-10-02 10:56:23 +02:00
parent eca84d32cb
commit 2e0cd5bc82
7 changed files with 117 additions and 29 deletions

View file

@ -112,10 +112,17 @@ class Doc {
// and indexed
string text;
/////////////////////////////////////////////////
// Misc stuff
int pc; // relevancy percentage, used by sortseq, convenience
unsigned long xdocid; // Opaque: rcldb doc identifier.
// Page breaks were stored during indexing.
bool haspages;
///////////////////////////////////////////////////////////////////
void erase() {
url.erase();
ipath.erase();
@ -133,8 +140,12 @@ class Doc {
text.erase();
pc = 0;
xdocid = 0;
haspages = false;
}
Doc()
: syntabs(false), pc(0), xdocid(0), haspages(false)
{
}
/** Get value for named field. If value pointer is 0, just test existence */
bool getmeta(const string& nm, string *value = 0) const
{