diff --git a/src/index/recollindex.cpp b/src/index/recollindex.cpp index 47d589c7..2dce9650 100644 --- a/src/index/recollindex.cpp +++ b/src/index/recollindex.cpp @@ -1,5 +1,5 @@ #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 /* * This program is free software; you can redistribute it and/or modify @@ -84,15 +84,12 @@ static void cleanup() } int stopindexing; -string currentfile; // Mainly used to request indexing stop, we currently do not use the // current file name class MyUpdater : public DbIxStatusUpdater { public: - virtual bool update(const string &fn) { - currentfile = fn; + virtual bool update() { if (stopindexing) { - stopindexing = 0; return false; } return true; diff --git a/src/lib/Makefile b/src/lib/Makefile index a2d27952..aeb25306 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -5,125 +5,192 @@ UNACCFLAGS = -g -I. -I$(depth)/unac $(INCICONV) -DUNAC_VERSION=\"1.0.7\" LIBS = librcl.a -all: depend $(LIBS) +all: $(LIBS) -OBJS = base64.o conftree.o csguess.o debuglog.o \ - execmd.o wipedir.o \ - 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 +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 +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 -SRCS = \ - $(depth)/utils/conftree.cpp $(depth)/index/csguess.cpp \ - $(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) +librcl.a : $(OBJS) $(DEPS) unac.o + ar ru librcl.a $(OBJS) unac.o $(RANLIB) librcl.a unac.o : $(depth)/unac/unac.c $(depth)/unac/unac.h $(CC) $(UNACCFLAGS) -c $< - -conftree.o : $(depth)/utils/conftree.cpp +conftree.o : $(CXX) $(ALL_CXXFLAGS) -c $< -csguess.o : $(depth)/index/csguess.cpp +csguess.o : $(CXX) $(ALL_CXXFLAGS) -c $< -debuglog.o : $(depth)/utils/debuglog.cpp +debuglog.o : $(CXX) $(ALL_CXXFLAGS) -c $< -execmd.o : $(depth)/utils/execmd.cpp +execmd.o : $(CXX) $(ALL_CXXFLAGS) -c $< -wipedir.o : $(depth)/utils/wipedir.cpp +idfile.o : $(CXX) $(ALL_CXXFLAGS) -c $< -fstreewalk.o : $(depth)/utils/fstreewalk.cpp +md5.o : $(CXX) $(ALL_CXXFLAGS) -c $< -history.o : $(depth)/query/history.cpp +wipedir.o : $(CXX) $(ALL_CXXFLAGS) -c $< -sortseq.o : $(depth)/query/sortseq.cpp +fstreewalk.o : $(CXX) $(ALL_CXXFLAGS) -c $< -docseq.o : $(depth)/query/docseq.cpp +mh_html.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mh_html.o : $(depth)/common/mh_html.cpp +mh_mail.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mh_exec.o : $(depth)/common/mh_exec.cpp +mh_exec.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mh_text.o : $(depth)/common/mh_text.cpp +mh_text.o : $(CXX) $(ALL_CXXFLAGS) -c $< -htmlparse.o : $(depth)/common/htmlparse.cpp +htmlparse.o : $(CXX) $(ALL_CXXFLAGS) -c $< -idfile.o : $(depth)/utils/idfile.cpp +indexer.o : $(CXX) $(ALL_CXXFLAGS) -c $< -indexer.o : $(depth)/index/indexer.cpp +internfile.o : $(CXX) $(ALL_CXXFLAGS) -c $< -internfile.o : $(depth)/common/internfile.cpp +mimehandler.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mh_mail.o : $(depth)/common/mh_mail.cpp +mimeparse.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mimehandler.o : $(depth)/common/mimehandler.cpp +mimetype.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mimeparse.o : $(depth)/utils/mimeparse.cpp +myhtmlparse.o : $(CXX) $(ALL_CXXFLAGS) -c $< -mimetype.o : $(depth)/index/mimetype.cpp +pathhash.o : $(CXX) $(ALL_CXXFLAGS) -c $< -myhtmlparse.o : $(depth)/common/myhtmlparse.cpp +pathut.o : $(CXX) $(ALL_CXXFLAGS) -c $< -pathut.o : $(depth)/utils/pathut.cpp +rclconfig.o : $(CXX) $(ALL_CXXFLAGS) -c $< -pathhash.o : $(depth)/common/pathhash.cpp +rcldb.o : $(CXX) $(ALL_CXXFLAGS) -c $< -rclconfig.o : $(depth)/common/rclconfig.cpp +rclinit.o : $(CXX) $(ALL_CXXFLAGS) -c $< -rclinit.o : $(depth)/common/rclinit.cpp +stemdb.o : $(CXX) $(ALL_CXXFLAGS) -c $< -rcldb.o : $(depth)/common/rcldb.cpp +base64.o : $(CXX) $(ALL_CXXFLAGS) -c $< -stemdb.o : $(depth)/common/stemdb.cpp +readfile.o : $(CXX) $(ALL_CXXFLAGS) -c $< -readfile.o : $(depth)/utils/readfile.cpp +smallut.o : $(CXX) $(ALL_CXXFLAGS) -c $< -base64.o : $(depth)/utils/base64.cpp +textsplit.o : $(CXX) $(ALL_CXXFLAGS) -c $< -smallut.o : $(depth)/utils/smallut.cpp +transcode.o : $(CXX) $(ALL_CXXFLAGS) -c $< -textsplit.o : $(depth)/common/textsplit.cpp +unacpp.o : $(CXX) $(ALL_CXXFLAGS) -c $< -transcode.o : $(depth)/utils/transcode.cpp +history.o : $(CXX) $(ALL_CXXFLAGS) -c $< -md5.o : $(depth)/utils/md5.cpp +docseq.o : $(CXX) $(ALL_CXXFLAGS) -c $< -unacpp.o : $(depth)/common/unacpp.cpp +sortseq.o : $(CXX) $(ALL_CXXFLAGS) -c $< -copyfile.o : $(depth)/utils/copyfile.cpp +copyfile.o : $(CXX) $(ALL_CXXFLAGS) -c $< - -depend: alldeps.stamp -alldeps.stamp : $(SRCS) - $(CXX) -M $(ALL_CXXFLAGS) $(SRCS) > alldeps - touch alldeps.stamp - +depend: $(DEPS) clean: - cp /dev/null alldeps - rm -f alldeps.stamp - rm -f $(OBJS) $(LIBS) - -include alldeps + rm -f $(OBJS) $(LIBS) $(DEPS) unac.o +conftree.dep : ../utils/conftree.cpp + $(CXX) -M $(ALL_CXXFLAGS) $< > conftree.dep +csguess.dep : ../index/csguess.cpp + $(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 diff --git a/src/qtgui/advsearch.ui b/src/qtgui/advsearch.ui index a941041c..0dc59f1b 100644 --- a/src/qtgui/advsearch.ui +++ b/src/qtgui/advsearch.ui @@ -188,7 +188,7 @@ 200 - 100 + 80 @@ -289,7 +289,7 @@ 200 - 100 + 80 diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 07fc85ff..3e1dccbd 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -1,5 +1,5 @@ #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 /* * 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.htmlBrowser, "/Recoll/prefs/htmlBrowser", , ""); 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.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", , ""); diff --git a/src/qtgui/guiutils.h b/src/qtgui/guiutils.h index ddbf1dde..d551b586 100644 --- a/src/qtgui/guiutils.h +++ b/src/qtgui/guiutils.h @@ -17,7 +17,7 @@ #ifndef _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 * * This program is free software; you can redistribute it and/or modify @@ -52,6 +52,7 @@ extern bool startHelpBrowser(const string& url = ""); class PrefsPack { public: bool showicons; + bool autoSearchOnWS; int respagesize; QString reslistfontfamily; int reslistfontsize; diff --git a/src/qtgui/rclmain.cpp b/src/qtgui/rclmain.cpp index 755412f8..258d860f 100644 --- a/src/qtgui/rclmain.cpp +++ b/src/qtgui/rclmain.cpp @@ -1,5 +1,5 @@ #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 /* * This program is free software; you can redistribute it and/or modify @@ -96,6 +96,8 @@ void RclMain::init() m_history = new RclDHistory(historyfile); connect(sSearch, SIGNAL(startSearch(Rcl::AdvSearchData)), this, SLOT(startAdvSearch(Rcl::AdvSearchData))); + connect(sSearch, SIGNAL(clearSearch()), + resList, SLOT(resetSearch())); nextPageAction->setIconSet(createIconSet("nextpage.png")); prevPageAction->setIconSet(createIconSet("prevpage.png")); diff --git a/src/qtgui/rclreslist.cpp b/src/qtgui/rclreslist.cpp index db93d82f..cad3071c 100644 --- a/src/qtgui/rclreslist.cpp +++ b/src/qtgui/rclreslist.cpp @@ -1,5 +1,5 @@ #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 #include @@ -353,10 +353,14 @@ void RclResList::showResultPage() ensureCursorVisible(); } else { // Restore first in win parameter that we shouln't have incremented - append(tr("

