diff --git a/src/doc/user/usermanual.sgml b/src/doc/user/usermanual.sgml index 4b657ef5..26197720 100644 --- a/src/doc/user/usermanual.sgml +++ b/src/doc/user/usermanual.sgml @@ -24,7 +24,7 @@ Dockes - $Id: usermanual.sgml,v 1.60 2008-01-17 11:13:47 dockes Exp $ + $Id: usermanual.sgml,v 1.61 2008-05-05 20:28:34 dockes Exp $ This document introduces full text search notions @@ -1337,6 +1337,15 @@ fvwm page + Highlight color for query + terms + Terms from the user query are highlighted in the result + list samples and the preview window. The color can be + chosen here. Any QT color string should work + (ie red, #ff0000). The + default is blue. + + Result list font: There is quite a lot of information shown in the result list, and you may want to customize the font and/or font size. The rest diff --git a/src/qtgui/guiutils.cpp b/src/qtgui/guiutils.cpp index 7b191034..cf5a7e48 100644 --- a/src/qtgui/guiutils.cpp +++ b/src/qtgui/guiutils.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.35 2007-09-08 17:25:49 dockes Exp $ (C) 2005 Jean-Francois Dockes"; +static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.36 2008-05-05 20:24:55 dockes Exp $ (C) 2005 Jean-Francois Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -186,6 +186,10 @@ void rwSettings(bool writing) "/Recoll/prefs/ssearchAutoPhrase", Bool, false); SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8); SETTING_RW(prefs.maxhltextmbs, "/Recoll/prefs/preview/maxhltextmbs", Num, 3); + SETTING_RW(prefs.qtermcolor, "/Recoll/prefs/qtermcolor", , "blue"); + if (!writing && prefs.qtermcolor == "") + prefs.qtermcolor = "blue"; + SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily", , ""); SETTING_RW(prefs.reslistfontsize, "/Recoll/prefs/reslist/fontSize", Num, diff --git a/src/qtgui/guiutils.h b/src/qtgui/guiutils.h index de68fb68..ed60c29e 100644 --- a/src/qtgui/guiutils.h +++ b/src/qtgui/guiutils.h @@ -17,7 +17,7 @@ #ifndef _GUIUTILS_H_INCLUDED_ #define _GUIUTILS_H_INCLUDED_ /* - * @(#$Id: guiutils.h,v 1.25 2007-09-08 17:25:49 dockes Exp $ (C) 2005 Jean-Francois Dockes + * @(#$Id: guiutils.h,v 1.26 2008-05-05 20:24:55 dockes Exp $ (C) 2005 Jean-Francois Dockes * jean-francois.dockes@wanadoo.fr * * This program is free software; you can redistribute it and/or modify @@ -65,6 +65,7 @@ class PrefsPack { int respagesize; int maxhltextmbs; QString reslistfontfamily; + QString qtermcolor; // Color for query terms in reslist and preview int reslistfontsize; // Result list format string QString reslistformat; diff --git a/src/qtgui/preview_w.cpp b/src/qtgui/preview_w.cpp index deb04fa8..b1fae167 100644 --- a/src/qtgui/preview_w.cpp +++ b/src/qtgui/preview_w.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.32 2008-04-18 11:38:56 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: preview_w.cpp,v 1.33 2008-05-05 20:24:55 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -880,7 +880,7 @@ bool Preview::loadFileInCurrentTab(string fn, size_t sz, const Rcl::Doc &idoc, if (highlightTerms) { QStyleSheetItem *item = new QStyleSheetItem(editor->styleSheet(), "termtag" ); - item->setColor("blue"); + item->setColor(prefs.qtermcolor); item->setFontWeight(QFont::Bold); } diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp index b4614637..28eb7eff 100644 --- a/src/qtgui/reslist.cpp +++ b/src/qtgui/reslist.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: reslist.cpp,v 1.37 2008-05-05 16:38:43 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: reslist.cpp,v 1.38 2008-05-05 20:24:55 dockes Exp $ (C) 2005 J.F.Dockes"; #endif #include @@ -347,7 +347,7 @@ void ResList::resultPageNext() // Query term colorization QStyleSheetItem *item = new QStyleSheetItem(styleSheet(), "termtag" ); - item->setColor("blue"); + item->setColor(prefs.qtermcolor); // Result paragraph format string sformat = string(prefs.reslistformat.utf8()); diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui index 9488eb04..d7873133 100644 --- a/src/qtgui/uiprefs.ui +++ b/src/qtgui/uiprefs.ui @@ -90,6 +90,35 @@ + + + qtermcolor + + + + unnamed + + + + textLabelqtc + + + Highlight color for query terms + + + + + qtermColorLE + + + + 50 + 0 + + + + + layout24 diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp index 85d4df2a..7d06250c 100644 --- a/src/qtgui/uiprefs_w.cpp +++ b/src/qtgui/uiprefs_w.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.23 2007-12-04 10:16:52 dockes Exp $ (C) 2005 J.F.Dockes"; +static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.24 2008-05-05 20:24:55 dockes Exp $ (C) 2005 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -106,6 +106,9 @@ void UIPrefsDialog::setFromPrefs() useDesktopOpenCB->setChecked(prefs.useDesktopOpen); keepSortCB->setChecked(prefs.keepSort); + // Query terms color + qtermColorLE->setText(prefs.qtermcolor); + // Result list font family and size reslistFontFamily = prefs.reslistfontfamily; reslistFontSize = prefs.reslistfontsize; @@ -171,6 +174,7 @@ void UIPrefsDialog::accept() prefs.respagesize = pageLenSB->value(); prefs.maxhltextmbs = maxHLTSB->value(); + prefs.qtermcolor = qtermColorLE->text(); prefs.reslistfontfamily = reslistFontFamily; prefs.reslistfontsize = reslistFontSize; prefs.reslistformat = rlfTE->text();