fix v1.8 default format string if we find it
This commit is contained in:
parent
eb252d93e9
commit
acc251054e
1159
src/ChangeLog
1159
src/ChangeLog
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.33 2007-07-12 08:23:40 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
static char rcsid[] = "@(#$Id: guiutils.cpp,v 1.34 2007-07-12 10:13:37 dockes Exp $ (C) 2005 Jean-Francois Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -192,8 +192,11 @@ void rwSettings(bool writing)
|
||||
QString rlfDflt =
|
||||
QString::fromAscii(prefs.getDfltResListFormat());
|
||||
SETTING_RW(prefs.reslistformat, "/Recoll/prefs/reslist/format", , rlfDflt);
|
||||
if (prefs.reslistformat.stripWhiteSpace().isEmpty())
|
||||
if (prefs.reslistformat ==
|
||||
QString::fromAscii(prefs.getV18DfltResListFormat()) ||
|
||||
prefs.reslistformat.stripWhiteSpace().isEmpty())
|
||||
prefs.reslistformat = rlfDflt;
|
||||
|
||||
SETTING_RW(prefs.queryStemLang, "/Recoll/prefs/query/stemLang", ,
|
||||
"english");
|
||||
SETTING_RW(prefs.useDesktopOpen,
|
||||
@ -217,6 +220,8 @@ void rwSettings(bool writing)
|
||||
Num, 0);
|
||||
SETTING_RW(prefs.termMatchType, "/Recoll/prefs/query/termMatchType",
|
||||
Num, 0);
|
||||
SETTING_RW(prefs.rclVersion, "/Recoll/prefs/rclVersion",
|
||||
Num, 1009);
|
||||
|
||||
// Ssearch combobox history list
|
||||
if (writing) {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#ifndef _GUIUTILS_H_INCLUDED_
|
||||
#define _GUIUTILS_H_INCLUDED_
|
||||
/*
|
||||
* @(#$Id: guiutils.h,v 1.22 2007-07-12 08:23:40 dockes Exp $ (C) 2005 Jean-Francois Dockes
|
||||
* @(#$Id: guiutils.h,v 1.23 2007-07-12 10:13:37 dockes Exp $ (C) 2005 Jean-Francois Dockes
|
||||
* jean-francois.dockes@wanadoo.fr
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -107,6 +107,9 @@ class PrefsPack {
|
||||
// Remembered term match mode
|
||||
int termMatchType;
|
||||
|
||||
// Program version that wrote this
|
||||
int rclVersion;
|
||||
|
||||
// Advanced search window clause list state
|
||||
vector<int> advSearchClauses;
|
||||
|
||||
@ -118,7 +121,8 @@ class PrefsPack {
|
||||
queryReplaceAbstract(false),
|
||||
startWithAdvSearchOpen(false),
|
||||
startWithSortToolOpen(false),
|
||||
termMatchType(0)
|
||||
termMatchType(0),
|
||||
rclVersion(1009)
|
||||
{
|
||||
}
|
||||
static const char *getDfltResListFormat() {
|
||||
@ -127,7 +131,11 @@ class PrefsPack {
|
||||
"%M %D <i>%U</i><br>"
|
||||
"%A %K";
|
||||
}
|
||||
|
||||
static const char *getV18DfltResListFormat() {
|
||||
return "%R %S %L <b>%T</b><br>"
|
||||
"%M %D <i>%U</i><br>"
|
||||
"%A %K";
|
||||
}
|
||||
};
|
||||
|
||||
/** Global preferences record */
|
||||
|
||||
@ -154,7 +154,7 @@
|
||||
<string>Result paragraph<br>format string</string>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>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></string>
|
||||
<string>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<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></string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QTextEdit">
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef lint
|
||||
static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.18 2007-07-12 08:23:40 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
static char rcsid[] = "@(#$Id: uiprefs_w.cpp,v 1.19 2007-07-12 10:13:37 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||
#endif
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -175,6 +175,13 @@ void UIPrefsDialog::accept()
|
||||
prefs.reslistfontfamily = reslistFontFamily;
|
||||
prefs.reslistfontsize = reslistFontSize;
|
||||
prefs.reslistformat = rlfTE->text();
|
||||
// Don't let us set the old default format from here, this would
|
||||
// get reset to the new default. Ugly hack
|
||||
if (prefs.reslistformat ==
|
||||
QString::fromAscii(prefs.getV18DfltResListFormat())) {
|
||||
prefs.reslistformat += " ";
|
||||
rlfTE->setText(prefs.reslistformat);
|
||||
}
|
||||
if (prefs.reslistformat.stripWhiteSpace().isEmpty()) {
|
||||
prefs.reslistformat = prefs.getDfltResListFormat();
|
||||
rlfTE->setText(prefs.reslistformat);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user