GUI: got rid of redundant creslistdateformat
This commit is contained in:
parent
df3809a32f
commit
26d3964c1f
@ -192,11 +192,10 @@ void rwSettings(bool writing)
|
||||
}
|
||||
}
|
||||
|
||||
SETTING_RW(prefs.reslistdateformat, "/Recoll/prefs/reslist/dateformat",
|
||||
String," %Y-%m-%d %H:%M:%S %z");
|
||||
SETTING_RW(u8s2qs(prefs.reslistdateformat), "/Recoll/prefs/reslist/dateformat",
|
||||
String, " %Y-%m-%d %H:%M:%S %z");
|
||||
if (!writing && prefs.reslistdateformat == "")
|
||||
prefs.reslistdateformat = " %Y-%m-%d %H:%M:%S %z";
|
||||
prefs.creslistdateformat = (const char*)prefs.reslistdateformat.toUtf8();
|
||||
|
||||
SETTING_RW(prefs.reslistfontfamily, "/Recoll/prefs/reslist/fontFamily",
|
||||
String, "");
|
||||
|
||||
@ -65,8 +65,7 @@ public:
|
||||
// is controled by darkMode
|
||||
QString darkreslistheadertext;
|
||||
// Date strftime format
|
||||
QString reslistdateformat;
|
||||
string creslistdateformat;
|
||||
string reslistdateformat;
|
||||
|
||||
// General Qt style sheet.
|
||||
QString qssFile;
|
||||
|
||||
@ -218,7 +218,7 @@ const string& QtGuiResListPager::parFormat()
|
||||
}
|
||||
const string& QtGuiResListPager::dateFormat()
|
||||
{
|
||||
return prefs.creslistdateformat;
|
||||
return prefs.reslistdateformat;
|
||||
}
|
||||
|
||||
string QtGuiResListPager::nextUrl()
|
||||
|
||||
@ -220,7 +220,7 @@ static string datetimegetter(const string&, const Rcl::Doc& doc)
|
||||
time_t mtime = doc.dmtime.empty() ?
|
||||
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
|
||||
struct tm *tm = localtime(&mtime);
|
||||
datebuf = utf8datestring(prefs.creslistdateformat.c_str(), tm);
|
||||
datebuf = utf8datestring(prefs.reslistdateformat.c_str(), tm);
|
||||
}
|
||||
return datebuf;
|
||||
}
|
||||
|
||||
@ -200,7 +200,7 @@ void UIPrefsDialog::setFromPrefs()
|
||||
}
|
||||
// Abstract snippet separator string
|
||||
abssepLE->setText(prefs.abssep);
|
||||
dateformatLE->setText(prefs.reslistdateformat);
|
||||
dateformatLE->setText(u8s2qs(prefs.reslistdateformat));
|
||||
|
||||
// Result list font family and size
|
||||
reslistFontFamily = prefs.reslistfontfamily;
|
||||
@ -394,8 +394,7 @@ void UIPrefsDialog::accept()
|
||||
|
||||
prefs.qtermstyle = qtermStyleCMB->currentText();
|
||||
prefs.abssep = abssepLE->text();
|
||||
prefs.reslistdateformat = dateformatLE->text();
|
||||
prefs.creslistdateformat = (const char*)prefs.reslistdateformat.toUtf8();
|
||||
prefs.reslistdateformat = qs2utf8s(dateformatLE->text());
|
||||
|
||||
prefs.reslistfontfamily = reslistFontFamily;
|
||||
prefs.reslistfontsize = reslistFontSize;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user