" - /*""*/ - "No results found" - "
")); + QString chunk = "

"; + chunk += QString::fromUtf8(m_docsource->title().c_str()); + chunk += "
"; + chunk += ""; + chunk += tr("Show query details"); + chunk += "
"; + append(chunk); + append(tr("

No results found
")); m_winfirst -= prefs.respagesize; if (m_winfirst < 0) m_winfirst = -1; @@ -385,9 +389,7 @@ void RclResList::showResultPage() } } -// Single click in result list: we don't actually do anything but -// start a timer because we want to check first if this might be a -// double click +// Single click in result list: color active paragraph void RclResList::clicked(int par, int car) { LOGDEB(("RclResList::clicked:wfirst %d par %d char %d\n", @@ -414,10 +416,10 @@ void RclResList::linkWasClicked(const QString &s) emit headerClicked(); break; case 'P': - emit docClicked(i); + emit docPreviewClicked(i); break; case 'E': - emit docDoubleClicked(i); + emit docEditClicked(i); break; default: break;// ?? } @@ -438,11 +440,11 @@ QPopupMenu *RclResList::createPopupMenu(const QPoint& pos) void RclResList::menuPreview() { - emit docClicked(m_docnum); + emit docPreviewClicked(m_docnum); } void RclResList::menuEdit() { - emit docDoubleClicked(m_docnum); + emit docEditClicked(m_docnum); } void RclResList::menuCopyFN() { diff --git a/src/qtgui/rclreslist.h b/src/qtgui/rclreslist.h index da739458..052aa5c2 100644 --- a/src/qtgui/rclreslist.h +++ b/src/qtgui/rclreslist.h @@ -1,6 +1,6 @@ #ifndef _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 #include @@ -16,12 +16,12 @@ class RclResList : public QTextBrowser RclResList(QWidget* parent = 0, const char* name = 0); virtual ~RclResList(); - virtual void resetSearch() {m_winfirst = -1;} virtual bool getDoc( int, Rcl::Doc & ); virtual void setDocSource(DocSequence *); virtual QPopupMenu *createPopupMenu(const QPoint& pos); public slots: + virtual void resetSearch() {m_winfirst = -1;clear();} virtual void clicked(int, int); virtual void resPageUpOrBack(); virtual void resPageDownOrNext(); @@ -35,8 +35,8 @@ class RclResList : public QTextBrowser signals: void nextPageAvailable(bool); void prevPageAvailable(bool); - void docDoubleClicked(int); - void docClicked(int); + void docEditClicked(int); + void docPreviewClicked(int); void headerClicked(); protected: diff --git a/src/qtgui/recollmain.ui b/src/qtgui/recollmain.ui index 1268531d..287936e3 100644 --- a/src/qtgui/recollmain.ui +++ b/src/qtgui/recollmain.ui @@ -378,13 +378,13 @@ resList - docDoubleClicked(int) + docEditClicked(int) RclMainBase startNativeViewer(int) resList - docClicked(int) + docPreviewClicked(int) RclMainBase startPreview(int) diff --git a/src/qtgui/ssearchb.ui b/src/qtgui/ssearchb.ui index 0c413e5c..8c02ad89 100644 --- a/src/qtgui/ssearchb.ui +++ b/src/qtgui/ssearchb.ui @@ -136,6 +136,7 @@ startSearch(Rcl::AdvSearchData) + clearSearch() searchTextChanged( const QString & text ) diff --git a/src/qtgui/ssearchb.ui.h b/src/qtgui/ssearchb.ui.h index 00bbf55f..a5d59303 100644 --- a/src/qtgui/ssearchb.ui.h +++ b/src/qtgui/ssearchb.ui.h @@ -27,6 +27,7 @@ *****************************************************************************/ #include "debuglog.h" +#include "guiutils.h" void SSearchBase::init() { @@ -40,9 +41,13 @@ void SSearchBase::searchTextChanged( const QString & text ) if (text.isEmpty()) { searchPB->setEnabled(false); clearqPB->setEnabled(false); + emit clearSearch(); } else { searchPB->setEnabled(true); clearqPB->setEnabled(true); + string u8 = (const char *)queryText->text().utf8(); + if (prefs.autoSearchOnWS && !u8.empty() && u8[u8.length()-1] == ' ') + startSimpleSearch(); } } diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui index 434d3553..8f78fb18 100644 --- a/src/qtgui/uiprefs.ui +++ b/src/qtgui/uiprefs.ui @@ -170,6 +170,17 @@ true + + + autoSearchCB + + + Auto-start simple search on whitespace entry + + + false + + diff --git a/src/qtgui/uiprefs.ui.h b/src/qtgui/uiprefs.ui.h index ba425c56..75d3c994 100644 --- a/src/qtgui/uiprefs.ui.h +++ b/src/qtgui/uiprefs.ui.h @@ -47,6 +47,7 @@ void UIPrefsDialog::init() pageLenSB->setValue(prefs.respagesize); // Show icons checkbox useIconsCB->setChecked(prefs.showicons); + autoSearchCB->setChecked(prefs.autoSearchOnWS); // Result list font family and size reslistFontFamily = prefs.reslistfontfamily; reslistFontSize = prefs.reslistfontsize; @@ -123,6 +124,7 @@ void UIPrefsDialog::init() void UIPrefsDialog::accept() { prefs.showicons = useIconsCB->isChecked(); + prefs.autoSearchOnWS = autoSearchCB->isChecked(); prefs.respagesize = pageLenSB->value(); prefs.reslistfontfamily = reslistFontFamily;