merged 1.6 maint branch modifs up to MERGED_TO_TRUNK_20061130

This commit is contained in:
dockes 2006-11-30 13:38:44 +00:00
parent 03b6f05f23
commit 72fd14f208
46 changed files with 417 additions and 245 deletions

View File

@ -2,11 +2,11 @@
# Date created: 5 December 2005
# Whom: J.F. Dockes <jean-francois.dockes@wanadoo.fr>
#
# $FreeBSD: ports/deskutils/recoll/Makefile,v 1.8 2006/07/26 08:14:38 lbr Exp $
# $FreeBSD: ports/deskutils/recoll/Makefile,v 1.10 2006/11/21 19:45:14 miwi Exp $
#
PORTNAME= recoll
PORTVERSION= 1.5.2
PORTVERSION= 1.6.1
CATEGORIES= deskutils
MASTER_SITES= http://www.lesbonscomptes.com/recoll/

View File

@ -1,3 +1,3 @@
MD5 (recoll-1.5.2.tar.gz) = 0081c3a91e236edbe01b77ccf12199ba
SHA256 (recoll-1.5.2.tar.gz) = 40eb29970d3eb0afd63366ef76e33c7151557f9b0ed27156530f2f1ce4813289
SIZE (recoll-1.5.2.tar.gz) = 581167
MD5 (recoll-1.5.11.tar.gz) = 72702251bd97fce2ab73dc36430e81ac
SHA256 (recoll-1.5.11.tar.gz) = fa4408c9d761f6901907b10eb64d1b1615d9dcddfae67f1878a70ddb92dd22d2
SIZE (recoll-1.5.11.tar.gz) = 584067

View File

@ -1,12 +1,11 @@
bin/recoll
bin/recollindex
share/applications/recoll.desktop
share/icons/recoll.png
share/icons/hicolor/48x48/apps/recoll.png
%%DATADIR%%/doc/docbook.css
%%DATADIR%%/doc/usermanual.html
%%DATADIR%%/examples/mimeconf
%%DATADIR%%/examples/mimemap
%%DATADIR%%/examples/rclmon.sh
%%DATADIR%%/examples/recoll.conf
%%DATADIR%%/filters/rcldjvu
%%DATADIR%%/filters/rcldoc
@ -45,3 +44,4 @@ share/icons/recoll.png
@dirrm %%DATADIR%%/translations
@dirrm %%DATADIR%%
@dirrmtry share/applications
@dirrmtry share/icons

View File

