new libs Makefile+autoSearchOnWS

This commit is contained in:
dockes 2006-04-18 08:53:28 +00:00
parent b7b8fcf0fc
commit ae2bbf6485
13 changed files with 198 additions and 108 deletions

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: recollindex.cpp,v 1.17 2006-04-04 13:49:54 dockes Exp $ (C) 2004 J.F.Dockes"; static char rcsid[] = "@(#$Id: recollindex.cpp,v 1.18 2006-04-18 08:53:27 dockes Exp $ (C) 2004 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
@ -84,15 +84,12 @@ static void cleanup()
} }
int stopindexing; int stopindexing;
string currentfile;
// Mainly used to request indexing stop, we currently do not use the // Mainly used to request indexing stop, we currently do not use the
// current file name // current file name
class MyUpdater : public DbIxStatusUpdater { class MyUpdater : public DbIxStatusUpdater {
public: public:
virtual bool update(const string &fn) { virtual bool update() {
currentfile = fn;
if (stopindexing) { if (stopindexing) {
stopindexing = 0;
return false; return false;
} }
return true; return true;

View File

@ -5,125 +5,192 @@ UNACCFLAGS = -g -I. -I$(depth)/unac $(INCICONV) -DUNAC_VERSION=\"1.0.7\"
LIBS = librcl.a LIBS = librcl.a
all: depend $(LIBS) all: $(LIBS)
OBJS = base64.o conftree.o csguess.o debuglog.o \ OBJS = conftree.o csguess.o debuglog.o execmd.o idfile.o md5.o wipedir.o fstreewalk.o mh_html.o mh_mail.o mh_exec.o mh_text.o htmlparse.o indexer.o internfile.o mimehandler.o mimeparse.o mimetype.o myhtmlparse.o pathhash.o pathut.o rclconfig.o rcldb.o rclinit.o stemdb.o base64.o readfile.o smallut.o textsplit.o transcode.o unacpp.o history.o docseq.o sortseq.o copyfile.o
execmd.o wipedir.o \ DEPS = conftree.dep csguess.dep debuglog.dep execmd.dep idfile.dep md5.dep wipedir.dep fstreewalk.dep mh_html.dep mh_mail.dep mh_exec.dep mh_text.dep htmlparse.dep indexer.dep internfile.dep mimehandler.dep mimeparse.dep mimetype.dep myhtmlparse.dep pathhash.dep pathut.dep rclconfig.dep rcldb.dep rclinit.dep stemdb.dep base64.dep readfile.dep smallut.dep textsplit.dep transcode.dep unacpp.dep history.dep docseq.dep sortseq.dep copyfile.dep
fstreewalk.o mh_html.o mh_mail.o mh_exec.o mh_text.o history.o \
htmlparse.o \
idfile.o indexer.o internfile.o md5.o \
mimehandler.o mimeparse.o mimetype.o myhtmlparse.o pathhash.o pathut.o \
rclconfig.o rcldb.o rclinit.o readfile.o smallut.o \
textsplit.o transcode.o \
unacpp.o unac.o docseq.o sortseq.o copyfile.o stemdb.o
SRCS = \ librcl.a : $(OBJS) $(DEPS) unac.o
$(depth)/utils/conftree.cpp $(depth)/index/csguess.cpp \ ar ru librcl.a $(OBJS) unac.o
$(depth)/utils/debuglog.cpp $(depth)/utils/execmd.cpp \
$(depth)/utils/idfile.cpp $(depth)/utils/md5.cpp \
$(depth)/utils/wipedir.cpp $(depth)/utils/fstreewalk.cpp \
$(depth)/common/mh_html.cpp $(depth)/common/mh_mail.cpp \
$(depth)/common/mh_exec.cpp $(depth)/common/mh_text.cpp \
$(depth)/common/htmlparse.cpp $(depth)/index/indexer.cpp \
$(depth)/common/internfile.cpp $(depth)/common/mimehandler.cpp \
$(depth)/utils/mimeparse.cpp $(depth)/index/mimetype.cpp \
$(depth)/common/myhtmlparse.cpp $(depth)/common/pathhash.cpp \
$(depth)/utils/pathut.cpp $(depth)/common/rclconfig.cpp \
$(depth)/common/rcldb.cpp $(depth)/common/rclinit.cpp \
$(depth)/common/stemdb.cpp \
$(depth)/utils/base64.cpp $(depth)/utils/readfile.cpp \
$(depth)/utils/smallut.cpp $(depth)/common/textsplit.cpp \
$(depth)/utils/transcode.cpp $(depth)/common/unacpp.cpp \
$(depth)/unac/unac.c $(depth)/query/history.cpp \
$(depth)/query/docseq.cpp $(depth)/query/sortseq.cpp \
$(depth)/utils/copyfile.cpp
librcl.a : $(OBJS)
ar ru librcl.a $(OBJS)
$(RANLIB) librcl.a $(RANLIB) librcl.a
unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h
$(CC) $(UNACCFLAGS) -c $< $(CC) $(UNACCFLAGS) -c $<
conftree.o :
conftree.o : $(depth)/utils/conftree.cpp
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
csguess.o : $(depth)/index/csguess.cpp csguess.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
debuglog.o : $(depth)/utils/debuglog.cpp debuglog.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
execmd.o : $(depth)/utils/execmd.cpp execmd.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
wipedir.o : $(depth)/utils/wipedir.cpp idfile.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
fstreewalk.o : $(depth)/utils/fstreewalk.cpp md5.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
history.o : $(depth)/query/history.cpp wipedir.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
sortseq.o : $(depth)/query/sortseq.cpp fstreewalk.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
docseq.o : $(depth)/query/docseq.cpp mh_html.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mh_html.o : $(depth)/common/mh_html.cpp mh_mail.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mh_exec.o : $(depth)/common/mh_exec.cpp mh_exec.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mh_text.o : $(depth)/common/mh_text.cpp mh_text.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
htmlparse.o : $(depth)/common/htmlparse.cpp htmlparse.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
idfile.o : $(depth)/utils/idfile.cpp indexer.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
indexer.o : $(depth)/index/indexer.cpp internfile.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
internfile.o : $(depth)/common/internfile.cpp mimehandler.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mh_mail.o : $(depth)/common/mh_mail.cpp mimeparse.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mimehandler.o : $(depth)/common/mimehandler.cpp mimetype.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mimeparse.o : $(depth)/utils/mimeparse.cpp myhtmlparse.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
mimetype.o : $(depth)/index/mimetype.cpp pathhash.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
myhtmlparse.o : $(depth)/common/myhtmlparse.cpp pathut.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
pathut.o : $(depth)/utils/pathut.cpp rclconfig.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
pathhash.o : $(depth)/common/pathhash.cpp rcldb.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
rclconfig.o : $(depth)/common/rclconfig.cpp rclinit.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
rclinit.o : $(depth)/common/rclinit.cpp stemdb.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
rcldb.o : $(depth)/common/rcldb.cpp base64.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
stemdb.o : $(depth)/common/stemdb.cpp readfile.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
readfile.o : $(depth)/utils/readfile.cpp smallut.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
base64.o : $(depth)/utils/base64.cpp textsplit.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
smallut.o : $(depth)/utils/smallut.cpp transcode.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
textsplit.o : $(depth)/common/textsplit.cpp unacpp.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
transcode.o : $(depth)/utils/transcode.cpp history.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
md5.o : $(depth)/utils/md5.cpp docseq.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
unacpp.o : $(depth)/common/unacpp.cpp sortseq.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
copyfile.o : $(depth)/utils/copyfile.cpp copyfile.o :
$(CXX) $(ALL_CXXFLAGS) -c $< $(CXX) $(ALL_CXXFLAGS) -c $<
depend: $(DEPS)
depend: alldeps.stamp
alldeps.stamp : $(SRCS)
$(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps
touch alldeps.stamp
clean: clean:
cp /dev/null alldeps rm -f $(OBJS) $(LIBS) $(DEPS) unac.o
rm -f alldeps.stamp conftree.dep : ../utils/conftree.cpp
rm -f $(OBJS) $(LIBS) $(CXX) -M $(ALL_CXXFLAGS) $< > conftree.dep
csguess.dep : ../index/csguess.cpp
include alldeps $(CXX) -M $(ALL_CXXFLAGS) $< > csguess.dep
debuglog.dep : ../utils/debuglog.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > debuglog.dep
execmd.dep : ../utils/execmd.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > execmd.dep
idfile.dep : ../utils/idfile.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > idfile.dep
md5.dep : ../utils/md5.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > md5.dep
wipedir.dep : ../utils/wipedir.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > wipedir.dep
fstreewalk.dep : ../utils/fstreewalk.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > fstreewalk.dep
mh_html.dep : ../common/mh_html.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mh_html.dep
mh_mail.dep : ../common/mh_mail.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mh_mail.dep
mh_exec.dep : ../common/mh_exec.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mh_exec.dep
mh_text.dep : ../common/mh_text.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mh_text.dep
htmlparse.dep : ../common/htmlparse.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > htmlparse.dep
indexer.dep : ../index/indexer.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > indexer.dep
internfile.dep : ../common/internfile.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > internfile.dep
mimehandler.dep : ../common/mimehandler.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mimehandler.dep
mimeparse.dep : ../utils/mimeparse.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mimeparse.dep
mimetype.dep : ../index/mimetype.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > mimetype.dep
myhtmlparse.dep : ../common/myhtmlparse.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > myhtmlparse.dep
pathhash.dep : ../common/pathhash.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > pathhash.dep
pathut.dep : ../utils/pathut.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > pathut.dep
rclconfig.dep : ../common/rclconfig.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > rclconfig.dep
rcldb.dep : ../common/rcldb.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > rcldb.dep
rclinit.dep : ../common/rclinit.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > rclinit.dep
stemdb.dep : ../common/stemdb.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > stemdb.dep
base64.dep : ../utils/base64.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > base64.dep
readfile.dep : ../utils/readfile.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > readfile.dep
smallut.dep : ../utils/smallut.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > smallut.dep
textsplit.dep : ../common/textsplit.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > textsplit.dep
transcode.dep : ../utils/transcode.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > transcode.dep
unacpp.dep : ../common/unacpp.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > unacpp.dep
history.dep : ../query/history.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > history.dep
docseq.dep : ../query/docseq.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > docseq.dep
sortseq.dep : ../query/sortseq.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > sortseq.dep
copyfile.dep : ../utils/copyfile.cpp
$(CXX) -M $(ALL_CXXFLAGS) $< > copyfile.dep
include conftree.dep
include csguess.dep
include debuglog.dep
include execmd.dep
include idfile.dep
include md5.dep
include wipedir.dep
include fstreewalk.dep
include mh_html.dep
include mh_mail.dep
include mh_exec.dep
include mh_text.dep
include htmlparse.dep
include indexer.dep
include internfile.dep
include mimehandler.dep
include mimeparse.dep
include mimetype.dep
include myhtmlparse.dep
include pathhash.dep
include pathut.dep
include rclconfig.dep
include rcldb.dep
include rclinit.dep
include stemdb.dep
include base64.dep
include readfile.dep
include smallut.dep
include textsplit.dep
include transcode.dep
include unacpp.dep
include history.dep
include docseq.dep
include sortseq.dep
include copyfile.dep

View File

@ -188,7 +188,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>100</height> <height>80</height>
</size> </size>
</property> </property>
<property name="selectionMode"> <property name="selectionMode">
@ -289,7 +289,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>100</height> <height>80</height>
</size> </size>
</property> </property>
<property name="selectionMode"> <property name="selectionMode">

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.8 2006-04-07 13:08:08 dockes Exp $ (C) 2005 Jean-Francois Dockes"; static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.9 2006-04-18 08:53:28 dockes Exp $ (C) 2005 Jean-Francois 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
@ -126,6 +126,8 @@ void rwSettings(bool writing)
SETTING_RW(prefs.ssearchTyp, "/Recoll/prefs/simpleSearchTyp", Num, 0); SETTING_RW(prefs.ssearchTyp, "/Recoll/prefs/simpleSearchTyp", Num, 0);
SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , ""); SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , "");
SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true); SETTING_RW(prefs.showicons, "/Recoll/prefs/reslist/showicons", Bool, true);
SETTING_RW(prefs.autoSearchOnWS, "/Recoll/prefs/reslist/autoSearchOnWS",
Bool, false);
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8); SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", , SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
""); "");

