diff --git a/src/VERSION b/src/VERSION index 5b09c67c..9084fa2f 100644 --- a/src/VERSION +++ b/src/VERSION @@ -1 +1 @@ -1.0.14 +1.1.0 diff --git a/src/common/rclconfig.h b/src/common/rclconfig.h index aecdaace..b59ce064 100644 --- a/src/common/rclconfig.h +++ b/src/common/rclconfig.h @@ -1,6 +1,6 @@ #ifndef _RCLCONFIG_H_INCLUDED_ #define _RCLCONFIG_H_INCLUDED_ -/* @(#$Id: rclconfig.h,v 1.9 2005-11-25 09:13:07 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: rclconfig.h,v 1.10 2006-01-04 11:33:44 dockes Exp $ (C) 2004 J.F.Dockes */ #include @@ -62,7 +62,6 @@ class RclConfig { */ string getMimeIconName(const string &mtype); - const string &getDefCharset() {return defcharset;} const string &getDefLang() {return deflang;} bool getGuessCharset() {return guesscharset;} diff --git a/src/makesrcdist.sh b/src/makesrcdist.sh index b9413ef6..81e178ab 100644 --- a/src/makesrcdist.sh +++ b/src/makesrcdist.sh @@ -1,6 +1,8 @@ #!/bin/sh +# @(#$Id: makesrcdist.sh,v 1.7 2006-01-04 11:33:44 dockes Exp $ (C) 2005 J.F.Dockes +# A shell-script to make a recoll source distribution + #set -x -# A shell-script to make a recoll distribution: TAR=/usr/bin/tar @@ -26,27 +28,30 @@ else fi fi +################################### Documentation +###### Html doc +RECOLLDOC=${RECOLLDOC:=doc/user} +(cd $RECOLLDOC;make) || exit 1 + +###### Text Doc chmod +w README INSTALL cat < README -A more complete version of this document can be found at http://www.recoll.org +More documentation can be found in the doc/ directory or at http://www.recoll.org EOF cat < INSTALL -A more complete version of this document can be found at http://www.recoll.org +More documentation can be found in the doc/ directory or at http://www.recoll.org EOF echo "Dumping html documentation to text files" -RECOLLDOC=${RECOLLDOC:=$HOME/projets/lesbonscomptes/recoll} - -links -dump ${RECOLLDOC}/index.html >> README -links -dump ${RECOLLDOC}/credits.html >> README links -dump ${RECOLLDOC}/usermanual.html >> README -links -dump ${RECOLLDOC}/installation.html >> INSTALL +links -dump ${RECOLLDOC}/rcl.install.html >> INSTALL + cvs commit -m '' README INSTALL # Clean up this dir and copy the dist-specific files diff --git a/src/qtgui/main.cpp b/src/qtgui/main.cpp index ff25e5c4..000e915e 100644 --- a/src/qtgui/main.cpp +++ b/src/qtgui/main.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: main.cpp,v 1.27 2005-12-16 10:06:56 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: main.cpp,v 1.28 2006-01-04 11:33:44 dockes Exp $ (C) 2005 J.F.Dockes"; #endif #include @@ -26,6 +26,7 @@ using Rcl::AdvSearchData; #include "wipedir.h" #include "rclinit.h" #include "history.h" +#include "debuglog.h" #include "recollmain.h" @@ -39,6 +40,7 @@ string iconsdir; RclDHistory *history; static string dbdir; static RecollMain *mainWindow; +static string recollsharedir; ///////////////////////// // Global variables for user preferences. These are set in the user preference @@ -51,6 +53,7 @@ QString prefs_queryStemLang; int prefs_mainwidth; int prefs_mainheight; bool prefs_ssall; +QString prefs_htmlBrowser; #define SETTING_RW(var, nm, tp, def) \ if (writing) { \ @@ -134,7 +137,7 @@ int main( int argc, char ** argv ) a.installTranslator( &qt ); // Translations for Recoll - string recollsharedir = path_cat(recollprefix, "share"); + recollsharedir = path_cat(recollprefix, "share/recoll"); string translatdir = path_cat(recollsharedir, "translations"); QTranslator translator( 0 ); // QTextCodec::locale() returns $LANG @@ -220,3 +223,69 @@ int main( int argc, char ** argv ) w.show(); return a.exec(); } + +const static char *htmlbrowserlist = + "opera konqueror firefox mozilla netscape"; +// Search for and launch an html browser for the documentation. If the +// user has set a preference, we use it directly instead of guessing. +bool startHelpBrowser(const string &iurl) +{ + string url; + if (iurl.empty()) { + url = path_cat(recollsharedir, "doc"); + url = path_cat(url, "usermanual.html"); + url = string("file://") + url; + } else + url = iurl; + + + // If the user set a preference with an absolute path then things are + // simple + if (!prefs_htmlBrowser.isEmpty() && prefs_htmlBrowser.find('/') != -1) { + if (access(prefs_htmlBrowser.ascii(), X_OK) != 0) { + LOGERR(("startHelpBrowser: %s not found or not executable\n", + prefs_htmlBrowser.ascii())); + } + string cmd = string(prefs_htmlBrowser.ascii()) + " " + url + "&"; + if (system(cmd.c_str()) == 0) + return true; + else + return false; + } + + string searched; + if (prefs_htmlBrowser.isEmpty()) { + searched = htmlbrowserlist; + } else { + searched = prefs_htmlBrowser.ascii(); + } + list blist; + stringToTokens(searched, blist, " "); + + const char *path = getenv("PATH"); + if (path == 0) + path = "/bin:/usr/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/local/bin"; + + list pathl; + stringToTokens(path, pathl, ":"); + + // For each browser name, search path and exec/stop if found + for (list::const_iterator bit = blist.begin(); + bit != blist.end(); bit++) { + for (list::const_iterator pit = pathl.begin(); + pit != pathl.end(); pit++) { + string exefile = path_cat(*pit, *bit); + LOGDEB1(("startHelpBrowser: trying %s\n", exefile.c_str())); + if (access(exefile.c_str(), X_OK) == 0) { + string cmd = exefile + " " + url + "&"; + if (system(cmd.c_str()) == 0) { + return true; + } + } + } + } + + LOGERR(("startHelpBrowser: no html browser found. Looked for: %s\n", + searched.c_str())); + return false; +} diff --git a/src/qtgui/recoll.h b/src/qtgui/recoll.h index 171f8791..3064526e 100644 --- a/src/qtgui/recoll.h +++ b/src/qtgui/recoll.h @@ -1,6 +1,6 @@ #ifndef _RECOLL_H_INCLUDED_ #define _RECOLL_H_INCLUDED_ -/* @(#$Id: recoll.h,v 1.9 2005-12-15 14:39:57 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: recoll.h,v 1.10 2006-01-04 11:33:44 dockes Exp $ (C) 2004 J.F.Dockes */ #include #include @@ -13,6 +13,7 @@ // Misc declarations in need of sharing between the UI files extern void recollCleanup(); extern bool maybeOpenDb(std::string &reason); +extern bool startHelpBrowser(const string& url = ""); extern RclConfig *rclconfig; extern Rcl::Db *rcldb; diff --git a/src/qtgui/recoll_fr.ts b/src/qtgui/recoll_fr.ts index aeef31c0..639d07d8 100644 --- a/src/qtgui/recoll_fr.ts +++ b/src/qtgui/recoll_fr.ts @@ -19,7 +19,12 @@ . Starting indexation - . Démarrage de l'indexation + . Démarrage de l'indexation + + + . +Click Cancel if you want to edit the configuration file before indexation starts, or Ok to let it proceed. + Cliquer Annuler pour pouvoir editer le fichier de configuration avant que l'indexation ne demarre, ou Ok pour continuer. @@ -85,7 +90,7 @@ RecollMain recoll - recoll + recoll Search @@ -145,11 +150,11 @@ Ctrl+Q - Ctrl+Q + Ctrl+Q Doc History - Historique documents + Historique documents Indexing in progress @@ -165,7 +170,7 @@ <b>Displaying results starting at index %1 (maximum set size %2)</b></p> - <b>Affichage des résultats à partir de l'indice %1 (taille maximum estimée %2)</b></p> + <b>Affichage des résultats à partir de l'indice %1 (taille maximum estimée %2)</b></p> Cannot retrieve document info from database @@ -187,6 +192,214 @@ Can't create preview window Impossible de créer la fenetre de visualisation + + Recoll + + + + Erase search entry + Effacer l'entrée + + + Start query + Démarrer la recherche + + + &All terms + &Tous + + + Alt+A + Alt+T + + + Do documents have to contain all terms in query? + Est-ce que tous les termes doivent se trouver dans chaque document ? + + + If this is set, each returned document will contain all the terms in the query. Else documents will be ordered by relevance, but may not contain all the terms. + Détermine si les documents doivent chacun contenir tous les termes, ou si ils seront simplement triés par pertinence, avec possibilité d'absence de certains termes. + + + Enter search terms here + Entrer les termes à chercher + + + &Preferences + &Preferences + + + Search tools + Outils de recherche + + + Result list + Liste de résultats + + + Toolbar_2 + Toolbar_2 + + + Start &Indexing + Démarrer l'&Indexation + + + &About Recoll + &A propos de Recoll + + + Document &History + &Historique des documents + + + Document History + Historique des documents + + + Advanced Search + Recherche avancée + + + &Advanced Search + Recherche &Avancée + + + Advanced/complex Search + Recherche Avancée + + + &Sort parameters + Paramètres pour le &tri + + + Sort parameters + Paramètres pour le tri + + + Next page of results + Page suivante + + + Previous page of results + Page précédente + + + &Query configuration + Configuration pour la &recherche + + + <b>Displaying results starting at index %1 (maximum set size %2)</b></p> + + <b>Affichage des résultats à partir de l'index %1 (nombre maximum %2)</b></p> + + + + Sort criteria + Critères de tri + + + User interface preferences + Préférences pour l'interface utilisateur + + + User manual + Manuel + + + &User manual + &Manuel + + + + SortForm + + Sort Criteria + Critères de tri + + + Sort the + Trier les + + + most relevant results by: + résultats les plus pertinents en fonction de: + + + Descending + Décroissant + + + Reset + Réinitialiser + + + Close + Fermer + + + + UIPrefsDialog + + MyDialog + + + + User interface + Interface utilisateur + + + Number of entries in a result page + Nombre de résultats par page + + + Result list font + Fonte pour la liste de résultats + + + Helvetica-10 + Helvetica-10 + + + Opens a dialog to select the result list font + Ouvre une fenetre permettant de changer la fonte + + + Show document type icons in result list + Afficher les icones dans la liste de résultats + + + Reset + Réinitialiser + + + Resets the result list font to the system default + Réinitialiser la fonte à la valeur par défaut + + + Search parameters + Paramètres pour la recherche + + + Stemming language + Langue pour l'expansion des termes + + + &OK + &OK + + + Apply changes + Appliquer les modifications + + + &Cancel + &Annuler + + + Discard changes + Abandonner les modifications + advsearch @@ -224,11 +437,11 @@ --------> - --------> + --------> <--------- - <--------- + <--------- Ignored file types @@ -250,5 +463,21 @@ Dismiss Annuler + + All ----> + Tout ----> + + + Sel -----> + Sel -----> + + + <----- Sel + <----- Sel + + + <----- All + <----- Tout + diff --git a/src/qtgui/recollmain.ui b/src/qtgui/recollmain.ui index cd16d4a7..e1842d31 100644 --- a/src/qtgui/recollmain.ui +++ b/src/qtgui/recollmain.ui @@ -158,7 +158,6 @@ MenuBar - @@ -173,6 +172,7 @@ + @@ -242,6 +242,17 @@ &About Recoll + + + userManualAction + + + User manual + + + &User manual + + toolsDoc_HistoryAction @@ -382,6 +393,12 @@ RecollMain showAboutDialog() + + userManualAction + activated() + RecollMain + startManual() + toolsDoc_HistoryAction activated() @@ -474,6 +491,7 @@ showAdvSearchDialog() showSortDialog() showAboutDialog() + startManual() showDocHistory() searchTextChanged( const QString & text ) sortDataChanged( int cnt, RclSortSpec spec ) diff --git a/src/qtgui/recollmain.ui.h b/src/qtgui/recollmain.ui.h index fca59db8..5fe910ac 100644 --- a/src/qtgui/recollmain.ui.h +++ b/src/qtgui/recollmain.ui.h @@ -776,6 +776,11 @@ void RecollMain::showAboutDialog() QMessageBox::information(this, tr("About Recoll"), vstring.c_str()); } +void RecollMain::startManual() +{ + startHelpBrowser(); +} + void RecollMain::showDocHistory() { diff --git a/src/recollinstall.in b/src/recollinstall.in index afc1f404..8df25a5c 100755 --- a/src/recollinstall.in +++ b/src/recollinstall.in @@ -31,6 +31,7 @@ for d in ${PREFIX} \ ${PREFIX}/bin \ ${PREFIX}/share \ ${PREFIX}/share/recoll \ + ${PREFIX}/share/recoll/doc \ ${PREFIX}/share/recoll/examples \ ${PREFIX}/share/recoll/filters \ ${PREFIX}/share/recoll/images \ @@ -39,6 +40,8 @@ do test -d $d || mkdir $d || exit 1 done +${INSTALL} doc/usermanual.html doc/docbook.css ${PREFIX}/share/recoll/doc + ${INSTALL} qtgui/recoll index/recollindex $PREFIX/bin || exit 1 ${STRIP} $PREFIX/bin/recoll $PREFIX/bin/recollindex diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index 6b02c30e..9bf65c13 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: smallut.cpp,v 1.11 2005-12-13 12:43:00 dockes Exp $ (C) 2004 J.F.Dockes"; +static char rcsid[] = "@(#$Id: smallut.cpp,v 1.12 2006-01-04 11:33:44 dockes Exp $ (C) 2004 J.F.Dockes"; #endif #ifndef TEST_SMALLUT #include @@ -265,6 +265,25 @@ bool stringToStrings(const string &s, std::list &tokens) return true; } +void stringToTokens(const string& str, list& tokens, + const string& delims) +{ + string::size_type startPos, pos; + + for (pos = 0;;) { + // Skip initial delims, break if this eats all. + if ((startPos = str.find_first_not_of(delims, pos)) == string::npos) + break; + // Find next delimiter or end of string (end of token) + pos = str.find_first_of(delims, startPos); + // Add token to the vector. Note: token cant be empty here + if (pos == string::npos) + tokens.push_back(str.substr(startPos)); + else + tokens.push_back(str.substr(startPos, pos - startPos)); + } +} + bool stringToBool(const string &s) { if (s.empty()) diff --git a/src/utils/smallut.h b/src/utils/smallut.h index 8d036cda..f372ebe7 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -1,6 +1,6 @@ #ifndef _SMALLUT_H_INCLUDED_ #define _SMALLUT_H_INCLUDED_ -/* @(#$Id: smallut.h,v 1.10 2005-11-25 14:36:46 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: smallut.h,v 1.11 2006-01-04 11:33:44 dockes Exp $ (C) 2004 J.F.Dockes */ #include #include @@ -20,13 +20,20 @@ extern bool maketmpdir(string& tdir); extern string stringlistdisp(const list& strs); /** - * Parse input stream into list of strings. + * Parse input string into list of strings. * * Token delimiter is " \t" except inside dquotes. dquote inside * dquotes can be escaped with \ etc... */ extern bool stringToStrings(const string &s, std::list &tokens); +/** + * Split input string. No handling of quoting + */ +extern void stringToTokens(const string &s, std::list &tokens, + const string &delims = " \t"); + +/** Convert string to boolean */ extern bool stringToBool(const string &s); /** Remove instances of characters belonging to set (default {space,