@ -1,5 +1,5 @@
%define name recoll
%define version 1.6.0
%define version 1.6.1
%define release 0
Name: %{name}
@ -54,13 +54,15 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/*
%{_datadir}/%{name}
%{_datadir}/applications/recoll.desktop
%{_datadir}/icons/recoll.png
%{_datadir}/icons/hicolor/48x48/apps/recoll.png
%{_mandir}/man1/recoll*
%{_mandir}/man5/recoll*
# ---------------------------------------------------------------------------
%changelog
* Tue Nov 28 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.6.1-1
- Update to release 1.6.1
* Mon Oct 2 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.4.3-1
- Update to release 1.5.3
* Sun May 7 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.4.3-1
@ -71,4 +73,3 @@ rm -rf $RPM_BUILD_ROOT
- Update to release 1.2.2
* Thu Jan 10 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.1.0-1
- Initial packaging

View File

@ -1,5 +1,5 @@
%define name recoll
%define version 1.6.0
%define version 1.6.1
%define release %mkrel 1
Name: %{name}
@ -51,7 +51,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%{_bindir}/*
%{_datadir}/applications/recoll.desktop
%{_datadir}/icons/recoll.png
%{_datadir}/icons/hicolor/48x48/apps/recoll.png
%{_datadir}/%{name}
%{_mandir}/man1/recoll*
%{_mandir}/man5/recoll*
@ -60,6 +60,8 @@ rm -rf $RPM_BUILD_ROOT
# ---------------------------------------------------------------------------
%changelog
* Tue Nov 28 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.6.1-1
- Update to release 1.6.1
* Mon Nov 20 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.5.11-1
- Update to release 1.5.11
* Mon Oct 2 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.5.2-1

View File

@ -396,7 +396,7 @@ More documentation can be found in the doc/ directory or at http://www.recoll.or
Starting and stopping the daemon could be performed, for example, as part
of the user session script. For example, my out of fashion xdm-based
session has an .xsession script with the following lines at the end:
session has a .xsession script with the following lines at the end:
recollconf=$HOME/.recoll-home
recolldata=/usr/local/share/recoll
@ -412,6 +412,15 @@ More documentation can be found in the doc/ directory or at http://www.recoll.or
for your flavour of session management, and of course, there are other
possibilities.
Under KDE, you can place a small script to start recollindex -m under
$HOME/.kde/Autostart. This will be executed when the session begins, and
the process seems to get a SIGHUP signal and be terminated when the
session ends.
There is a similar mechanism under Gnome (find the session control tool in
the menus and use the "Startup programs" tab). I could find an easy way to
stop recollindex at the end of the session though.
By default, the indexing daemon will write its messages to a file inside
the configuration directory (this is controlled by the daemlogfilename and
daemloglevel configuration parameters). You may want to change this. Also
@ -852,13 +861,17 @@ More documentation can be found in the doc/ directory or at http://www.recoll.or
%A %K
You may, for example, try the following for a more web-like experience
(but the document title will not act as a link):
You may, for example, try the following for a more web-like
experience:
<u><b><font size=+1 color=#1111cf>%T</font></b></u><br>
<u><b><a href="P%N">%T</a></b></u><br>
%A<font color=#008000>%U - %S</font> - %L
The format of the Preview and Edit links is <a href="Pdocnum"> and <a
href="Edocnum"> where docnum is what %N would print. This makes the
title a preview link in the above format.
* HTML help browser: this will let you chose your preferred browser
which will be started from the Help menu to read the user manual. You
can enter a simple name if the command is in your PATH, or browse for

View File

@ -1,6 +1,6 @@
#ifndef TEST_RCLASPELL
#ifndef lint
static char rcsid[] = "@(#$Id: rclaspell.cpp,v 1.5 2006-11-21 13:05:16 dockes Exp $ (C) 2006 J.F.Dockes";
static char rcsid[] = "@(#$Id: rclaspell.cpp,v 1.6 2006-11-30 13:38:43 dockes Exp $ (C) 2006 J.F.Dockes";
#endif
#ifdef HAVE_CONFIG_H
#include "autoconfig.h"
@ -101,11 +101,6 @@ bool Aspell::init(string &reason)
if (!lang.compare("C"))
lang = "en";
m_lang = lang.substr(0, lang.find_first_of("_"));
} else {
if (!m_lang.compare("disable")) {
reason = "Aspell disabled in recoll configuration file";
return false;
}
}
m_data = new AspellData;
@ -192,6 +187,11 @@ string Aspell::dicPath()
}
// The data source for the create dictionary aspell command. We walk
// the term list, filtering out things that are probably not words.
// Note that the manual for the current version (0.60) of aspell
// states that utf-8 is not well supported, so that we should maybe
// also filter all 8bit chars.
class AspExecPv : public ExecCmdProvide {
public:
string *m_input; // pointer to string used as input buffer to command
@ -203,12 +203,13 @@ public:
void newData() {
while (m_db.termWalkNext(m_tit, *m_input)) {
// Filter out terms beginning with upper case (special stuff) and
// containing numbers
if (m_input->empty())
// containing numbers, or too long. Note that the 50 limit is a
// byte count, so not so high if there are multibyte chars.
if (m_input->empty() || m_input->length() > 50)
continue;
if ('A' <= m_input->at(0) && m_input->at(0) <= 'Z')
continue;
if (m_input->find_first_of("0123456789+-._@") != string::npos)
if (m_input->find_first_of("0123456789.@+-,#_") != string::npos)
continue;
// Got a non-empty sort-of appropriate term, let's send it to
// aspell
@ -231,6 +232,7 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason)
ExecCmd aspell;
list<string> args;
args.push_back(string("--lang=")+ m_lang);
args.push_back("--encoding=utf-8");
args.push_back("create");
args.push_back("master");
args.push_back(dicPath());

View File

@ -24,7 +24,7 @@
Dockes</holder>
</copyright>
<releaseinfo>$Id: usermanual.sgml,v 1.27 2006-11-21 09:18:21 dockes Exp $</releaseinfo>
<releaseinfo>$Id: usermanual.sgml,v 1.28 2006-11-30 13:38:43 dockes Exp $</releaseinfo>
<abstract>
<para>This document introduces full text search notions
@ -441,8 +441,9 @@ recoll
<para>Starting and stopping the daemon could be performed, for
example, as part of the user session script. For example, my
out of fashion xdm-based session has an .xsession script with
the following lines at the end:</para>
out of fashion xdm-based session has a
<filename>.xsession</filename> script with the following lines
at the end:</para>
<programlisting>recollconf=$HOME/.recoll-home
recolldata=/usr/local/share/recoll
@ -459,6 +460,17 @@ RECOLL_CONFDIR=$recollconf $recolldata/examples/rclmon.sh stop
exit). This should be adjusted for your flavour of session
management, and of course, there are other possibilities.</para>
<para>Under KDE, you can place a small script to start
<command>recollindex -m</command> under
<filename>$HOME/.kde/Autostart</filename>. This will be executed
when the session begins, and the process seems to get a SIGHUP
signal and be terminated when the session ends.</para>
<para>There is a similar mechanism under Gnome (find the session
control tool in the menus and use the "Startup programs" tab). I
could find an easy way to stop <command>recollindex</command> at
the end of the session though.</para>
<para>By default, the indexing daemon will write its messages to
a file inside the configuration directory (this is controlled by
the <literal>daemlogfilename</literal> and
@ -1049,10 +1061,16 @@ RECOLL_CONFDIR=$recollconf $recolldata/examples/rclmon.sh stop
%A %K
</programlisting>
You may, for example, try the following for a more web-like
experience (but the document title will not act as a link):
<programlisting>&lt;u>&lt;b>&lt;font size=+1 color=#1111cf>%T&lt;/font>&lt;/b>&lt;/u>&lt;br>
experience:
<programlisting>&lt;u>&lt;b>&lt;a href="P%N"&gt;%T&lt;/a&gt;&lt;/b>&lt;/u>&lt;br>
%A&lt;font color=#008000>%U - %S&lt;/font> - %L
</programlisting>
The format of the Preview and Edit links is
<literal>&lt;a href="P<replaceable>docnum</replaceable>"&gt;</literal>
and
<literal>&lt;a href="E<replaceable>docnum</replaceable>"&gt;</literal>
where <replaceable>docnum</replaceable> is what %N would
print. This makes the title a preview link in the above format.
</para>
</listitem>

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: indexer.cpp,v 1.44 2006-11-07 06:41:44 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: indexer.cpp,v 1.45 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -161,14 +161,16 @@ bool DbIndexer::createStemmingDatabases()
return true;
}
bool DbIndexer::init(bool resetbefore)
bool DbIndexer::init(bool resetbefore, bool rdonly)
{
if (m_tmpdir.empty() || access(m_tmpdir.c_str(), 0) < 0)
if (!maketmpdir(m_tmpdir)) {
LOGERR(("DbIndexer: cannot create temporary directory\n"));
return false;
}
if (!m_db.open(m_dbdir, resetbefore ? Rcl::Db::DbTrunc : Rcl::Db::DbUpd)) {
Rcl::Db::OpenMode mode = rdonly ? Rcl::Db::DbRO :
resetbefore ? Rcl::Db::DbTrunc : Rcl::Db::DbUpd;
if (!m_db.open(m_dbdir, mode)) {
LOGERR(("DbIndexer: error opening database in %s\n", m_dbdir.c_str()));
return false;
}
@ -177,7 +179,7 @@ bool DbIndexer::init(bool resetbefore)
bool DbIndexer::createStemDb(const string &lang)
{
if (!init())
if (!init(false, true))
return false;
return m_db.createStemDb(lang);
}
@ -188,7 +190,12 @@ bool DbIndexer::createAspellDict()
{
LOGDEB2(("DbIndexer::createAspellDict()\n"));
#ifdef RCL_USE_ASPELL
if (!init())
bool noaspell = false;
m_config->getConfParam("noaspell", &noaspell);
if (noaspell)
return true;
if (!init(false, true))
return false;
Aspell aspell(m_config);
string reason;

View File

@ -16,7 +16,7 @@
*/
#ifndef _INDEXER_H_INCLUDED_
#define _INDEXER_H_INCLUDED_
/* @(#$Id: indexer.h,v 1.21 2006-10-24 14:28:38 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: indexer.h,v 1.22 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
@ -144,7 +144,7 @@ class DbIndexer : public FsTreeWalkerCB {
string m_tmpdir;
DbIxStatusUpdater *m_updater;
bool init(bool rst = false);
bool init(bool rst = false, bool rdonly = false);
};
/** Helper methods in recollindex.cpp for initial checks/setup to index

View File

@ -1,5 +1,5 @@
#!/bin/sh
# @(#$Id: makesrcdist.sh,v 1.11 2006-10-09 16:37:08 dockes Exp $ (C) 2005 J.F.Dockes
# @(#$Id: makesrcdist.sh,v 1.12 2006-11-30 13:38:43 dockes Exp $ (C) 2005 J.F.Dockes
# A shell-script to make a recoll source distribution
#set -x
@ -61,6 +61,7 @@ cvs commit -m '' README INSTALL
# Clean up this dir and copy the dist-specific files
make clean
yes | clean.O
rm -f lib/*.dep
$TAR chfX - excludefile . | (cd $topdir;$TAR xf -)
# Fix the single/multiple page link in the header (we dont deliver the

View File

@ -37,7 +37,8 @@ strip index/recollindex qtgui/recoll
files="COPYING README INSTALL VERSION Makefile recoll.desktop recollinstall
filters sampleconf doc/user doc/man
index/recollindex qtgui/recoll qtgui/i18n/*.qm qtgui/mtpics/*.png recoll.png"
index/recollindex index/rclmon.sh qtgui/recoll qtgui/i18n/*.qm
qtgui/mtpics/*.png recoll.png"
$TAR chf - $files | (cd $topdir; $TAR xf -)

View File

@ -7,4 +7,4 @@ ALL_CXXFLAGS = $(CXXFLAGS) $(COMMONCXXFLAGS) $(LOCALCXXFLAGS) \
CC = gcc
CXX = g++
LIBSYS = -lpthread -lnsl -lsocket
LIBSYS = -lpthread -lnsl -lsocket -ldl

View File

@ -19,6 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>4</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout18</cstring>
@ -43,23 +46,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<spacer>
<property name="name">
<cstring>spacer1</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
<property name="spacing">
<number>2</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2</cstring>
@ -79,7 +68,7 @@
<enum>Plain</enum>
</property>
<property name="margin">
<number>7</number>
<number>4</number>
</property>
<property name="text">
<string>Search for &lt;br&gt;documents&lt;br&gt;satisfying:</string>
@ -113,8 +102,8 @@
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
@ -166,6 +155,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="spacing">
<number>2</number>
</property>
<widget class="Line">
<property name="name">
<cstring>clauseline</cstring>
@ -229,6 +221,9 @@
<property name="text">
<string>Save as default</string>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
@ -237,7 +232,7 @@
</widget>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout12</cstring>
<cstring>filTypHB</cstring>
</property>
<hbox>
<property name="name">
@ -251,6 +246,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
@ -269,7 +267,7 @@
<property name="minimumSize">
<size>
<width>200</width>
<height>80</height>
<height>20</height>
</size>
</property>
<property name="selectionMode">
@ -286,6 +284,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="spacing">
<number>2</number>
</property>
<widget class="QPushButton">
<property name="name">
<cstring>delAFiltypPB</cstring>
@ -352,6 +353,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>textLabel3</cstring>
@ -370,7 +374,7 @@
<property name="minimumSize">
<size>
<width>200</width>
<height>80</height>
<height>20</height>
</size>
</property>
<property name="selectionMode">

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.12 2006-11-17 15:26:40 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: advsearch_w.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -49,7 +49,7 @@ using std::string;
extern RclConfig *rclconfig;
static const int initclausetypes[] = {1, 3, 0, 0, 2, 5};
static const int initclausetypes[] = {1, 3, 0, 2, 5};
static const unsigned int iclausescnt = sizeof(initclausetypes) / sizeof(int);
void AdvSearch::init()
@ -176,6 +176,10 @@ void AdvSearch::addClause()
{
addClause(0);
}
#define HORADJ 50
#define VERTADJ 30
void AdvSearch::addClause(int tp)
{
SearchClauseW *w = new SearchClauseW(this);
@ -192,7 +196,7 @@ void AdvSearch::addClause(int tp)
}
// Have to adjust the size else we lose the bottom buttons! Why?
QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80));
resize(QSize(sz.width()+HORADJ, sz.height()+VERTADJ));
}
void AdvSearch::delClause()
@ -207,14 +211,14 @@ void AdvSearch::delClause()
delClausePB->setEnabled(false);
}
QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80));
resize(QSize(sz.width()+HORADJ, sz.height()+VERTADJ));
}
void AdvSearch::polish()
{
QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80));
AdvSearchBase::polish();
QSize sz = sizeHint();
resize(QSize(sz.width()+HORADJ+10, sz.height()+VERTADJ-20));
}
// Move selected file types from the ignored to the searched box
@ -255,6 +259,7 @@ void AdvSearch::restrictFtCB_toggled(bool on)
delAFiltypPB->setEnabled(on);
addAFiltypPB->setEnabled(on);
noFiltypsLB->setEnabled(on);
saveFileTypesPB->setEnabled(on);
}
using namespace Rcl;

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.25 2006-11-21 08:47:51 dockes Exp $ (C) 2005 Jean-Francois Dockes";
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.26 2006-11-30 13:38:44 dockes Exp $ (C) 2005 Jean-Francois Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -149,8 +149,10 @@ void rwSettings(bool writing)
QSettings settings;
settings.setPath("Recoll.org", "Recoll", QSettings::User);
#endif
SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 500);
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 400);
SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 0);
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 0);
SETTING_RW(prefs.pvwidth, "/Recoll/geometry/pvwidth", Num, 0);
SETTING_RW(prefs.pvheight, "/Recoll/geometry/pvheight", Num, 0);
SETTING_RW(prefs.ssearchTyp, "/Recoll/prefs/simpleSearchTyp", Num, 0);
SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , "");
SETTING_RW(prefs.startWithAdvSearchOpen,
@ -159,7 +161,7 @@ void rwSettings(bool writing)
"/Recoll/prefs/startWithSortToolOpen", Bool, false);
QString advSearchClauses;
QString ascdflt = QString::fromAscii("1 3 0 0 2 5 ");
QString ascdflt;
if (writing) {
for (vector<int>::iterator it = prefs.advSearchClauses.begin();
it != prefs.advSearchClauses.end(); it++) {
@ -185,9 +187,9 @@ void rwSettings(bool writing)
"/Recoll/prefs/ssearchAutoPhrase", Bool, false);
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", ,
"");
"Helvetica");
SETTING_RW(prefs.reslistfontsize, "/Recoll/prefs/reslist/fontSize", Num,
0);
10);
QString rlfDflt =
QString::fromAscii("%R %S %L &nbsp;&nbsp;<b>%T</b><br>"
"%M&nbsp;%D&nbsp;&nbsp;&nbsp;<i>%U</i><br>"

View File

@ -17,7 +17,7 @@
#ifndef _GUIUTILS_H_INCLUDED_
#define _GUIUTILS_H_INCLUDED_
/*
* @(#$Id: guiutils.h,v 1.17 2006-11-21 08:47:51 dockes Exp $ (C) 2005 Jean-Francois Dockes
* @(#$Id: guiutils.h,v 1.18 2006-11-30 13:38:44 dockes Exp $ (C) 2005 Jean-Francois Dockes
* jean-francois.dockes@wanadoo.fr
*
* This program is free software; you can redistribute it and/or modify
@ -71,6 +71,8 @@ class PrefsPack {
QString queryStemLang;
int mainwidth;
int mainheight;
int pvwidth; // Preview window geom
int pvheight;
int ssearchTyp;
QString htmlBrowser;
bool queryBuildAbstract;

View File

@ -223,6 +223,10 @@ Click Cancel if you want to edit the configuration file before indexation starts
<source>Cancel</source>
<translation>Annuler</translation>
</message>
<message>
<source>Close Tab</source>
<translation>Fermer l&apos;onglet</translation>
</message>
</context>
<context>
<name>PreviewBase</name>

View File

@ -224,6 +224,10 @@ Click Cancel if you want to edit the configuration file before indexation starts
<source>Cancel</source>
<translation>Отмена</translation>
</message>
<message>
<source>Close Tab</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PreviewBase</name>

View File

@ -221,6 +221,10 @@ Click Cancel if you want to edit the configuration file before indexation starts
<source>Loading preview text into editor</source>
<translation>Завантажую текст перегляду в редактор</translation>
</message>
<message>
<source>Close Tab</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PreviewBase</name>

BIN
src/qtgui/images/cancel.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

BIN
src/qtgui/images/close.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: main.cpp,v 1.52 2006-10-11 14:16:26 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: main.cpp,v 1.53 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -270,10 +270,11 @@ int main(int argc, char **argv)
RclMain w;
mainWindow = &w;
#endif
QSize s(prefs.mainwidth, prefs.mainheight);
mainWindow->resize(s);
// fprintf(stderr, "Main win created\n");
if (prefs.mainwidth > 100) {
QSize s(prefs.mainwidth, prefs.mainheight);
mainWindow->resize(s);
}
mainWindow->sSearch->searchTypCMB->setCurrentItem(prefs.ssearchTyp);
dbdir = rclconfig->getDbDir();

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: plaintorich.cpp,v 1.17 2006-11-18 12:56:16 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: plaintorich.cpp,v 1.18 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -62,6 +62,8 @@ class myTextSplitCB : public TextSplitCB {
// Out: first query term found in text
string firstTerm;
int firstTermOcc;
int m_firstTermPos;
int m_firstTermBPos;
// Out: begin and end byte positions of query terms/groups in text
vector<pair<int, int> > tboffs;
@ -96,6 +98,7 @@ class myTextSplitCB : public TextSplitCB {
if (firstTerm.empty()) {
firstTerm = term;
m_firstTermPos = pos;
m_firstTermBPos = bts;
}
}
@ -117,7 +120,6 @@ private:
virtual bool matchGroup(const vector<string>& terms, int dist);
int m_wcount;
int m_firstTermPos;
// In: user query terms
set<string> m_terms;
@ -239,6 +241,20 @@ bool myTextSplitCB::matchGroup(const vector<string>& terms, int window)
LOGDEB0(("myTextSplitCB::matchGroup: MATCH [%d,%d]\n", sta, sto));
// Translate the position window into a byte offset window
int bs = 0;
map<int, pair<int, int> >::iterator i1 = m_gpostobytes.find(sta);
map<int, pair<int, int> >::iterator i2 = m_gpostobytes.find(sto);
if (i1 != m_gpostobytes.end() && i2 != m_gpostobytes.end()) {
LOGDEB1(("myTextSplitCB::matchGroup: pushing %d %d\n",
i1->second.first, i2->second.second));
tboffs.push_back(pair<int, int>(i1->second.first, i2->second.second));
bs = i1->second.first;
} else {
LOGDEB(("myTextSplitCB::matchGroup: no bpos found for %d or %d\n",
sta, sto));
}
if (firstTerm.empty() || m_firstTermPos > sta) {
// firsTerm is used to try an position the preview window over
// the match. As it's difficult to divine byte/word positions
@ -252,31 +268,24 @@ bool myTextSplitCB::matchGroup(const vector<string>& terms, int window)
firstTerm = it->second;
LOGDEB(("myTextSplitCB:: best group term %s, firstTermOcc %d\n",
firstTerm.c_str(), firstTermOcc));
}
// Translate the position window into a byte offset window
map<int, pair<int, int> >::iterator i1 = m_gpostobytes.find(sta);
map<int, pair<int, int> >::iterator i2 = m_gpostobytes.find(sto);
if (i1 != m_gpostobytes.end() && i2 != m_gpostobytes.end()) {
LOGDEB1(("myTextSplitCB::matchGroup: pushing %d %d\n",
i1->second.first, i2->second.second));
tboffs.push_back(pair<int, int>(i1->second.first, i2->second.second));
} else {
LOGDEB(("myTextSplitCB::matchGroup: no bpos found for %d or %d\n",
sta, sto));
m_firstTermPos = sta;
m_firstTermBPos = bs;
}
return true;
}
/** Sort integer pairs by their first value */
/** Sort integer pairs by increasing first value and decreasing width */
class PairIntCmpFirst {
public:
bool operator()(pair<int,int> a, pair<int, int>b) {
return a.first < b.first;
if (a.first != b.first)
return a.first < b.first;
return a.second > b.second;
}
};
// Do the phrase match thing, then merge the highlight lists
bool myTextSplitCB::matchGroups()
{
vector<vector<string> >::const_iterator vit = m_groups.begin();
@ -285,10 +294,18 @@ bool myTextSplitCB::matchGroups()
matchGroup(*vit, *sit + (*vit).size());
}
// Sort by start and end offsets. The merging of overlapping entries
// will be handled during output.
std::sort(tboffs.begin(), tboffs.end(), PairIntCmpFirst());
return true;
}
const char *firstTermAnchorName = "FIRSTTERM";
#ifdef QT_SCROLL_TO_ANCHOR_BUG
const char *firstTermBeacon = "\xe2\xa0\x91\xe2\x96\x9f\x20\x01\x9a";
#endif
// Fix result text for display inside the gui text window.
//
// To compute the term character positions in the output text, we used
@ -300,9 +317,7 @@ bool myTextSplitCB::matchGroups()
// editor's find() function to position on it
bool plaintorich(const string& in, string& out,
RefCntr<Rcl::SearchData> sdata,
string *firstTerm,
int *firstTermOcc,
bool noHeader)
bool noHeader, bool fft)
{
Chrono chron;
out.erase();
@ -338,11 +353,6 @@ bool plaintorich(const string& in, string& out,
cb.matchGroups();
if (firstTerm)
*firstTerm = cb.firstTerm;
if (firstTermOcc)
*firstTermOcc = cb.firstTermOcc;
// Rich text output
if (noHeader)
out = "";
@ -376,12 +386,24 @@ bool plaintorich(const string& in, string& out,
// If we still have terms positions, check (byte) position
if (tPosIt != tboffsend) {
int ibyteidx = chariter.getBpos();
if (fft && ibyteidx == cb.m_firstTermBPos) {
out += string("<a name=\"") + firstTermAnchorName + "\"> "
#ifdef QT_SCROLL_TO_ANCHOR_BUG
+ "<font color=\"white\"> " + firstTermBeacon + " </font> "
#endif
+ "</a>";
}
if (ibyteidx == tPosIt->first) {
out += "<termtag>";
} else if (ibyteidx == tPosIt->second) {
if (tPosIt != cb.tboffs.end())
tPosIt++;
// Output end tag, then skip all highlight areas that
// would overlap this one
out += "</termtag>";
int crend = tPosIt->second;
while (tPosIt != cb.tboffs.end() && tPosIt->first < crend)
tPosIt++;
}
}
switch(*chariter) {
@ -414,7 +436,7 @@ bool plaintorich(const string& in, string& out,
}
#if 0
{
FILE *fp = fopen("/tmp/debugplaintorich", "w");
FILE *fp = fopen("/tmp/debugplaintorich", "a");
fprintf(fp, "%s\n", out.c_str());
fclose(fp);
}

View File

@ -16,7 +16,7 @@
*/
#ifndef _PLAINTORICH_H_INCLUDED_
#define _PLAINTORICH_H_INCLUDED_
/* @(#$Id: plaintorich.h,v 1.10 2006-11-18 12:31:16 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: plaintorich.h,v 1.11 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
@ -38,7 +38,16 @@
*/
extern bool plaintorich(const string &in, string &out,
RefCntr<Rcl::SearchData> sdata,
string* firstTerm, int *frsttocc,
bool noHeader = false);
bool noHeader = false,
bool fft = false);
extern const char *firstTermAnchorName;
#define QT_SCROLL_TO_ANCHOR_BUG
#ifdef QT_SCROLL_TO_ANCHOR_BUG
// For some reason, can't get scrollToAnchor() to work. We use a string made
// of a few rare utf8 chars as a beacon for the match area.
extern const char *firstTermBeacon;
#endif
#endif /* _PLAINTORICH_H_INCLUDED_ */

View File

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>751</width>
<height>727</height>
<width>640</width>
<height>480</height>
</rect>
</property>
<property name="sizePolicy">
@ -20,12 +20,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>130</width>
<height>30</height>
</size>
</property>
<property name="caption">
<string>Preview</string>
</property>
@ -33,6 +27,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>4</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
@ -56,6 +53,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="QTextEdit">
<property name="name">
<cstring>pvEdit</cstring>

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.7 2006-11-18 12:31:16 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.8 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -58,6 +58,18 @@ using std::pair;
void Preview::init()
{
#if 0
// Couldn't get a small button really in the corner. stays on the left of
// the button area and looks ugly
QPixmap px = QPixmap::fromMimeSource("cancel.png");
QPushButton * bt = new QPushButton(px, "", this);
bt->setFixedSize(px.size());
#else
QPushButton * bt = new QPushButton(tr("Close Tab"), this);
#endif
pvTab->setCornerWidget(bt);
// signals and slots connections
connect(searchTextLine, SIGNAL(textChanged(const QString&)),
this, SLOT(searchTextLine_textChanged(const QString&)));
@ -66,12 +78,16 @@ void Preview::init()
connect(clearPB, SIGNAL(clicked()), searchTextLine, SLOT(clear()));
connect(pvTab, SIGNAL(currentChanged(QWidget *)),
this, SLOT(currentChanged(QWidget *)));
connect(bt, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
searchTextLine->installEventFilter(this);
dynSearchActive = false;
canBeep = true;
tabData.push_back(TabData(pvTab->currentPage()));
currentW = 0;
if (prefs.pvwidth > 100) {
resize(prefs.pvwidth, prefs.pvheight);
}
}
void Preview::destroy()
@ -80,6 +96,8 @@ void Preview::destroy()
void Preview::closeEvent(QCloseEvent *e)
{
prefs.pvwidth = width();
prefs.pvheight = height();
emit previewExposed(m_searchId, -1);
emit previewClosed((QWidget *)this);
QWidget::closeEvent(e);
@ -450,15 +468,11 @@ class LoadThread : public QThread {
class ToRichThread : public QThread {
string &in;
RefCntr<Rcl::SearchData> m_searchData;
string& firstTerm;
int& firstTermOcc;
QString &out;
int loglevel;
public:
ToRichThread(string &i, RefCntr<Rcl::SearchData> searchData,
string& ft, int& fto, QString &o)
: in(i), m_searchData(searchData), firstTerm(ft), firstTermOcc(fto),
out(o)
ToRichThread(string &i, RefCntr<Rcl::SearchData> searchData, QString &o)
: in(i), m_searchData(searchData), out(o)
{
loglevel = DebugLog::getdbl()->getlevel();
}
@ -467,7 +481,7 @@ class ToRichThread : public QThread {
DebugLog::getdbl()->setloglevel(loglevel);
string rich;
try {
plaintorich(in, rich, m_searchData, &firstTerm, &firstTermOcc);
plaintorich(in, rich, m_searchData, false, true);
} catch (CancelExcept) {
}
out = QString::fromUtf8(rich.c_str(), rich.length());
@ -548,12 +562,9 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc,
// Create preview text: highlight search terms (if not too big):
QString richTxt;
bool highlightTerms = fdoc.text.length() < 1000 *1024;
string firstTerm;
int firstTermOcc;
if (highlightTerms) {
progress.setLabelText(tr("Creating preview text"));
ToRichThread rthr(fdoc.text, m_searchData, firstTerm, firstTermOcc,
richTxt);
ToRichThread rthr(fdoc.text, m_searchData, richTxt);
rthr.start();
for (;;prog++) {
@ -618,6 +629,7 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc,
editor->setCursorPosition(0,0);
editor->ensureCursorVisible();
}
if (progress.wasCanceled()) {
cancel = true;
editor->append("<b>Cancelled !</b>");
@ -630,15 +642,16 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc,
canBeep = true;
doSearch(searchTextLine->text(), true, false);
} else {
if (!firstTerm.empty()) {
bool wasC = matchCheck->isChecked();
matchCheck->setChecked(false);
for (int i = 0; i < firstTermOcc; i++) {
doSearch(QString::fromUtf8(firstTerm.c_str()), i,
false, true);
}
matchCheck->setChecked(wasC);
}
QString aname = QString::fromUtf8(firstTermAnchorName);
LOGDEB2(("Calling scrolltoanchor [%s]\n", (const char *)aname.utf8()));
editor->scrollToAnchor(aname);
#ifdef QT_SCROLL_TO_ANCHOR_BUG
bool wasC = matchCheck->isChecked();
matchCheck->setChecked(false);
doSearch(QString::fromUtf8(firstTermBeacon), 0, false, false);
editor->del();
matchCheck->setChecked(wasC);
#endif
}
emit(previewExposed(m_searchId, docnum));
return true;

View File

@ -8,8 +8,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>681</width>
<height>244</height>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="sizePolicy">
@ -20,12 +20,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>25</width>
<height>244</height>
</size>
</property>
<property name="caption">
<string>Recoll</string>
</property>
@ -33,6 +27,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>4</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>unnamed</cstring>

View File

@ -68,5 +68,8 @@ UNAME = $$system(uname -s)
contains( UNAME, [lL]inux ) {
LIBS -= -liconv
}
contains( UNAME, SunOS ) {
LIBS += -ldl
}
TRANSLATIONS = i18n/recoll_fr.ts i18n/recoll_ru.ts i18n/recoll_uk.ts

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.12 2006-11-18 12:31:16 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: reslist.cpp,v 1.13 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
#include <time.h>
@ -352,7 +352,8 @@ void ResList::resultPageNext()
// Result number
char numbuf[20];
sprintf(numbuf, "%.2d", m_winfirst+1+i);
int docnumforlinks = m_winfirst+1+i;
sprintf(numbuf, "%d", docnumforlinks);
// Document date: either doc or file modification time
char datebuf[100];
@ -361,7 +362,11 @@ void ResList::resultPageNext()
time_t mtime = doc.dmtime.empty() ?
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
#ifndef sun
strftime(datebuf, 99, "&nbsp;%Y-%m-%d&nbsp;%H:%M:%S&nbsp;%z", tm);
#else
strftime(datebuf, 99, "&nbsp;%Y-%m-%d&nbsp;%H:%M:%S&nbsp;%Z", tm);
#endif
}
// Size information. We print both doc and file if they differ a lot
@ -381,18 +386,18 @@ void ResList::resultPageNext()
// Abstract
string abst;
plaintorich(doc.abstract, abst, m_searchData, 0, 0, true);
plaintorich(doc.abstract, abst, m_searchData, true);
// Links;
string linksbuf;
char vlbuf[100];
if (canIntern(doc.mimetype, rclconfig)) {
sprintf(vlbuf, "\"P%d\"", m_winfirst+i);
sprintf(vlbuf, "\"P%d\"", docnumforlinks);
linksbuf += string("<a href=") + vlbuf + ">" + "Preview" + "</a>"
+ "&nbsp;&nbsp;";
}
if (!rclconfig->getMimeViewerDef(doc.mimetype).empty()) {
sprintf(vlbuf, "E%d", m_winfirst+i);
sprintf(vlbuf, "E%d", docnumforlinks);
linksbuf += string("<a href=") + vlbuf + ">" + "Edit" + "</a>";
}
@ -432,6 +437,7 @@ void ResList::resultPageNext()
QString str = QString::fromUtf8(result.c_str(), result.length());
append(str);
setCursorPosition(0,0);
ensureCursorVisible();
m_pageParaToReldocnums[paragraphs()-1] = i;
m_curDocs.push_back(doc);
@ -535,7 +541,7 @@ void ResList::doubleClicked(int, int)
void ResList::linkWasClicked(const QString &s, int clkmod)
{
LOGDEB(("ResList::linkClicked: [%s]\n", s.ascii()));
int i = atoi(s.ascii()+1);
int i = atoi(s.ascii()+1) -1;
int what = s.ascii()[0];
switch (what) {
case 'H':

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: searchclause_w.cpp,v 1.2 2006-11-14 17:41:12 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: searchclause_w.cpp,v 1.3 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -40,7 +40,7 @@ SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
setName("SearchClauseW");
searchClauseLayout = new QVBoxLayout(this);
hLayout = new QHBoxLayout(0, 0, 6, "hLayout");
hLayout = new QHBoxLayout(0, 0, 3, "hLayout");
sTpCMB = new QComboBox(FALSE, this, "sTpCMB");
hLayout->addWidget(sTpCMB);
@ -56,8 +56,7 @@ SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
resize(QSize(0, 0).expandedTo(minimumSizeHint()));
clearWState(WState_Polished);
connect(sTpCMB, SIGNAL(activated(int)),
this, SLOT(tpChange(int)));
connect(sTpCMB, SIGNAL(activated(int)), this, SLOT(tpChange(int)));
}
/*
@ -115,7 +114,6 @@ SearchClauseW::getClause()
(const char *)wordsLE->text().utf8(),
proxSlackSB->value());
case 4:
fprintf(stderr, "NEAR\n");
return new SearchDataClauseDist(SCLT_NEAR,
(const char *)wordsLE->text().utf8(),
proxSlackSB->value());

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.6 2006-11-21 08:47:51 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: spell_w.cpp,v 1.7 2006-11-30 13:38:44 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -48,7 +48,10 @@ void SpellW::init()
/*1*/expTypeCMB->insertItem(tr("Regexp"));
/*2*/expTypeCMB->insertItem(tr("Stem expansion"));
#ifdef RCL_USE_ASPELL
/*3*/expTypeCMB->insertItem(tr("Spelling/Phonetic"));
bool noaspell = false;
rclconfig->getConfParam("noaspell", &noaspell);
if (!noaspell)
/*3*/expTypeCMB->insertItem(tr("Spelling/Phonetic"));
#endif
int typ = prefs.termMatchType;

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: ssearch_w.cpp,v 1.11 2006-11-13 08:58:47 dockes Exp $ (C) 2006 J.F.Dockes";
static char rcsid[] = "@(#$Id: ssearch_w.cpp,v 1.12 2006-11-30 13:38:44 dockes Exp $ (C) 2006 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -69,34 +69,29 @@ void SSearch::searchTextChanged( const QString & text )
void SSearch::startSimpleSearch()
{
LOGDEB(("SSearch::startSimpleSearch\n"));
if (queryText->currentText().length() == 0)
return;
RefCntr<Rcl::SearchData> sdata(new Rcl::SearchData(Rcl::SCLT_AND));
QCString u8 = queryText->currentText().utf8();
string u8 = (const char *)queryText->currentText().utf8();
LOGDEB(("SSearch::startSimpleSearch: [%s]\n", u8.c_str()));
switch (searchTypCMB->currentItem()) {
case 0:
default:
{
QString comp = queryText->currentText();
// If this is an or and we're set for autophrase and there are
// no quotes in the query, add a phrase search
if (prefs.ssearchAutoPhrase && comp.find('"', 0) == -1) {
comp += QString::fromAscii(" \"") + comp +
QString::fromAscii("\"");
u8 = comp.utf8();
}
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_OR,
(const char *)u8));
// If this is an or and we're set for autophrase and there are
// no quotes in the query, add a phrase search
if (prefs.ssearchAutoPhrase &&
u8.find_first_of("\"") == string::npos) {
u8 += string(" \"") + u8 + "\"";
}
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_OR, u8));
break;
case 1:
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_AND,
(const char *)u8));
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_AND, u8));
break;
case 2:
sdata->addClause(new Rcl::SearchDataClauseFilename((const char *)u8));
sdata->addClause(new Rcl::SearchDataClauseFilename(u8));
break;
}

View File

@ -19,6 +19,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>4</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<widget class="QLayoutWidget">
<property name="name">
<cstring>layout2</cstring>

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.5 2006-11-18 12:30:14 dockes Exp $ (C) 2006 J.F.Dockes";
static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.6 2006-11-30 13:38:44 dockes Exp $ (C) 2006 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -182,7 +182,8 @@ void StringToXapianQ::maybeStemExp(bool nostemexp,
const string& term,
list<string>& exp)
{
LOGDEB2(("maybeStemExp: [%s]\n", term.c_str()));
LOGDEB2(("maybeStemExp: term [%s] stemlang [%s] nostemexp %d\n",
term.c_str(), m_stemlang.c_str(), nostemexp));
if (term.empty()) {
exp.clear();
return;
@ -191,7 +192,10 @@ void StringToXapianQ::maybeStemExp(bool nostemexp,
string term1;
dumb_string(term, term1);
if (!m_stemlang.empty() && !nostemexp) {
if (m_stemlang.empty())
nostemexp = true;
if (!nostemexp) {
// Check if the first letter is a majuscule in which
// case we do not want to do stem expansion. Note that
// the test is convoluted and possibly problematic
@ -267,6 +271,7 @@ bool StringToXapianQ::translate(const string &iq,
int slack, bool useNear)
{
string qstring = iq;
LOGDEB2(("StringToXapianQ:: query string: [%s]\n", iq.c_str()));
ermsg.erase();
m_terms.clear();
m_groups.clear();

View File

@ -6,4 +6,4 @@ Exec=recoll
Icon=recoll
Type=Application
Terminal=false
Categories=Qt;Utility;
Categories=Utility;Filesystem;Database;

View File

@ -57,13 +57,14 @@ for d in \
${datadir}/recoll/examples \
${datadir}/recoll/filters \
${datadir}/recoll/images \
${datadir}/recoll/translations
${datadir}/recoll/translations \
${datadir}/icons/hicolor/48x48/apps
do
test -d $d || mkdir -p $d || exit 1
done
${INSTALL} -m 0444 recoll.desktop ${datadir}/applications
${INSTALL} -m 0444 recoll.png ${datadir}/icons
${INSTALL} -m 0444 recoll.png ${datadir}/icons/hicolor/48x48/apps
${INSTALL} -m 0444 doc/user/usermanual.html doc/user/docbook.css \
${datadir}/recoll/doc
@ -75,13 +76,13 @@ ${STRIP} ${bindir}/recoll ${bindir}/recollindex
${INSTALL} -m 0755 filters/rcl* ${datadir}/recoll/filters/ || exit 1
${INSTALL} -m 0755 index/rclmon.sh ${datadir}/recoll/examples/ || exit 1
# Clean up possible old filters in examples
rm -f ${datadir}/recoll/examples/rcl*
${INSTALL} -m 0444 sampleconf/recoll.conf sampleconf/mimeconf \
sampleconf/mimemap ${datadir}/recoll/examples/ || exit 1
${INSTALL} -m 0755 index/rclmon.sh ${datadir}/recoll/examples/ || exit 1
${INSTALL} -m 0444 ${QTGUI}/mtpics/*.png ${datadir}/recoll/images || exit 1
${INSTALL} -m 0444 ${I18N}/recoll*.qm ${datadir}/recoll/translations || exit 1

View File

@ -1,4 +1,4 @@
# @(#$Id: recoll.conf.in,v 1.12 2006-10-11 14:16:26 dockes Exp $ (C) 2004 J.F.Dockes
# @(#$Id: recoll.conf.in,v 1.13 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes
#
# Recoll default configuration file. This should be copied to
# ~/.recoll/recoll.conf
@ -9,7 +9,7 @@ topdirs = ~
# Wildcard expressions for names of files and directories that we should
# ignore. If you need index mozilla/thunderbird mail folders, don't put
# ".*" in there (as was the case with an older sample config)
skippedNames = *~ #* bin CVS Cache cache* caughtspam tmp .thumbnails
skippedNames = *~ #* bin CVS Cache cache* caughtspam tmp .thumbnails .svn
# Debug messages. 3 is errors/warnings only. 4 would be quite verbose.
loglevel = 3

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: execmd.cpp,v 1.19 2006-10-11 16:09:45 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: execmd.cpp,v 1.20 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -126,6 +126,9 @@ int ExecCmd::doexec(const string &cmd, const list<string>& args,
}
if (e.pid) {
// Ignore SIGPIPE in here.
void (*osig)(int);
osig = signal(SIGPIPE, SIG_IGN);
// Father process
if (input) {
close(e.pipein[0]);
@ -219,6 +222,7 @@ int ExecCmd::doexec(const string &cmd, const list<string>& args,
out:
int status = -1;
signal(SIGPIPE, osig);
if (!m_cancelRequest) {
(void)waitpid(e.pid, &status, 0);
e.pid = -1;

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.16 2006-11-09 08:59:40 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: mimeparse.cpp,v 1.17 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -723,8 +723,27 @@ time_t rfc2822DateToUxTime(const string& dt)
DATEDEB((stderr, "Tz: [%s] -> %d\n", it->c_str(), zonesecs));
nozone:
// Compute the UTC Unix time value
#ifndef sun
time_t tim = timegm(&tm);
#else
// No timegm on Sun. Use mktime, then correct for local timezone
time_t tim = mktime(&tm);
// altzone and timezone hold the difference in seconds between UTC
// and local. They are negative for places east of greenwich
//
// mktime takes our buffer to be local time, so it adds timezone
// to the conversion result (if timezone is < 0 it's currently
// earlier in greenwhich).
//
// We have to substract it back (hey! hopefully! maybe we have to
// add it). Who can really know?
tim -= timezone;
#endif
// And add in the correction from the email's Tz
tim += zonesecs;
DATEDEB((stderr, "Date: %s uxtime %ld \n", ctime(&tim), tim));
return tim;
}

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.18 2006-11-10 13:30:03 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.19 2006-11-30 13:38:44 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -313,7 +313,7 @@ bool stringToBool(const string &s)
int val = atoi(s.c_str());
return val ? true : false;
}
if (strchr("yYoOtT", s[0]))
if (s.find_first_of("yYtT") == 0)
return true;
return false;
}

View File

@ -4,15 +4,14 @@ Bugs that are listed in an older version section are supposedly fixed in
later versions. Bugs listed in the topmost section may also exist in older
versions.
Latest:
Latest (1.6.2):
- 1.6 NEAR crashes: 1.6 has added NEAR searches. Unlike what recoll did
with PHRASES, stemming expansion is performed on terms inside NEAR
clauses (except if prevented by a capitalized entry of course). There is
a bug in Xapian at least up to 0.9.9, where NEAR does not support
multiple OR subclauses, as would result from a multiple expansion. This
manifests itself by a 'not implemented' Xapian exception and a recoll
crash. Workarounds:
manifests itself by a 'not implemented' Xapian exception. Workarounds:
- Prevent expansion of NEAR terms (possibly except one) by
capitalizing them.
@ -48,6 +47,13 @@ Latest:
probably a Kwin bug, possibly related to
http://bugs.kde.org/show_bug.cgi?id=79183 or a correction thereof.
- Under Solaris, it is necessary to perform initial indexing with the
recollindex program (the recoll index thread doesn't work for creating
the database). Don't know the reason. Only idea I have is problem with
exception handling (recoll catches an exception while trying the
yest inexistant db).
***************************************************************************
1.5.10
- If a defaultcharset was set in the configuration file for a subdirectory,
it would stay in effect for all subsequent files/directories (except if

View File

@ -11,8 +11,9 @@ values, and the user ones only for overrides. Your old configuration files
will still work, but, you may want to remove them if they are unmodified,
or keep only the modified parameters.
1.6.0
1.6.2
- Minor solaris compilation glitches only.
1.6.1
- Term explorer: a multimode wildcard-regexp-spell/phonetic tool to search
the index for terms. This uses aspell for the orthographic/phonetic part.
- A more dynamic advanced search window. You now have a choice of the top

View File

@ -55,23 +55,21 @@
<h3>Source</h3>
<p><span class="application">Recoll 1.6.0</span> is out ! This
version has quite a few improvements (see <a
href="CHANGES.txt">changes</a>). As a <em>.0</em> version, it
may not be for everybody, which is why the binary packages
stay with 1.5 for now. <br>Download the
source: <a
href="recoll-1.6.0.tar.gz">recoll-1.6.0.tar.gz</a>. The <a
href="usermanual-1.6">new documentation</a> is here too. Some
NEAR searches can crash recoll. Have a look at the
<a href="BUGS.txt">errata</a> for a workaround.
</p>
<p><b>Current version:</b> 1.5.11:
<a href="recoll-1.5.11.tar.gz">recoll-1.5.11.tar.gz</a>.
<p><b>Current version:</b>
1.6.1: <a href="recoll-1.6.1.tar.gz">recoll-1.6.1.tar.gz</a>
See the <a href="BUGS.txt">known bugs and issues</a> and <a
href="CHANGES.txt">changes</a>.</p>
<p>recoll 1.6 has the capacity to perform proximity searches (a
bit like phrases, but unordered). There is a still unpatched
problem in Xapian 0.9.9 which will make NEAR searches fail.
If you intend to perform proximity searches, have a look at the
<a href="BUGS.txt">errata</a> for a workaround and Xapian
patch. All the statically linked binary packages below use a
patched Xapian-core library in order for NEAR searches to work.</p>
<p>Older recoll releases:
<a href="recoll-1.5.11.tar.gz">1.5.11</a>.
<a href="recoll-1.5.6.tar.gz">1.5.6</a>.
<a href="recoll-1.4.3.tar.gz">1.4.3</a>.
<a href="recoll-1.3.3.tar.gz">1.3.3</a>.
@ -83,36 +81,42 @@
<h3>RPMS</h3>
<p>The executables inside the binary rpms have a static link to
xapian, there is no dependency except Qt 3.3. Of course you need
xapian-core installed to use the source rpm.</p>
xapian-core installed to use the source rpm. </p>
<p><b>Fedora Core 5</b>
RPM: <a href="recoll-1.5.11-1.i386.rpm">recoll-1.5.11-1.i386.rpm</a>.
RPM:
<a href="recoll-1.6.1-1.i386.rpm">
recoll-1.6.1-1.i386.rpm</a>.
Source:
<a href="recoll-1.5.11-1.src.rpm">recoll-1.5.11-1.src.rpm</a></p>
<a href="recoll-1.6.1-1.src.rpm">
recoll-1.6.1-1.src.rpm</a>
</p>
<p><b>Mandriva 2006</b> (also works on 2005 and 2007)
RPM: <a
href="recoll-1.5.11-0.1.20060mdk.i586.rpm">recoll-1.5.11-0.1.20060mdk.i586.rpm</a>.
Source: <a
href="recoll-1.5.11-0.1.20060mdk.src.rpm">recoll-1.5.11-0.1.20060mdk.src.rpm</a></p>
RPM:
<a href="recoll-1.6.1-0.1.20060mdk.i586.rpm">
recoll-1.6.1-0.1.20060mdk.i586.rpm</a>.
Source:
<a href="recoll-1.6.1-0.1.20060mdk.src.rpm">
recoll-1.6.1-0.1.20060mdk.src.rpm</a>
</p>
<p><b>Suse 10.1</b> It seems that the binaries in previous set of
rpms, which were built with the xapian packages from opensuse had a
serious tendancy to segfault on exceptions. I hope that the
current ones, with a local xapian build will work better. If
there are still problems, please compile from source.
<p><b>Suse 10.1</b>
RPM: <a
href="recoll-1.5.11-0.i586.rpm">recoll-1.5.11-0.i586.rpm</a>.
Source: <a
href="recoll-1.5.11-0.src.rpm">recoll-1.5.11-0.src.rpm</a></p>
RPM:
<a href="recoll-1.6.1-0.i586.rpm">
recoll-1.6.1-0.i586.rpm</a>.
Source:
<a href="recoll-1.6.1-0.src.rpm">
recoll-1.6.1-0.src.rpm</a></p>
</p>
<h3>Binary bundles</h3>
<p>These are just prebuilt trees (without the source files).
The executables were built with xapian 0.9.[6-9] and libiconv
The executables were built with xapian 0.9.9 (patched for the
NEAR bug) and libiconv
1.9.2 (where relevant) as static libraries. They depend on qt
3.3. For Solaris, you should be able to find a qt package <a
href="http://www.sunfreeware.com/">here</a>.</p>
@ -120,24 +124,30 @@
<p>The installation instructions are <a
href="usermanual/rcl.install.binary.html"> there</a>.</p>
<p><span class="application">FreeBSD</span> 5.5 i386: <a
href="recoll-1.5.11-FreeBSD-5.5-RELEASE.tgz">
recoll-1.5.11-FreeBSD-5.5-RELEASE.tgz</a></p>
<p><span class="application">FreeBSD</span> 5.5 i386:
<a href="recoll-1.6.1-FreeBSD-5.5-RELEASE.tgz">
recoll-1.6.1-FreeBSD-5.5-RELEASE.tgz</a>
</p>
<p><span class="application">Solaris 8</span> sparc.
<a href="recoll-1.5.4-SunOS-5.8.tgz">
recoll-1.5.4-SunOS-5.8.tgz</a>.</p>
Note to Solaris users: you need to perform the initial
indexing pass with "recollindex", not the recoll GUI indexing
thread. See <a href="BUGS.txt">errata</a>.
<a href="recoll-1.6.2-SunOS-5.8.tgz">
recoll-1.6.2-SunOS-5.8.tgz</a>.
</p>
<h3>FreeBSD ports</h3>
<p>There are ports for both xapian-core
and recoll in the standard tree, you may just need to update
your ports (cvsup), or you can get the ports from the FreeBSD
site: <a
href="http://cvsweb.freebsd.org/ports/databases/xapian-core">xapian
port</a> <a
href="http://cvsweb.freebsd.org/ports/deskutils/recoll">recoll
port</a>.</p>
site. The ports are not yet updated for recoll 1.6 or the
xapian NEAR problem though.
<a href="http://cvsweb.freebsd.org/ports/databases/xapian-core">
xapian port</a>
<a href="http://cvsweb.freebsd.org/ports/deskutils/recoll">
recoll port</a>.</p>
</div>
</body>

View File

@ -38,10 +38,10 @@
<dt><a name="systems">Supported systems</a></dt>
<dd><span class="application">Recoll</span> has been compiled and
tested on FreeBSD, Linux, Darwin and Solaris (versions
FreeBSD 5.3, Redhat 7.3, Fedora Core 4, Gentoo, Debian 3.1,
Solaris 8/9, but other not too distant releases should be ok
too). You can download the source code and some precompiled
packages <a href="download.html">here</a>.</dd>
FreeBSD 5.5, Redhat 7.3, Fedora Core 5, Suse 10.1, Gentoo,
Debian 3.1, Solaris 8/9, but other not too distant releases
should be ok too). You can download the source code and some
precompiled packages <a href="download.html">here</a>.</dd>
<dd>Qt versions from 3.1</dd>

View File

@ -47,7 +47,7 @@
<p><span class="application">Recoll</span> is free, open source,
and GPL-licensed. The current version is
<a class="important" href="download.html">1.5.11</a></p>
<a class="important" href="download.html">1.6.1</a></p>
<p>We borrow a lot of code
from other packages, and welcome code and ideas from
contributors, see the <a class="important"