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 # Date created: 5 December 2005
# Whom: J.F. Dockes <jean-francois.dockes@wanadoo.fr> # 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 PORTNAME= recoll
PORTVERSION= 1.5.2 PORTVERSION= 1.6.1
CATEGORIES= deskutils CATEGORIES= deskutils
MASTER_SITES= http://www.lesbonscomptes.com/recoll/ MASTER_SITES= http://www.lesbonscomptes.com/recoll/

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
%define name recoll %define name recoll
%define version 1.6.0 %define version 1.6.1
%define release %mkrel 1 %define release %mkrel 1
Name: %{name} Name: %{name}
@ -51,7 +51,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_bindir}/* %{_bindir}/*
%{_datadir}/applications/recoll.desktop %{_datadir}/applications/recoll.desktop
%{_datadir}/icons/recoll.png %{_datadir}/icons/hicolor/48x48/apps/recoll.png
%{_datadir}/%{name} %{_datadir}/%{name}
%{_mandir}/man1/recoll* %{_mandir}/man1/recoll*
%{_mandir}/man5/recoll* %{_mandir}/man5/recoll*
@ -60,6 +60,8 @@ rm -rf $RPM_BUILD_ROOT
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
%changelog %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 * Mon Nov 20 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.5.11-1
- Update to release 1.5.11 - Update to release 1.5.11
* Mon Oct 2 2006 Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> 1.5.2-1 * 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 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 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 recollconf=$HOME/.recoll-home
recolldata=/usr/local/share/recoll 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 for your flavour of session management, and of course, there are other
possibilities. 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 By default, the indexing daemon will write its messages to a file inside
the configuration directory (this is controlled by the daemlogfilename and the configuration directory (this is controlled by the daemlogfilename and
daemloglevel configuration parameters). You may want to change this. Also 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 %A %K
You may, for example, try the following for a more web-like experience You may, for example, try the following for a more web-like
(but the document title will not act as a link): 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 %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 * 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 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 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 TEST_RCLASPELL
#ifndef lint #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 #endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "autoconfig.h" #include "autoconfig.h"
@ -101,11 +101,6 @@ bool Aspell::init(string &reason)
if (!lang.compare("C")) if (!lang.compare("C"))
lang = "en"; lang = "en";
m_lang = lang.substr(0, lang.find_first_of("_")); 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; 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 { class AspExecPv : public ExecCmdProvide {
public: public:
string *m_input; // pointer to string used as input buffer to command string *m_input; // pointer to string used as input buffer to command
@ -203,12 +203,13 @@ public:
void newData() { void newData() {
while (m_db.termWalkNext(m_tit, *m_input)) { while (m_db.termWalkNext(m_tit, *m_input)) {
// Filter out terms beginning with upper case (special stuff) and // Filter out terms beginning with upper case (special stuff) and
// containing numbers // containing numbers, or too long. Note that the 50 limit is a
if (m_input->empty()) // byte count, so not so high if there are multibyte chars.
if (m_input->empty() || m_input->length() > 50)
continue; continue;
if ('A' <= m_input->at(0) && m_input->at(0) <= 'Z') if ('A' <= m_input->at(0) && m_input->at(0) <= 'Z')
continue; continue;
if (m_input->find_first_of("0123456789+-._@") != string::npos) if (m_input->find_first_of("0123456789.@+-,#_") != string::npos)
continue; continue;
// Got a non-empty sort-of appropriate term, let's send it to // Got a non-empty sort-of appropriate term, let's send it to
// aspell // aspell
@ -231,6 +232,7 @@ bool Aspell::buildDict(Rcl::Db &db, string &reason)
ExecCmd aspell; ExecCmd aspell;
list<string> args; list<string> args;
args.push_back(string("--lang=")+ m_lang); args.push_back(string("--lang=")+ m_lang);
args.push_back("--encoding=utf-8");
args.push_back("create"); args.push_back("create");
args.push_back("master"); args.push_back("master");
args.push_back(dicPath()); args.push_back(dicPath());

View File

@ -24,7 +24,7 @@
Dockes</holder> Dockes</holder>
</copyright> </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> <abstract>
<para>This document introduces full text search notions <para>This document introduces full text search notions
@ -441,8 +441,9 @@ recoll
<para>Starting and stopping the daemon could be performed, for <para>Starting and stopping the daemon could be performed, for
example, as part of the user session script. For example, my example, as part of the user session script. For example, my
out of fashion xdm-based session has an .xsession script with out of fashion xdm-based session has a
the following lines at the end:</para> <filename>.xsession</filename> script with the following lines
at the end:</para>
<programlisting>recollconf=$HOME/.recoll-home <programlisting>recollconf=$HOME/.recoll-home
recolldata=/usr/local/share/recoll 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 exit). This should be adjusted for your flavour of session
management, and of course, there are other possibilities.</para> 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 <para>By default, the indexing daemon will write its messages to
a file inside the configuration directory (this is controlled by a file inside the configuration directory (this is controlled by
the <literal>daemlogfilename</literal> and the <literal>daemlogfilename</literal> and
@ -1049,10 +1061,16 @@ RECOLL_CONFDIR=$recollconf $recolldata/examples/rclmon.sh stop
%A %K %A %K
</programlisting> </programlisting>
You may, for example, try the following for a more web-like You may, for example, try the following for a more web-like
experience (but the document title will not act as a link): experience:
<programlisting>&lt;u>&lt;b>&lt;font size=+1 color=#1111cf>%T&lt;/font>&lt;/b>&lt;/u>&lt;br> <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 %A&lt;font color=#008000>%U - %S&lt;/font> - %L
</programlisting> </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> </para>
</listitem> </listitem>

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -161,14 +161,16 @@ bool DbIndexer::createStemmingDatabases()
return true; 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 (m_tmpdir.empty() || access(m_tmpdir.c_str(), 0) < 0)
if (!maketmpdir(m_tmpdir)) { if (!maketmpdir(m_tmpdir)) {
LOGERR(("DbIndexer: cannot create temporary directory\n")); LOGERR(("DbIndexer: cannot create temporary directory\n"));
return false; 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())); LOGERR(("DbIndexer: error opening database in %s\n", m_dbdir.c_str()));
return false; return false;
} }
@ -177,7 +179,7 @@ bool DbIndexer::init(bool resetbefore)
bool DbIndexer::createStemDb(const string &lang) bool DbIndexer::createStemDb(const string &lang)
{ {
if (!init()) if (!init(false, true))
return false; return false;
return m_db.createStemDb(lang); return m_db.createStemDb(lang);
} }
@ -188,7 +190,12 @@ bool DbIndexer::createAspellDict()
{ {
LOGDEB2(("DbIndexer::createAspellDict()\n")); LOGDEB2(("DbIndexer::createAspellDict()\n"));
#ifdef RCL_USE_ASPELL #ifdef RCL_USE_ASPELL
if (!init()) bool noaspell = false;
m_config->getConfParam("noaspell", &noaspell);
if (noaspell)
return true;
if (!init(false, true))
return false; return false;
Aspell aspell(m_config); Aspell aspell(m_config);
string reason; string reason;

View File

@ -16,7 +16,7 @@
*/ */
#ifndef _INDEXER_H_INCLUDED_ #ifndef _INDEXER_H_INCLUDED_
#define _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 <string>
#include <list> #include <list>
@ -144,7 +144,7 @@ class DbIndexer : public FsTreeWalkerCB {
string m_tmpdir; string m_tmpdir;
DbIxStatusUpdater *m_updater; 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 /** Helper methods in recollindex.cpp for initial checks/setup to index

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/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 # A shell-script to make a recoll source distribution
#set -x #set -x
@ -61,6 +61,7 @@ cvs commit -m '' README INSTALL
# Clean up this dir and copy the dist-specific files # Clean up this dir and copy the dist-specific files
make clean make clean
yes | clean.O yes | clean.O
rm -f lib/*.dep
$TAR chfX - excludefile . | (cd $topdir;$TAR xf -) $TAR chfX - excludefile . | (cd $topdir;$TAR xf -)
# Fix the single/multiple page link in the header (we dont deliver the # 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 files="COPYING README INSTALL VERSION Makefile recoll.desktop recollinstall
filters sampleconf doc/user doc/man 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 -) $TAR chf - $files | (cd $topdir; $TAR xf -)

View File

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

View File

@ -19,6 +19,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="margin">
<number>4</number>
</property>
<widget class="QLayoutWidget"> <widget class="QLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout18</cstring> <cstring>layout18</cstring>
@ -43,23 +46,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<spacer> <property name="spacing">
<property name="name"> <number>2</number>
<cstring>spacer1</cstring> </property>
</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>
<widget class="QLabel"> <widget class="QLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
@ -79,7 +68,7 @@
<enum>Plain</enum> <enum>Plain</enum>
</property> </property>
<property name="margin"> <property name="margin">
<number>7</number> <number>4</number>
</property> </property>
<property name="text"> <property name="text">
<string>Search for &lt;br&gt;documents&lt;br&gt;satisfying:</string> <string>Search for &lt;br&gt;documents&lt;br&gt;satisfying:</string>
@ -113,8 +102,8 @@
</property> </property>
<property name="sizeHint"> <property name="sizeHint">
<size> <size>
<width>20</width> <width>0</width>
<height>16</height> <height>0</height>
</size> </size>
</property> </property>
</spacer> </spacer>
@ -166,6 +155,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="spacing">
<number>2</number>
</property>
<widget class="Line"> <widget class="Line">
<property name="name"> <property name="name">
<cstring>clauseline</cstring> <cstring>clauseline</cstring>
@ -229,6 +221,9 @@
<property name="text"> <property name="text">
<string>Save as default</string> <string>Save as default</string>
</property> </property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -237,7 +232,7 @@
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="QLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>filTypHB</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -251,6 +246,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel"> <widget class="QLabel">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
@ -269,7 +267,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>80</height> <height>20</height>
</size> </size>
</property> </property>
<property name="selectionMode"> <property name="selectionMode">
@ -286,6 +284,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="spacing">
<number>2</number>
</property>
<widget class="QPushButton"> <widget class="QPushButton">
<property name="name"> <property name="name">
<cstring>delAFiltypPB</cstring> <cstring>delAFiltypPB</cstring>
@ -352,6 +353,9 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<property name="spacing">
<number>0</number>
</property>
<widget class="QLabel"> <widget class="QLabel">
<property name="name"> <property name="name">
<cstring>textLabel3</cstring> <cstring>textLabel3</cstring>
@ -370,7 +374,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
<height>80</height> <height>20</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: 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 #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
@ -49,7 +49,7 @@ using std::string;
extern RclConfig *rclconfig; 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); static const unsigned int iclausescnt = sizeof(initclausetypes) / sizeof(int);
void AdvSearch::init() void AdvSearch::init()
@ -176,6 +176,10 @@ void AdvSearch::addClause()
{ {
addClause(0); addClause(0);
} }
#define HORADJ 50
#define VERTADJ 30
void AdvSearch::addClause(int tp) void AdvSearch::addClause(int tp)
{ {
SearchClauseW *w = new SearchClauseW(this); 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? // Have to adjust the size else we lose the bottom buttons! Why?
QSize sz = AdvSearchBaseLayout->sizeHint(); QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80)); resize(QSize(sz.width()+HORADJ, sz.height()+VERTADJ));
} }
void AdvSearch::delClause() void AdvSearch::delClause()
@ -207,14 +211,14 @@ void AdvSearch::delClause()
delClausePB->setEnabled(false); delClausePB->setEnabled(false);
} }
QSize sz = AdvSearchBaseLayout->sizeHint(); QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80)); resize(QSize(sz.width()+HORADJ, sz.height()+VERTADJ));
} }
void AdvSearch::polish() void AdvSearch::polish()
{ {
QSize sz = AdvSearchBaseLayout->sizeHint();
resize(QSize(sz.width()+40, sz.height()+80));
AdvSearchBase::polish(); 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 // Move selected file types from the ignored to the searched box
@ -255,6 +259,7 @@ void AdvSearch::restrictFtCB_toggled(bool on)
delAFiltypPB->setEnabled(on); delAFiltypPB->setEnabled(on);
addAFiltypPB->setEnabled(on); addAFiltypPB->setEnabled(on);
noFiltypsLB->setEnabled(on); noFiltypsLB->setEnabled(on);
saveFileTypesPB->setEnabled(on);
} }
using namespace Rcl; using namespace Rcl;

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -149,8 +149,10 @@ void rwSettings(bool writing)
QSettings settings; QSettings settings;
settings.setPath("Recoll.org", "Recoll", QSettings::User); settings.setPath("Recoll.org", "Recoll", QSettings::User);
#endif #endif
SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 500); SETTING_RW(prefs.mainwidth, "/Recoll/geometry/width", Num, 0);
SETTING_RW(prefs.mainheight, "/Recoll/geometry/height", Num, 400); 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.ssearchTyp, "/Recoll/prefs/simpleSearchTyp", Num, 0);
SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , ""); SETTING_RW(prefs.htmlBrowser, "/Recoll/prefs/htmlBrowser", , "");
SETTING_RW(prefs.startWithAdvSearchOpen, SETTING_RW(prefs.startWithAdvSearchOpen,
@ -159,7 +161,7 @@ void rwSettings(bool writing)
"/Recoll/prefs/startWithSortToolOpen", Bool, false); "/Recoll/prefs/startWithSortToolOpen", Bool, false);
QString advSearchClauses; QString advSearchClauses;
QString ascdflt = QString::fromAscii("1 3 0 0 2 5 "); QString ascdflt;
if (writing) { if (writing) {
for (vector<int>::iterator it = prefs.advSearchClauses.begin(); for (vector<int>::iterator it = prefs.advSearchClauses.begin();
it != prefs.advSearchClauses.end(); it++) { it != prefs.advSearchClauses.end(); it++) {
@ -185,9 +187,9 @@ void rwSettings(bool writing)
"/Recoll/prefs/ssearchAutoPhrase", Bool, false); "/Recoll/prefs/ssearchAutoPhrase", 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", ,
""); "Helvetica");
SETTING_RW(prefs.reslistfontsize, "/Recoll/prefs/reslist/fontSize", Num, SETTING_RW(prefs.reslistfontsize, "/Recoll/prefs/reslist/fontSize", Num,
0); 10);
QString rlfDflt = QString rlfDflt =
QString::fromAscii("%R %S %L &nbsp;&nbsp;<b>%T</b><br>" QString::fromAscii("%R %S %L &nbsp;&nbsp;<b>%T</b><br>"
"%M&nbsp;%D&nbsp;&nbsp;&nbsp;<i>%U</i><br>" "%M&nbsp;%D&nbsp;&nbsp;&nbsp;<i>%U</i><br>"

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.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 * 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
@ -71,6 +71,8 @@ class PrefsPack {
QString queryStemLang; QString queryStemLang;
int mainwidth; int mainwidth;
int mainheight; int mainheight;
int pvwidth; // Preview window geom
int pvheight;
int ssearchTyp; int ssearchTyp;
QString htmlBrowser; QString htmlBrowser;
bool queryBuildAbstract; bool queryBuildAbstract;

View File

@ -223,6 +223,10 @@ Click Cancel if you want to edit the configuration file before indexation starts
<source>Cancel</source> <source>Cancel</source>
<translation>Annuler</translation> <translation>Annuler</translation>
</message> </message>
<message>
<source>Close Tab</source>
<translation>Fermer l&apos;onglet</translation>
</message>
</context> </context>
<context> <context>
<name>PreviewBase</name> <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> <source>Cancel</source>
<translation>Отмена</translation> <translation>Отмена</translation>
</message> </message>
<message>
<source>Close Tab</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PreviewBase</name> <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> <source>Loading preview text into editor</source>
<translation>Завантажую текст перегляду в редактор</translation> <translation>Завантажую текст перегляду в редактор</translation>
</message> </message>
<message>
<source>Close Tab</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>PreviewBase</name> <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 #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 #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
@ -270,10 +270,11 @@ int main(int argc, char **argv)
RclMain w; RclMain w;
mainWindow = &w; mainWindow = &w;
#endif #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); mainWindow->sSearch->searchTypCMB->setCurrentItem(prefs.ssearchTyp);
dbdir = rclconfig->getDbDir(); dbdir = rclconfig->getDbDir();

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -62,6 +62,8 @@ class myTextSplitCB : public TextSplitCB {
// Out: first query term found in text // Out: first query term found in text
string firstTerm; string firstTerm;
int firstTermOcc; int firstTermOcc;
int m_firstTermPos;
int m_firstTermBPos;
// Out: begin and end byte positions of query terms/groups in text // Out: begin and end byte positions of query terms/groups in text
vector<pair<int, int> > tboffs; vector<pair<int, int> > tboffs;
@ -96,6 +98,7 @@ class myTextSplitCB : public TextSplitCB {
if (firstTerm.empty()) { if (firstTerm.empty()) {
firstTerm = term; firstTerm = term;
m_firstTermPos = pos; m_firstTermPos = pos;
m_firstTermBPos = bts;
} }
} }
@ -117,7 +120,6 @@ private:
virtual bool matchGroup(const vector<string>& terms, int dist); virtual bool matchGroup(const vector<string>& terms, int dist);
int m_wcount; int m_wcount;
int m_firstTermPos;
// In: user query terms // In: user query terms
set<string> m_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)); 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) { if (firstTerm.empty() || m_firstTermPos > sta) {
// firsTerm is used to try an position the preview window over // firsTerm is used to try an position the preview window over
// the match. As it's difficult to divine byte/word positions // 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; firstTerm = it->second;
LOGDEB(("myTextSplitCB:: best group term %s, firstTermOcc %d\n", LOGDEB(("myTextSplitCB:: best group term %s, firstTermOcc %d\n",
firstTerm.c_str(), firstTermOcc)); firstTerm.c_str(), firstTermOcc));
} m_firstTermPos = sta;
m_firstTermBPos = bs;
// 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));
} }
return true; return true;
} }
/** Sort integer pairs by their first value */ /** Sort integer pairs by increasing first value and decreasing width */
class PairIntCmpFirst { class PairIntCmpFirst {
public: public:
bool operator()(pair<int,int> a, pair<int, int>b) { 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() bool myTextSplitCB::matchGroups()
{ {
vector<vector<string> >::const_iterator vit = m_groups.begin(); vector<vector<string> >::const_iterator vit = m_groups.begin();
@ -285,10 +294,18 @@ bool myTextSplitCB::matchGroups()
matchGroup(*vit, *sit + (*vit).size()); 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()); std::sort(tboffs.begin(), tboffs.end(), PairIntCmpFirst());
return true; 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. // Fix result text for display inside the gui text window.
// //
// To compute the term character positions in the output text, we used // 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 // editor's find() function to position on it
bool plaintorich(const string& in, string& out, bool plaintorich(const string& in, string& out,
RefCntr<Rcl::SearchData> sdata, RefCntr<Rcl::SearchData> sdata,
string *firstTerm, bool noHeader, bool fft)
int *firstTermOcc,
bool noHeader)
{ {
Chrono chron; Chrono chron;
out.erase(); out.erase();
@ -338,11 +353,6 @@ bool plaintorich(const string& in, string& out,
cb.matchGroups(); cb.matchGroups();
if (firstTerm)
*firstTerm = cb.firstTerm;
if (firstTermOcc)
*firstTermOcc = cb.firstTermOcc;
// Rich text output // Rich text output
if (noHeader) if (noHeader)
out = ""; out = "";
@ -376,12 +386,24 @@ bool plaintorich(const string& in, string& out,
// If we still have terms positions, check (byte) position // If we still have terms positions, check (byte) position
if (tPosIt != tboffsend) { if (tPosIt != tboffsend) {
int ibyteidx = chariter.getBpos(); 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) { if (ibyteidx == tPosIt->first) {
out += "<termtag>"; out += "<termtag>";
} else if (ibyteidx == tPosIt->second) { } else if (ibyteidx == tPosIt->second) {
if (tPosIt != cb.tboffs.end()) // Output end tag, then skip all highlight areas that
tPosIt++; // would overlap this one
out += "</termtag>"; out += "</termtag>";
int crend = tPosIt->second;
while (tPosIt != cb.tboffs.end() && tPosIt->first < crend)
tPosIt++;
} }
} }
switch(*chariter) { switch(*chariter) {
@ -414,7 +436,7 @@ bool plaintorich(const string& in, string& out,
} }
#if 0 #if 0
{ {
FILE *fp = fopen("/tmp/debugplaintorich", "w"); FILE *fp = fopen("/tmp/debugplaintorich", "a");
fprintf(fp, "%s\n", out.c_str()); fprintf(fp, "%s\n", out.c_str());
fclose(fp); fclose(fp);
} }

View File

@ -16,7 +16,7 @@
*/ */
#ifndef _PLAINTORICH_H_INCLUDED_ #ifndef _PLAINTORICH_H_INCLUDED_
#define _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> #include <string>
@ -38,7 +38,16 @@
*/ */
extern bool plaintorich(const string &in, string &out, extern bool plaintorich(const string &in, string &out,
RefCntr<Rcl::SearchData> sdata, 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_ */ #endif /* _PLAINTORICH_H_INCLUDED_ */

View File

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

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -58,6 +58,18 @@ using std::pair;
void Preview::init() 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 // signals and slots connections
connect(searchTextLine, SIGNAL(textChanged(const QString&)), connect(searchTextLine, SIGNAL(textChanged(const QString&)),
this, SLOT(searchTextLine_textChanged(const QString&))); this, SLOT(searchTextLine_textChanged(const QString&)));
@ -66,12 +78,16 @@ void Preview::init()
connect(clearPB, SIGNAL(clicked()), searchTextLine, SLOT(clear())); connect(clearPB, SIGNAL(clicked()), searchTextLine, SLOT(clear()));
connect(pvTab, SIGNAL(currentChanged(QWidget *)), connect(pvTab, SIGNAL(currentChanged(QWidget *)),
this, SLOT(currentChanged(QWidget *))); this, SLOT(currentChanged(QWidget *)));
connect(bt, SIGNAL(clicked()), this, SLOT(closeCurrentTab()));
searchTextLine->installEventFilter(this); searchTextLine->installEventFilter(this);
dynSearchActive = false; dynSearchActive = false;
canBeep = true; canBeep = true;
tabData.push_back(TabData(pvTab->currentPage())); tabData.push_back(TabData(pvTab->currentPage()));
currentW = 0; currentW = 0;
if (prefs.pvwidth > 100) {
resize(prefs.pvwidth, prefs.pvheight);
}
} }
void Preview::destroy() void Preview::destroy()
@ -80,6 +96,8 @@ void Preview::destroy()
void Preview::closeEvent(QCloseEvent *e) void Preview::closeEvent(QCloseEvent *e)
{ {
prefs.pvwidth = width();
prefs.pvheight = height();
emit previewExposed(m_searchId, -1); emit previewExposed(m_searchId, -1);
emit previewClosed((QWidget *)this); emit previewClosed((QWidget *)this);
QWidget::closeEvent(e); QWidget::closeEvent(e);
@ -450,15 +468,11 @@ class LoadThread : public QThread {
class ToRichThread : public QThread { class ToRichThread : public QThread {
string &in; string &in;
RefCntr<Rcl::SearchData> m_searchData; RefCntr<Rcl::SearchData> m_searchData;
string& firstTerm;
int& firstTermOcc;
QString &out; QString &out;
int loglevel; int loglevel;
public: public:
ToRichThread(string &i, RefCntr<Rcl::SearchData> searchData, ToRichThread(string &i, RefCntr<Rcl::SearchData> searchData, QString &o)
string& ft, int& fto, QString &o) : in(i), m_searchData(searchData), out(o)
: in(i), m_searchData(searchData), firstTerm(ft), firstTermOcc(fto),
out(o)
{ {
loglevel = DebugLog::getdbl()->getlevel(); loglevel = DebugLog::getdbl()->getlevel();
} }
@ -467,7 +481,7 @@ class ToRichThread : public QThread {
DebugLog::getdbl()->setloglevel(loglevel); DebugLog::getdbl()->setloglevel(loglevel);
string rich; string rich;
try { try {
plaintorich(in, rich, m_searchData, &firstTerm, &firstTermOcc); plaintorich(in, rich, m_searchData, false, true);
} catch (CancelExcept) { } catch (CancelExcept) {
} }
out = QString::fromUtf8(rich.c_str(), rich.length()); 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): // Create preview text: highlight search terms (if not too big):
QString richTxt; QString richTxt;
bool highlightTerms = fdoc.text.length() < 1000 *1024; bool highlightTerms = fdoc.text.length() < 1000 *1024;
string firstTerm;
int firstTermOcc;
if (highlightTerms) { if (highlightTerms) {
progress.setLabelText(tr("Creating preview text")); progress.setLabelText(tr("Creating preview text"));
ToRichThread rthr(fdoc.text, m_searchData, firstTerm, firstTermOcc, ToRichThread rthr(fdoc.text, m_searchData, richTxt);
richTxt);
rthr.start(); rthr.start();
for (;;prog++) { for (;;prog++) {
@ -618,6 +629,7 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc,
editor->setCursorPosition(0,0); editor->setCursorPosition(0,0);
editor->ensureCursorVisible(); editor->ensureCursorVisible();
} }
if (progress.wasCanceled()) { if (progress.wasCanceled()) {
cancel = true; cancel = true;
editor->append("<b>Cancelled !</b>"); editor->append("<b>Cancelled !</b>");
@ -630,15 +642,16 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc,
canBeep = true; canBeep = true;
doSearch(searchTextLine->text(), true, false); doSearch(searchTextLine->text(), true, false);
} else { } else {
if (!firstTerm.empty()) { QString aname = QString::fromUtf8(firstTermAnchorName);
bool wasC = matchCheck->isChecked(); LOGDEB2(("Calling scrolltoanchor [%s]\n", (const char *)aname.utf8()));
matchCheck->setChecked(false); editor->scrollToAnchor(aname);
for (int i = 0; i < firstTermOcc; i++) { #ifdef QT_SCROLL_TO_ANCHOR_BUG
doSearch(QString::fromUtf8(firstTerm.c_str()), i, bool wasC = matchCheck->isChecked();
false, true); matchCheck->setChecked(false);
} doSearch(QString::fromUtf8(firstTermBeacon), 0, false, false);
matchCheck->setChecked(wasC); editor->del();
} matchCheck->setChecked(wasC);
#endif
} }
emit(previewExposed(m_searchId, docnum)); emit(previewExposed(m_searchId, docnum));
return true; return true;

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -40,7 +40,7 @@ SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
setName("SearchClauseW"); setName("SearchClauseW");
searchClauseLayout = new QVBoxLayout(this); searchClauseLayout = new QVBoxLayout(this);
hLayout = new QHBoxLayout(0, 0, 6, "hLayout"); hLayout = new QHBoxLayout(0, 0, 3, "hLayout");
sTpCMB = new QComboBox(FALSE, this, "sTpCMB"); sTpCMB = new QComboBox(FALSE, this, "sTpCMB");
hLayout->addWidget(sTpCMB); hLayout->addWidget(sTpCMB);
@ -56,8 +56,7 @@ SearchClauseW::SearchClauseW(QWidget* parent, const char* name, WFlags fl)
resize(QSize(0, 0).expandedTo(minimumSizeHint())); resize(QSize(0, 0).expandedTo(minimumSizeHint()));
clearWState(WState_Polished); clearWState(WState_Polished);
connect(sTpCMB, SIGNAL(activated(int)), connect(sTpCMB, SIGNAL(activated(int)), this, SLOT(tpChange(int)));
this, SLOT(tpChange(int)));
} }
/* /*
@ -115,7 +114,6 @@ SearchClauseW::getClause()
(const char *)wordsLE->text().utf8(), (const char *)wordsLE->text().utf8(),
proxSlackSB->value()); proxSlackSB->value());
case 4: case 4:
fprintf(stderr, "NEAR\n");
return new SearchDataClauseDist(SCLT_NEAR, return new SearchDataClauseDist(SCLT_NEAR,
(const char *)wordsLE->text().utf8(), (const char *)wordsLE->text().utf8(),
proxSlackSB->value()); proxSlackSB->value());

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -48,7 +48,10 @@ void SpellW::init()
/*1*/expTypeCMB->insertItem(tr("Regexp")); /*1*/expTypeCMB->insertItem(tr("Regexp"));
/*2*/expTypeCMB->insertItem(tr("Stem expansion")); /*2*/expTypeCMB->insertItem(tr("Stem expansion"));
#ifdef RCL_USE_ASPELL #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 #endif
int typ = prefs.termMatchType; int typ = prefs.termMatchType;

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -69,34 +69,29 @@ void SSearch::searchTextChanged( const QString & text )
void SSearch::startSimpleSearch() void SSearch::startSimpleSearch()
{ {
LOGDEB(("SSearch::startSimpleSearch\n"));
if (queryText->currentText().length() == 0) if (queryText->currentText().length() == 0)
return; return;
RefCntr<Rcl::SearchData> sdata(new Rcl::SearchData(Rcl::SCLT_AND)); 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()) { switch (searchTypCMB->currentItem()) {
case 0: case 0:
default: default:
{ // If this is an or and we're set for autophrase and there are
QString comp = queryText->currentText(); // no quotes in the query, add a phrase search
// If this is an or and we're set for autophrase and there are if (prefs.ssearchAutoPhrase &&
// no quotes in the query, add a phrase search u8.find_first_of("\"") == string::npos) {
if (prefs.ssearchAutoPhrase && comp.find('"', 0) == -1) { u8 += string(" \"") + u8 + "\"";
comp += QString::fromAscii(" \"") + comp +
QString::fromAscii("\"");
u8 = comp.utf8();
}
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_OR,
(const char *)u8));
} }
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_OR, u8));
break; break;
case 1: case 1:
sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_AND, sdata->addClause(new Rcl::SearchDataClauseSimple(Rcl::SCLT_AND, u8));
(const char *)u8));
break; break;
case 2: case 2:
sdata->addClause(new Rcl::SearchDataClauseFilename((const char *)u8)); sdata->addClause(new Rcl::SearchDataClauseFilename(u8));
break; break;
} }

View File

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

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -182,7 +182,8 @@ void StringToXapianQ::maybeStemExp(bool nostemexp,
const string& term, const string& term,
list<string>& exp) 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()) { if (term.empty()) {
exp.clear(); exp.clear();
return; return;
@ -191,7 +192,10 @@ void StringToXapianQ::maybeStemExp(bool nostemexp,
string term1; string term1;
dumb_string(term, 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 // Check if the first letter is a majuscule in which
// case we do not want to do stem expansion. Note that // case we do not want to do stem expansion. Note that
// the test is convoluted and possibly problematic // the test is convoluted and possibly problematic
@ -267,6 +271,7 @@ bool StringToXapianQ::translate(const string &iq,
int slack, bool useNear) int slack, bool useNear)
{ {
string qstring = iq; string qstring = iq;
LOGDEB2(("StringToXapianQ:: query string: [%s]\n", iq.c_str()));
ermsg.erase(); ermsg.erase();
m_terms.clear(); m_terms.clear();
m_groups.clear(); m_groups.clear();

View File

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

View File

@ -57,13 +57,14 @@ for d in \
${datadir}/recoll/examples \ ${datadir}/recoll/examples \
${datadir}/recoll/filters \ ${datadir}/recoll/filters \
${datadir}/recoll/images \ ${datadir}/recoll/images \
${datadir}/recoll/translations ${datadir}/recoll/translations \
${datadir}/icons/hicolor/48x48/apps
do do
test -d $d || mkdir -p $d || exit 1 test -d $d || mkdir -p $d || exit 1
done done
${INSTALL} -m 0444 recoll.desktop ${datadir}/applications ${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 \ ${INSTALL} -m 0444 doc/user/usermanual.html doc/user/docbook.css \
${datadir}/recoll/doc ${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 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 # Clean up possible old filters in examples
rm -f ${datadir}/recoll/examples/rcl* rm -f ${datadir}/recoll/examples/rcl*
${INSTALL} -m 0444 sampleconf/recoll.conf sampleconf/mimeconf \ ${INSTALL} -m 0444 sampleconf/recoll.conf sampleconf/mimeconf \
sampleconf/mimemap ${datadir}/recoll/examples/ || exit 1 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 ${QTGUI}/mtpics/*.png ${datadir}/recoll/images || exit 1
${INSTALL} -m 0444 ${I18N}/recoll*.qm ${datadir}/recoll/translations || 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 default configuration file. This should be copied to
# ~/.recoll/recoll.conf # ~/.recoll/recoll.conf
@ -9,7 +9,7 @@ topdirs = ~
# Wildcard expressions for names of files and directories that we should # Wildcard expressions for names of files and directories that we should
# ignore. If you need index mozilla/thunderbird mail folders, don't put # ignore. If you need index mozilla/thunderbird mail folders, don't put
# ".*" in there (as was the case with an older sample config) # ".*" 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. # Debug messages. 3 is errors/warnings only. 4 would be quite verbose.
loglevel = 3 loglevel = 3

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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,9 @@ int ExecCmd::doexec(const string &cmd, const list<string>& args,
} }
if (e.pid) { if (e.pid) {
// Ignore SIGPIPE in here.
void (*osig)(int);
osig = signal(SIGPIPE, SIG_IGN);
// Father process // Father process
if (input) { if (input) {
close(e.pipein[0]); close(e.pipein[0]);
@ -219,6 +222,7 @@ int ExecCmd::doexec(const string &cmd, const list<string>& args,
out: out:
int status = -1; int status = -1;
signal(SIGPIPE, osig);
if (!m_cancelRequest) { if (!m_cancelRequest) {
(void)waitpid(e.pid, &status, 0); (void)waitpid(e.pid, &status, 0);
e.pid = -1; e.pid = -1;

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -723,8 +723,27 @@ time_t rfc2822DateToUxTime(const string& dt)
DATEDEB((stderr, "Tz: [%s] -> %d\n", it->c_str(), zonesecs)); DATEDEB((stderr, "Tz: [%s] -> %d\n", it->c_str(), zonesecs));
nozone: nozone:
// Compute the UTC Unix time value
#ifndef sun
time_t tim = timegm(&tm); 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; tim += zonesecs;
DATEDEB((stderr, "Date: %s uxtime %ld \n", ctime(&tim), tim)); DATEDEB((stderr, "Date: %s uxtime %ld \n", ctime(&tim), tim));
return tim; return tim;
} }

View File

@ -1,5 +1,5 @@
#ifndef lint #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 #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
@ -313,7 +313,7 @@ bool stringToBool(const string &s)
int val = atoi(s.c_str()); int val = atoi(s.c_str());
return val ? true : false; return val ? true : false;
} }
if (strchr("yYoOtT", s[0])) if (s.find_first_of("yYtT") == 0)
return true; return true;
return false; 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 later versions. Bugs listed in the topmost section may also exist in older
versions. versions.
Latest: Latest (1.6.2):
- 1.6 NEAR crashes: 1.6 has added NEAR searches. Unlike what recoll did - 1.6 NEAR crashes: 1.6 has added NEAR searches. Unlike what recoll did
with PHRASES, stemming expansion is performed on terms inside NEAR with PHRASES, stemming expansion is performed on terms inside NEAR
clauses (except if prevented by a capitalized entry of course). There is 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 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 multiple OR subclauses, as would result from a multiple expansion. This
manifests itself by a 'not implemented' Xapian exception and a recoll manifests itself by a 'not implemented' Xapian exception. Workarounds:
crash. Workarounds:
- Prevent expansion of NEAR terms (possibly except one) by - Prevent expansion of NEAR terms (possibly except one) by
capitalizing them. capitalizing them.
@ -48,6 +47,13 @@ Latest:
probably a Kwin bug, possibly related to probably a Kwin bug, possibly related to
http://bugs.kde.org/show_bug.cgi?id=79183 or a correction thereof. 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 1.5.10
- If a defaultcharset was set in the configuration file for a subdirectory, - If a defaultcharset was set in the configuration file for a subdirectory,
it would stay in effect for all subsequent files/directories (except if 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, will still work, but, you may want to remove them if they are unmodified,
or keep only the modified parameters. or keep only the modified parameters.
1.6.2
1.6.0 - Minor solaris compilation glitches only.
1.6.1
- Term explorer: a multimode wildcard-regexp-spell/phonetic tool to search - Term explorer: a multimode wildcard-regexp-spell/phonetic tool to search
the index for terms. This uses aspell for the orthographic/phonetic part. 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 - A more dynamic advanced search window. You now have a choice of the top

View File

@ -54,24 +54,22 @@
decide what you may want to install.</p> decide what you may want to install.</p>
<h3>Source</h3> <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: <p><b>Current version:</b>
<a href="recoll-1.5.11.tar.gz">recoll-1.5.11.tar.gz</a>. 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 See the <a href="BUGS.txt">known bugs and issues</a> and <a
href="CHANGES.txt">changes</a>.</p> 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: <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.5.6.tar.gz">1.5.6</a>.
<a href="recoll-1.4.3.tar.gz">1.4.3</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>. <a href="recoll-1.3.3.tar.gz">1.3.3</a>.
@ -83,36 +81,42 @@
<h3>RPMS</h3> <h3>RPMS</h3>
<p>The executables inside the binary rpms have a static link to <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, 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> <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: 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) <p><b>Mandriva 2006</b> (also works on 2005 and 2007)
RPM: <a RPM:
href="recoll-1.5.11-0.1.20060mdk.i586.rpm">recoll-1.5.11-0.1.20060mdk.i586.rpm</a>. <a href="recoll-1.6.1-0.1.20060mdk.i586.rpm">
Source: <a recoll-1.6.1-0.1.20060mdk.i586.rpm</a>.
href="recoll-1.5.11-0.1.20060mdk.src.rpm">recoll-1.5.11-0.1.20060mdk.src.rpm</a></p> 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 <p><b>Suse 10.1</b>
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.
RPM: <a RPM:
href="recoll-1.5.11-0.i586.rpm">recoll-1.5.11-0.i586.rpm</a>. <a href="recoll-1.6.1-0.i586.rpm">
Source: <a recoll-1.6.1-0.i586.rpm</a>.
href="recoll-1.5.11-0.src.rpm">recoll-1.5.11-0.src.rpm</a></p> Source:
<a href="recoll-1.6.1-0.src.rpm">
recoll-1.6.1-0.src.rpm</a></p>
</p> </p>
<h3>Binary bundles</h3> <h3>Binary bundles</h3>
<p>These are just prebuilt trees (without the source files). <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 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 3.3. For Solaris, you should be able to find a qt package <a
href="http://www.sunfreeware.com/">here</a>.</p> href="http://www.sunfreeware.com/">here</a>.</p>
@ -120,24 +124,30 @@
<p>The installation instructions are <a <p>The installation instructions are <a
href="usermanual/rcl.install.binary.html"> there</a>.</p> href="usermanual/rcl.install.binary.html"> there</a>.</p>
<p><span class="application">FreeBSD</span> 5.5 i386: <a <p><span class="application">FreeBSD</span> 5.5 i386:
href="recoll-1.5.11-FreeBSD-5.5-RELEASE.tgz"> <a href="recoll-1.6.1-FreeBSD-5.5-RELEASE.tgz">
recoll-1.5.11-FreeBSD-5.5-RELEASE.tgz</a></p> recoll-1.6.1-FreeBSD-5.5-RELEASE.tgz</a>
</p>
<p><span class="application">Solaris 8</span> sparc. <p><span class="application">Solaris 8</span> sparc.
<a href="recoll-1.5.4-SunOS-5.8.tgz"> Note to Solaris users: you need to perform the initial
recoll-1.5.4-SunOS-5.8.tgz</a>.</p> 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> <h3>FreeBSD ports</h3>
<p>There are ports for both xapian-core <p>There are ports for both xapian-core
and recoll in the standard tree, you may just need to update and recoll in the standard tree, you may just need to update
your ports (cvsup), or you can get the ports from the FreeBSD your ports (cvsup), or you can get the ports from the FreeBSD
site: <a site. The ports are not yet updated for recoll 1.6 or the
href="http://cvsweb.freebsd.org/ports/databases/xapian-core">xapian xapian NEAR problem though.
port</a> <a <a href="http://cvsweb.freebsd.org/ports/databases/xapian-core">
href="http://cvsweb.freebsd.org/ports/deskutils/recoll">recoll xapian port</a>
port</a>.</p> <a href="http://cvsweb.freebsd.org/ports/deskutils/recoll">
recoll port</a>.</p>
</div> </div>
</body> </body>

View File

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

View File

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