diff --git a/src/bincimapmime/Makefile b/src/bincimapmime/Makefile index 93838fa7..a5b2e242 100644 --- a/src/bincimapmime/Makefile +++ b/src/bincimapmime/Makefile @@ -3,7 +3,7 @@ include ../mk/sysconf LIBS = libmime.a PROGS = trbinc -all: $(LIBS) $(PROGS) +all: $(LIBS) SRCS = mime-getpart.cc mime-parsefull.cc mime-parseonlyheader.cc \ mime-printbody.cc mime-printdoc.cc mime-printheader.cc mime.cc \ diff --git a/src/filters/rcldoc b/src/filters/rcldoc index f65857a5..238c1870 100755 --- a/src/filters/rcldoc +++ b/src/filters/rcldoc @@ -1,5 +1,5 @@ #!/bin/sh -# @(#$Id: rcldoc,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: rcldoc,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes # Parts taken from Estraier: #================================================================ # Estraier: a personal full-text search system @@ -52,6 +52,7 @@ checkcmds() for cmd in $*;do if iscmd $cmd then + a=1 else echo $cmd not found 1>&2 exit 1 diff --git a/src/filters/rclpdf b/src/filters/rclpdf index 8f719d99..049a6cd0 100755 --- a/src/filters/rclpdf +++ b/src/filters/rclpdf @@ -1,5 +1,5 @@ #!/bin/sh -# @(#$Id: rclpdf,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: rclpdf,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes # This is copied almost verbatim from Estraier: #================================================================ # Estraier: a personal full-text search system @@ -50,6 +50,7 @@ checkcmds() for cmd in $*;do if iscmd $cmd then + a=1 else echo $cmd not found 1>&2 exit 1 diff --git a/src/filters/rclps b/src/filters/rclps index dc155621..b38d5f32 100755 --- a/src/filters/rclps +++ b/src/filters/rclps @@ -1,5 +1,5 @@ #!/bin/sh -# @(#$Id: rclps,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: rclps,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes # Parts taken from Estraier: #================================================================ # Estraier: a personal full-text search system @@ -51,6 +51,7 @@ checkcmds() for cmd in $*;do if iscmd $cmd then + a=1 else echo $cmd not found 1>&2 exit 1 diff --git a/src/filters/rclsoff b/src/filters/rclsoff index c0b88169..861845c7 100755 --- a/src/filters/rclsoff +++ b/src/filters/rclsoff @@ -1,5 +1,5 @@ #!/bin/sh -# @(#$Id: rclsoff,v 1.2 2005-10-19 10:21:48 dockes Exp $ (C) 2004 J.F.Dockes +# @(#$Id: rclsoff,v 1.3 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes # Parts taken from Estraier: #================================================================ # Estraier: a personal full-text search system @@ -45,6 +45,7 @@ checkcmds() for cmd in $*;do if iscmd $cmd then + a=1 else echo $cmd not found 1>&2 exit 1 diff --git a/src/qtgui/preview/preview.ui.h b/src/qtgui/preview/preview.ui.h index 91f34f09..ae5cb41a 100644 --- a/src/qtgui/preview/preview.ui.h +++ b/src/qtgui/preview/preview.ui.h @@ -34,7 +34,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event) if (event->type() != QEvent::KeyPress) return QWidget::eventFilter(target, event); - LOGDEB(("Preview::eventFilter: keyEvent\n")); + LOGDEB1(("Preview::eventFilter: keyEvent\n")); QKeyEvent *keyEvent = (QKeyEvent *)event; if (keyEvent->key() == Key_Q && (keyEvent->state() & ControlButton)) { recollNeedsExit = 1; @@ -50,7 +50,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event) QWidget *e = 0; if (tw) e = (QTextEdit *)tw->child("pvEdit"); - LOGDEB(("Widget: %p, edit %p, target %p\n", tw, e, target)); + LOGDEB1(("Widget: %p, edit %p, target %p\n", tw, e, target)); if (e && target == tw && keyEvent->key() == Key_Slash) { dynSearchActive = true; return true; @@ -62,7 +62,7 @@ bool Preview::eventFilter(QObject *target, QEvent *event) void Preview::searchTextLine_textChanged(const QString & text) { - LOGDEB(("search line text changed. text: '%s'\n", text.ascii())); + LOGDEB1(("search line text changed. text: '%s'\n", text.ascii())); if (text.isEmpty()) { dynSearchActive = false; } else { @@ -78,8 +78,7 @@ void Preview::searchTextLine_textChanged(const QString & text) // starting from the current position void Preview::doSearch(bool next, bool reverse) { - //LOGDEB(("Preview::doSearch: next %d rev %d\n", - // int(next), int(reverse))); + LOGDEB1(("Preview::doSearch: next %d rev %d\n", int(next), int(reverse))); QWidget *tw = pvTab->currentPage(); QTextEdit *edit = 0; if (tw) { @@ -108,7 +107,7 @@ void Preview::doSearch(bool next, bool reverse) // Forward search: start from end of selection mspara = mepara; msindex = meindex; - //LOGDEB(("New para: %d index %d\n", mspara, msindex)); + LOGDEB1(("New para: %d index %d\n", mspara, msindex)); } } @@ -151,10 +150,10 @@ void Preview::prevPressed() void Preview::currentChanged(QWidget * tw) { QObject *o = tw->child("pvEdit"); - LOGDEB(("Preview::currentChanged(). Edit %p\n", o)); + LOGDEB1(("Preview::currentChanged(). Edit %p\n", o)); if (o == 0) { - LOGDEB(("Editor child not found\n")); + LOGERR(("Editor child not found\n")); } else { tw->installEventFilter(this); o->installEventFilter(this); diff --git a/src/qtgui/recollmain.ui.h b/src/qtgui/recollmain.ui.h index 9d46fb72..dd9b89ff 100644 --- a/src/qtgui/recollmain.ui.h +++ b/src/qtgui/recollmain.ui.h @@ -50,14 +50,13 @@ void RecollMain::init() asearchform = 0; } -// We also want to get rid of the advanced search form when we exit -// (it's not our children so that it's not systematically created over -// the main form). -bool RecollMain::close( bool alsoDelete ) +// We also want to get rid of the advanced search form and previews +// when we exit (not our children so that it's not systematically +// created over the main form). +bool RecollMain::close(bool) { - if (asearchform) - delete asearchform; - return QWidget::close(alsoDelete); + fileExit(); + return false; } // We want to catch ^Q everywhere to mean quit. diff --git a/src/rcldb/rcldb.cpp b/src/rcldb/rcldb.cpp index c7cc105e..1e4d256b 100644 --- a/src/rcldb/rcldb.cpp +++ b/src/rcldb/rcldb.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.30 2005-10-19 14:14:17 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: rcldb.cpp,v 1.31 2005-10-20 11:33:49 dockes Exp $ (C) 2004 J.F.Dockes"; #endif #include #include @@ -958,7 +958,17 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent) while (exti >= (int)dbindices.size()) { LOGDEB(("Rcl::Db::getDoc: fetching %d starting at %d\n", qquantum, first)); - ndb->mset = ndb->enquire->get_mset(first, qquantum); + try { + ndb->mset = ndb->enquire->get_mset(first, qquantum); + } catch (const Xapian::DatabaseModifiedError &error) { + ndb->db.reopen(); + ndb->mset = ndb->enquire->get_mset(first, qquantum); + } catch (const Xapian::Error & error) { + LOGERR(("enquire->get_mset: exception: %s\n", + error.get_msg().c_str())); + abort(); + } + if (ndb->mset.empty()) { LOGDEB(("Rcl::Db::getDoc: got empty mset\n")); return false; @@ -986,7 +996,16 @@ bool Rcl::Db::getDoc(int exti, Doc &doc, int *percent) if (!(xapi >= first && xapi <= last)) { LOGDEB(("Fetching for first %d, count %d\n", xapi, qquantum)); - ndb->mset = ndb->enquire->get_mset(xapi, qquantum); + try { + ndb->mset = ndb->enquire->get_mset(xapi, qquantum); + } catch (const Xapian::DatabaseModifiedError &error) { + ndb->db.reopen(); + ndb->mset = ndb->enquire->get_mset(xapi, qquantum); + } catch (const Xapian::Error & error) { + LOGERR(("enquire->get_mset: exception: %s\n", + error.get_msg().c_str())); + abort(); + } if (ndb->mset.empty()) return false; first = ndb->mset.get_firstitem(); diff --git a/src/recollinstall b/src/recollinstall new file mode 100755 index 00000000..06c3ad9b --- /dev/null +++ b/src/recollinstall @@ -0,0 +1,55 @@ +#!/bin/sh + +fatal() +{ + echo $* + exit 1 +} +usage() +{ + fatal 'installrecoll , ie: installrecoll /usr/local' +} +install() +{ + src=$1 + dst=$2 + if test -d $dst; then dst=$2/`basename $1`;fi + if test -f $dst; then + bak=$dst.prev + #echo "Preserving $dst as $bak" + (install $dst $bak) + fi + echo $src '->' $dst + cp $src $dst +} + +if test $# != 1 ; then + usage +fi +targetdir=$1 + +echo "Installing to $targetdir" + +test -x qtgui/recoll || fatal "qtgui/recoll does not exist." \ + " You need to build first." + +install qtgui/recoll $targetdir/bin/recoll +install index/recollindex $targetdir/bin/recollindex + +if test -d $HOME/.recoll ; then + cat <