store and display dates in history. Needs more work

This commit is contained in:
dockes
2005-11-28 15:31:01 +00:00
parent 30bf4052f8
commit 80ae403a15
7 changed files with 99 additions and 61 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: main.cpp,v 1.19 2005-11-25 10:26:35 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: main.cpp,v 1.20 2005-11-28 15:31:01 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
#include <unistd.h>
@@ -36,7 +36,7 @@ int recollNeedsExit;
string tmpdir;
bool showicons;
string iconsdir;
RclQHistory *history;
RclDHistory *history;
void getQueryStemming(bool &dostem, std::string &stemlang)
{
@@ -172,7 +172,7 @@ int main( int argc, char ** argv )
string historyfile = rclconfig->getConfDir();
path_cat(historyfile, "history");
history = new RclQHistory(historyfile);
history = new RclDHistory(historyfile);
dbdir = path_tildexpand(dbdir);
+2 -2
View File
@@ -1,6 +1,6 @@
#ifndef _RECOLL_H_INCLUDED_
#define _RECOLL_H_INCLUDED_
/* @(#$Id: recoll.h,v 1.6 2005-11-25 10:02:36 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: recoll.h,v 1.7 2005-11-28 15:31:01 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@@ -20,7 +20,7 @@ extern Rcl::Db *rcldb;
extern std::string tmpdir;
extern bool showicons;
extern string iconsdir;
extern RclQHistory *history;
extern RclDHistory *history;
extern int recollNeedsExit;
+7 -3
View File
@@ -260,7 +260,7 @@ void RecollMain::reslistTE_doubleClicked(int par, int)
Rcl::Doc doc;
int reldocnum = reldocnumfromparnum(par);
if (!docsource->getDoc(reslist_winfirst + reldocnum, doc, 0))
if (!docsource->getDoc(reslist_winfirst + reldocnum, doc, 0, 0))
return;
// Look for appropriate viewer
@@ -439,9 +439,10 @@ void RecollMain::listNextPB_clicked()
// Insert results if any in result list window
for (int i = 0; i < last; i++) {
string sh;
doc.erase();
if (!docsource->getDoc(reslist_winfirst + i, doc, &percent)) {
if (!docsource->getDoc(reslist_winfirst + i, doc, &percent, &sh)) {
if (i == 0)
reslist_winfirst = -1;
break;
@@ -498,7 +499,10 @@ void RecollMain::listNextPB_clicked()
}
string abst = stripMarkup(doc.abstract);
LOGDEB1(("Abstract: {%s}\n", abst.c_str()));
string result = string("<p>");
string result;
if (!sh.empty())
result += string("<br><b>") + sh + "</b><br><br>\n";
result += string("<p>");
if (!img_name.empty()) {
result += "<img source=\"" + img_name + "\" align=\"left\">";
}