@@ -408,17 +408,14 @@ void ResList::resultPageNext()
// Determine icon to display if any
string img_name;
- if (prefs.showicons) {
- string iconpath;
- string iconname = rclconfig->getMimeIconName(doc.mimetype,
- &iconpath);
- LOGDEB1(("Img file; %s\n", iconpath.c_str()));
- QImage image(iconpath.c_str());
- if (!image.isNull()) {
- img_name = string("img_") + iconname;
- QMimeSourceFactory::defaultFactory()->
- setImage(img_name.c_str(), image);
- }
+ string iconpath;
+ string iconname = rclconfig->getMimeIconName(doc.mimetype, &iconpath);
+ LOGDEB1(("Img file; %s\n", iconpath.c_str()));
+ QImage image(iconpath.c_str());
+ if (!image.isNull()) {
+ img_name = string("img_") + iconname;
+ QMimeSourceFactory::defaultFactory()->
+ setImage(img_name.c_str(), image);
}
// Percentage of 'relevance'
@@ -501,14 +498,11 @@ void ResList::resultPageNext()
else
result += "";
- if (!img_name.empty()) {
- result += "
";
- }
-
// Configurable stuff
map subs;
subs['A'] = !richabst.empty() ? richabst + "
" : "";
subs['D'] = datebuf;
+ subs['I'] = img_name;
subs['K'] = !doc.meta["keywords"].empty() ?
escapeHtml(doc.meta["keywords"]) + "
" : "";
subs['L'] = linksbuf;
diff --git a/src/qtgui/uiprefs.ui b/src/qtgui/uiprefs.ui
index 13389b28..5bac842b 100644
--- a/src/qtgui/uiprefs.ui
+++ b/src/qtgui/uiprefs.ui
@@ -154,7 +154,7 @@
Result paragraph<br>format string
- Defines the format for each result list paragraph. Use qt html format and printf-like replacements:<br>%A Abstract<br> %D Date<br> %K Keywords (if any)<br> %L Preview and Edit links<br> %M Mime type<br> %N Result number<br> %R Relevance percentage<br> %S Size information<br> %T Title<br> %U Url<br>
+ Defines the format for each result list paragraph. Use qt html format and printf-like replacements:<br>%A Abstract<br> %D Date<br> %I Icon image name%lt;br> %K Keywords (if any)<br> %L Preview and Edit links<br> %M Mime type<br> %N Result number<br> %R Relevance percentage<br> %S Size information<br> %T Title<br> %U Url<br>
@@ -264,17 +264,6 @@
-
-
- useIconsCB
-
-
- Show document type icons in result list.
-
-
- true
-
-
autoSearchCB
diff --git a/src/qtgui/uiprefs_w.cpp b/src/qtgui/uiprefs_w.cpp
index de8d5dd9..e1b80af4 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.17 2007-05-24 07:48:19 dockes Exp $ (C) 2005 J.F.Dockes";
+static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.18 2007-07-12 08:23:40 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -96,8 +96,6 @@ void UIPrefsDialog::setFromPrefs()
{
// Entries per result page spinbox
pageLenSB->setValue(prefs.respagesize);
- // Show icons checkbox
- useIconsCB->setChecked(prefs.showicons);
autoSearchCB->setChecked(prefs.autoSearchOnWS);
syntlenSB->setValue(prefs.syntAbsLen);
syntctxSB->setValue(prefs.syntAbsCtx);
@@ -171,13 +169,16 @@ void UIPrefsDialog::setFromPrefs()
void UIPrefsDialog::accept()
{
- prefs.showicons = useIconsCB->isChecked();
prefs.autoSearchOnWS = autoSearchCB->isChecked();
prefs.respagesize = pageLenSB->value();
prefs.reslistfontfamily = reslistFontFamily;
prefs.reslistfontsize = reslistFontSize;
prefs.reslistformat = rlfTE->text();
+ if (prefs.reslistformat.stripWhiteSpace().isEmpty()) {
+ prefs.reslistformat = prefs.getDfltResListFormat();
+ rlfTE->setText(prefs.reslistformat);
+ }
prefs.htmlBrowser = helpBrowserLE->text();