*** empty log message ***

This commit is contained in:
dockes 2007-07-20 14:32:55 +00:00
parent 26dd570ef9
commit 3892cb1517
3 changed files with 22 additions and 22 deletions

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.35 2007-07-20 11:44:46 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: rclmain_w.cpp,v 1.36 2007-07-20 14:32:55 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -514,16 +514,20 @@ void RclMain::startPreview(Rcl::Doc doc)
preview->show(); preview->show();
preview->makeDocCurrent(fn, st.st_size, doc, 0); preview->makeDocCurrent(fn, st.st_size, doc, 0);
} }
// Show next document from result list in current preview tab
void RclMain::previewNextInTab(Preview * w, int sid, int docnum) void RclMain::previewNextInTab(Preview * w, int sid, int docnum)
{ {
previewPrevOrNextInTab(w, sid, docnum, true); previewPrevOrNextInTab(w, sid, docnum, true);
} }
// Show previous document from result list in current preview tab
void RclMain::previewPrevInTab(Preview * w, int sid, int docnum) void RclMain::previewPrevInTab(Preview * w, int sid, int docnum)
{ {
previewPrevOrNextInTab(w, sid, docnum, false); previewPrevOrNextInTab(w, sid, docnum, false);
} }
// Show next document from result list in current preview tab // Combined next/prev from result list in current preview tab
void RclMain::previewPrevOrNextInTab(Preview * w, int sid, int docnum, bool nxt) void RclMain::previewPrevOrNextInTab(Preview * w, int sid, int docnum, bool nxt)
{ {
LOGDEB(("RclMain::previewNextInTab sid %d docnum %d, m_sid %d\n", LOGDEB(("RclMain::previewNextInTab sid %d docnum %d, m_sid %d\n",
@ -550,8 +554,7 @@ void RclMain::previewPrevOrNextInTab(Preview * w, int sid, int docnum, bool nxt)
Rcl::Doc doc; Rcl::Doc doc;
if (!resList->getDoc(docnum, doc)) { if (!resList->getDoc(docnum, doc)) {
QMessageBox::warning(0, "Recoll", QMessageBox::warning(0, "Recoll",
tr("Cannot retrieve document info" tr("Cannot retrieve document info from database"));
" from database"));
return; return;
} }

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.31 2007-07-12 08:23:40 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: reslist.cpp,v 1.32 2007-07-20 14:32:55 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
#include <time.h> #include <time.h>
@ -82,6 +82,7 @@ extern "C" int XFlush(void *);
void ResList::resetSearch() void ResList::resetSearch()
{ {
m_winfirst = -1; m_winfirst = -1;
m_curPvDoc = -1;
// There should be a progress bar for long searches but there isn't // There should be a progress bar for long searches but there isn't
// We really want the old result list to go away, otherwise, for a // We really want the old result list to go away, otherwise, for a
// slow search, the user will wonder if anything happened. The // slow search, the user will wonder if anything happened. The
@ -97,7 +98,6 @@ void ResList::resetSearch()
XFlush(QX11Info::display()); XFlush(QX11Info::display());
#endif #endif
#endif #endif
} }
void ResList::languageChange() void ResList::languageChange()
@ -108,10 +108,8 @@ void ResList::languageChange()
// Acquire new docsource // Acquire new docsource
void ResList::setDocSource(RefCntr<DocSequence> docsource) void ResList::setDocSource(RefCntr<DocSequence> docsource)
{ {
m_winfirst = -1; resetSearch();
m_docSource = docsource; m_docSource = docsource;
m_curPvDoc = -1;
resultPageNext(); resultPageNext();
} }
@ -490,13 +488,13 @@ void ResList::resultPageNext()
} }
// Build the result list paragraph: // Build the result list paragraph:
string result; chunk.clear();
// Subheader: this is used by history // Subheader: this is used by history
if (!sh.empty()) if (!sh.empty())
result += string("<p><b>") + sh + "</p>\n<p>"; chunk += "<p><b>" + QString::fromUtf8(sh.c_str()) + "</p>\n<p>";
else else
result += "<p>"; chunk += "<p>";
// Configurable stuff // Configurable stuff
map<char,string> subs; map<char,string> subs;
@ -515,13 +513,12 @@ void ResList::resultPageNext()
string formatted; string formatted;
pcSubst(sformat, formatted, subs); pcSubst(sformat, formatted, subs);
result += formatted; chunk += QString::fromUtf8(formatted.c_str());
result += "</p>\n"; chunk += "</p>\n";
LOGDEB2(("Chunk: [%s]\n", result.c_str())); LOGDEB2(("Chunk: [%s]\n", (const char *)chunk.utf8()));
QString str = QString::fromUtf8(result.c_str(), result.length()); append(chunk);
append(str);
setCursorPosition(0,0); setCursorPosition(0,0);
ensureCursorVisible(); ensureCursorVisible();
@ -613,7 +610,7 @@ void ResList::doubleClicked(int, int)
void ResList::linkWasClicked(const QString &s, int clkmod) void ResList::linkWasClicked(const QString &s, int clkmod)
{ {
LOGDEB(("ResList::linkClicked: [%s]\n", s.ascii())); LOGDEB(("ResList::linkWasClicked: [%s]\n", s.ascii()));
int i = atoi(s.ascii()+1) -1; int i = atoi(s.ascii()+1) -1;
int what = s.ascii()[0]; int what = s.ascii()[0];
switch (what) { switch (what) {

View File

@ -1,6 +1,6 @@
#ifndef _RESLIST_H_INCLUDED_ #ifndef _RESLIST_H_INCLUDED_
#define _RESLIST_H_INCLUDED_ #define _RESLIST_H_INCLUDED_
/* @(#$Id: reslist.h,v 1.11 2007-06-12 13:31:38 dockes Exp $ (C) 2005 J.F.Dockes */ /* @(#$Id: reslist.h,v 1.12 2007-07-20 14:32:55 dockes Exp $ (C) 2005 J.F.Dockes */
#include <list> #include <list>
@ -38,7 +38,6 @@ class ResList : public QTEXTBROWSER
virtual bool getDoc(int docnum, Rcl::Doc &); virtual bool getDoc(int docnum, Rcl::Doc &);
virtual void setDocSource(RefCntr<DocSequence> source); virtual void setDocSource(RefCntr<DocSequence> source);
virtual RCLPOPUP *createPopupMenu(const QPoint& pos);
virtual QString getDescription(); // Printable actual query performed on db virtual QString getDescription(); // Printable actual query performed on db
virtual int getResCnt(); // Return total result list size virtual int getResCnt(); // Return total result list size
@ -70,7 +69,7 @@ class ResList : public QTEXTBROWSER
void headerClicked(); void headerClicked();
void docExpand(int); void docExpand(int);
void wordSelect(QString); void wordSelect(QString);
void linkClicked(const QString&, int); void linkClicked(const QString&, int); // See emitLinkClicked()
protected: protected:
void keyPressEvent(QKeyEvent *e); void keyPressEvent(QKeyEvent *e);
@ -98,6 +97,7 @@ class ResList : public QTEXTBROWSER
void emitLinkClicked(const QString &s) { void emitLinkClicked(const QString &s) {
emit linkClicked(s, m_lstClckMod); emit linkClicked(s, m_lstClckMod);
}; };
virtual RCLPOPUP *createPopupMenu(const QPoint& pos);
}; };