docstring GuiInclude::validate_listings_params()
{
- // use a cache here to avoid repeated validation
- // of the same parameters
- static string param_cache = string();
- static docstring msg_cache = docstring();
-
if (typeCO->currentIndex() != 3 || bypassCB->isChecked())
return docstring();
-
string params = fromqstr(listingsED->toPlainText());
- if (params != param_cache) {
- param_cache = params;
- msg_cache = InsetListingsParams(params).validate();
- }
- return msg_cache;
+ return InsetListingsParams(params).validate();
}
void GuiInclude::setListingsMsg()
{
+ // FIXME THREAD
static bool isOK = true;
docstring msg = validate_listings_params();
if (msg.empty()) {
{
if (!isValid())
return;
- string const file = fromqstr(filenameED->text());
if (bc().policy().buttonStatus(ButtonPolicy::OKAY)) {
slotOK();
applyView();
break;
case VERBATIM:
case LISTINGS:
+ filters = fileFilters(QString());
break;
}
QString const docpath = toqstr(support::onlyPath(buffer().absFileName()));
- return browseRelFile(in_name, docpath, title, filters, false,
+ return browseRelToParent(in_name, docpath, title, filters, false,
qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
}