- Remove hack with $$AbsOrRelPath substitution in the guiName.
Instead, let LyX display the filename automatically in the gui,
consistent with InsetInclude.
- Use the guiName in the drop-down menu in the dialog instead of the
internal lyxName. These guiNames ought to be more descriptive.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39675
a592a061-630c-0410-9148-
cb99ea01b6c8
PreambleDefEnd
Template GnumericSpreadsheet
PreambleDefEnd
Template GnumericSpreadsheet
+ GuiName "Gnumeric spreadsheet"
HelpText
A spreadsheet made with gnumeric, openoffice or excel.
It imports as a long table, so any length
HelpText
A spreadsheet made with gnumeric, openoffice or excel.
It imports as a long table, so any length
Template RasterImage
# By default, InsetExternal is displayed as a grey button
# containing this text.
Template RasterImage
# By default, InsetExternal is displayed as a grey button
# containing this text.
- GuiName "Bitmap: $$AbsOrRelPathParent$$Basename"
# This text is used in the External dialog.
# Provide enough information to explain to the user just
# what the template can provide him with.
# This text is used in the External dialog.
# Provide enough information to explain to the user just
# what the template can provide him with.
- GuiName "Xfig: $$AbsOrRelPathParent$$Basename"
HelpText
An Xfig figure.
HelpTextEnd
HelpText
An Xfig figure.
HelpTextEnd
- GuiName "Chess: $$AbsOrRelPathParent$$Basename"
+ GuiName "Chess diagram"
HelpText
A chess position diagram.
This template will use XBoard to edit the position.
HelpText
A chess position diagram.
This template will use XBoard to edit the position.
TemplateEnd
Template PDFPages
TemplateEnd
Template PDFPages
- GuiName "PDF pages: $$AbsOrRelPathParent$$Basename"
HelpText
Includes PDF documents, using the 'pdfpages' package.
To include multiple pages, use the 'pages'-option,
HelpText
Includes PDF documents, using the 'pdfpages' package.
To include multiple pages, use the 'pages'-option,
- GuiName "Dia: $$AbsOrRelPathParent$$Basename"
HelpText
Dia diagram.
HelpTextEnd
HelpText
Dia diagram.
HelpTextEnd
i1 = external::TemplateManager::get().getTemplates().begin();
i2 = external::TemplateManager::get().getTemplates().end();
for (; i1 != i2; ++i1)
i1 = external::TemplateManager::get().getTemplates().begin();
i2 = external::TemplateManager::get().getTemplates().end();
for (; i1 != i2; ++i1)
- externalCO->addItem(qt_(i1->second.lyxName));
+ externalCO->addItem(qt_(i1->second.guiName));
// Fill the origins combo
for (size_t i = 0; i != sizeof(origins) / sizeof(origins[0]); ++i)
// Fill the origins combo
for (size_t i = 0; i != sizeof(origins) / sizeof(origins[0]); ++i)
from_utf8(params.templatename()));
// FIXME UNICODE
docstring gui = _(ptr->guiName);
from_utf8(params.templatename()));
// FIXME UNICODE
docstring gui = _(ptr->guiName);
- return from_utf8(external::doSubstitution(params, buffer,
- to_utf8(gui), false));
+ gui += ": ";
+
+ if (params.filename.empty())
+ gui += "???";
+ else
+ gui += from_utf8(params.filename.relFileName(buffer.filePath()));
+
+ return gui;