View File

@ -17,7 +17,7 @@
#ifndef _GUIUTILS_H_INCLUDED_ #ifndef _GUIUTILS_H_INCLUDED_
#define _GUIUTILS_H_INCLUDED_ #define _GUIUTILS_H_INCLUDED_
/* /*
* @(#$Id: guiutils.h,v 1.4 2006-04-05 12:50:42 dockes Exp $ (C) 2005 Jean-Francois Dockes * @(#$Id: guiutils.h,v 1.5 2006-04-18 08:53:28 dockes Exp $ (C) 2005 Jean-Francois Dockes
* jean-francois.dockes@wanadoo.fr * jean-francois.dockes@wanadoo.fr
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -52,6 +52,7 @@ extern bool startHelpBrowser(const string& url = "");
class PrefsPack { class PrefsPack {
public: public:
bool showicons; bool showicons;
bool autoSearchOnWS;
int respagesize; int respagesize;
QString reslistfontfamily; QString reslistfontfamily;
int reslistfontsize; int reslistfontsize;

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.21 2006-04-12 10:41:39 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: rclmain.cpp,v 1.22 2006-04-18 08:53:28 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
@ -96,6 +96,8 @@ void RclMain::init()
m_history = new RclDHistory(historyfile); m_history = new RclDHistory(historyfile);
connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)), connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)),
this, SLOT(startAdvSearch(Rcl::AdvSearchData))); this, SLOT(startAdvSearch(Rcl::AdvSearchData)));
connect(sSearch, SIGNAL(clearSearch()),
resList, SLOT(resetSearch()));
nextPageAction->setIconSet(createIconSet("nextpage.png")); nextPageAction->setIconSet(createIconSet("nextpage.png"));
prevPageAction->setIconSet(createIconSet("prevpage.png")); prevPageAction->setIconSet(createIconSet("prevpage.png"));

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: rclreslist.cpp,v 1.10 2006-04-04 10:38:52 dockes Exp $ (C) 2005 J.F.Dockes"; static char rcsid[] = "@(#$Id: rclreslist.cpp,v 1.11 2006-04-18 08:53:28 dockes Exp $ (C) 2005 J.F.Dockes";
#endif #endif
#include <time.h> #include <time.h>
@ -353,10 +353,14 @@ void RclResList::showResultPage()
ensureCursorVisible(); ensureCursorVisible();
} else { } else {
// Restore first in win parameter that we shouln't have incremented // Restore first in win parameter that we shouln't have incremented
append(tr("<p>" QString chunk = "<p><font size=+1><b>";
/*"<img align=\"left\" source=\"myimage\">"*/ chunk += QString::fromUtf8(m_docsource->title().c_str());
"<b>No results found</b>" chunk += "</b></font><br>";
"<br>")); chunk += "<a href=\"H-1\">";
chunk += tr("Show query details");
chunk += "</a><br>";
append(chunk);
append(tr("<p><b>No results found</b><br>"));
m_winfirst -= prefs.respagesize; m_winfirst -= prefs.respagesize;
if (m_winfirst < 0) if (m_winfirst < 0)
m_winfirst = -1; m_winfirst = -1;
@ -385,9 +389,7 @@ void RclResList::showResultPage()
} }
} }
// Single click in result list: we don't actually do anything but // Single click in result list: color active paragraph
// start a timer because we want to check first if this might be a
// double click
void RclResList::clicked(int par, int car) void RclResList::clicked(int par, int car)
{ {
LOGDEB(("RclResList::clicked:wfirst %d par %d char %d\n", LOGDEB(("RclResList::clicked:wfirst %d par %d char %d\n",
@ -414,10 +416,10 @@ void RclResList::linkWasClicked(const QString &s)
emit headerClicked(); emit headerClicked();
break; break;
case 'P': case 'P':
emit docClicked(i); emit docPreviewClicked(i);
break; break;
case 'E': case 'E':
emit docDoubleClicked(i); emit docEditClicked(i);
break; break;
default: break;// ?? default: break;// ??
} }
@ -438,11 +440,11 @@ QPopupMenu *RclResList::createPopupMenu(const QPoint& pos)
void RclResList::menuPreview() void RclResList::menuPreview()
{ {
emit docClicked(m_docnum); emit docPreviewClicked(m_docnum);
} }
void RclResList::menuEdit() void RclResList::menuEdit()
{ {
emit docDoubleClicked(m_docnum); emit docEditClicked(m_docnum);
} }
void RclResList::menuCopyFN() void RclResList::menuCopyFN()
{ {

View File

@ -1,6 +1,6 @@
#ifndef _RCLRESLIST_H_INCLUDED_ #ifndef _RCLRESLIST_H_INCLUDED_
#define _RCLRESLIST_H_INCLUDED_ #define _RCLRESLIST_H_INCLUDED_
/* @(#$Id: rclreslist.h,v 1.4 2006-03-29 11:18:14 dockes Exp $ (C) 2005 J.F.Dockes */ /* @(#$Id: rclreslist.h,v 1.5 2006-04-18 08:53:28 dockes Exp $ (C) 2005 J.F.Dockes */
#include <qtextbrowser.h> #include <qtextbrowser.h>
#include <qpopupmenu.h> #include <qpopupmenu.h>
@ -16,12 +16,12 @@ class RclResList : public QTextBrowser
RclResList(QWidget* parent = 0, const char* name = 0); RclResList(QWidget* parent = 0, const char* name = 0);
virtual ~RclResList(); virtual ~RclResList();
virtual void resetSearch() {m_winfirst = -1;}
virtual bool getDoc( int, Rcl::Doc & ); virtual bool getDoc( int, Rcl::Doc & );
virtual void setDocSource(DocSequence *); virtual void setDocSource(DocSequence *);
virtual QPopupMenu *createPopupMenu(const QPoint& pos); virtual QPopupMenu *createPopupMenu(const QPoint& pos);
public slots: public slots:
virtual void resetSearch() {m_winfirst = -1;clear();}
virtual void clicked(int, int); virtual void clicked(int, int);
virtual void resPageUpOrBack(); virtual void resPageUpOrBack();
virtual void resPageDownOrNext(); virtual void resPageDownOrNext();
@ -35,8 +35,8 @@ class RclResList : public QTextBrowser
signals: signals:
void nextPageAvailable(bool); void nextPageAvailable(bool);
void prevPageAvailable(bool); void prevPageAvailable(bool);
void docDoubleClicked(int); void docEditClicked(int);
void docClicked(int); void docPreviewClicked(int);
void headerClicked(); void headerClicked();
protected: protected:

View File

@ -378,13 +378,13 @@
</connection> </connection>
<connection> <connection>
<sender>resList</sender> <sender>resList</sender>
<signal>docDoubleClicked(int)</signal> <signal>docEditClicked(int)</signal>
<receiver>RclMainBase</receiver> <receiver>RclMainBase</receiver>
<slot>startNativeViewer(int)</slot> <slot>startNativeViewer(int)</slot>
</connection> </connection>
<connection> <connection>
<sender>resList</sender> <sender>resList</sender>
<signal>docClicked(int)</signal> <signal>docPreviewClicked(int)</signal>
<receiver>RclMainBase</receiver> <receiver>RclMainBase</receiver>
<slot>startPreview(int)</slot> <slot>startPreview(int)</slot>
</connection> </connection>

View File

@ -136,6 +136,7 @@
</includes> </includes>
<signals> <signals>
<signal>startSearch(Rcl::AdvSearchData)</signal> <signal>startSearch(Rcl::AdvSearchData)</signal>
<signal>clearSearch()</signal>
</signals> </signals>
<slots> <slots>
<slot>searchTextChanged( const QString &amp; text )</slot> <slot>searchTextChanged( const QString &amp; text )</slot>

View File

@ -27,6 +27,7 @@
*****************************************************************************/ *****************************************************************************/
#include "debuglog.h" #include "debuglog.h"
#include "guiutils.h"
void SSearchBase::init() void SSearchBase::init()
{ {
@ -40,9 +41,13 @@ void SSearchBase::searchTextChanged( const QString & text )
if (text.isEmpty()) { if (text.isEmpty()) {
searchPB->setEnabled(false); searchPB->setEnabled(false);
clearqPB->setEnabled(false); clearqPB->setEnabled(false);
emit clearSearch();
} else { } else {
searchPB->setEnabled(true); searchPB->setEnabled(true);
clearqPB->setEnabled(true); clearqPB->setEnabled(true);
string u8 = (const char *)queryText->text().utf8();
if (prefs.autoSearchOnWS && !u8.empty() && u8[u8.length()-1] == ' ')
startSimpleSearch();
} }
} }

View File

@ -170,6 +170,17 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QCheckBox">
<property name="name">
<cstring>autoSearchCB</cstring>
</property>
<property name="text">
<string>Auto-start simple search on whitespace entry</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</vbox> </vbox>
</widget> </widget>
</vbox> </vbox>

View File

@ -47,6 +47,7 @@ void UIPrefsDialog::init()
pageLenSB->setValue(prefs.respagesize); pageLenSB->setValue(prefs.respagesize);
// Show icons checkbox // Show icons checkbox
useIconsCB->setChecked(prefs.showicons); useIconsCB->setChecked(prefs.showicons);
autoSearchCB->setChecked(prefs.autoSearchOnWS);
// Result list font family and size // Result list font family and size
reslistFontFamily = prefs.reslistfontfamily; reslistFontFamily = prefs.reslistfontfamily;
reslistFontSize = prefs.reslistfontsize; reslistFontSize = prefs.reslistfontsize;
@ -123,6 +124,7 @@ void UIPrefsDialog::init()
void UIPrefsDialog::accept() void UIPrefsDialog::accept()
{ {
prefs.showicons = useIconsCB->isChecked(); prefs.showicons = useIconsCB->isChecked();
prefs.autoSearchOnWS = autoSearchCB->isChecked();
prefs.respagesize = pageLenSB->value(); prefs.respagesize = pageLenSB->value();
prefs.reslistfontfamily = reslistFontFamily; prefs.reslistfontfamily = reslistFontFamily;