mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 21:40:19 +00:00
Fix the guiName of external insets.
- 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
This commit is contained in:
parent
b794fc078a
commit
a5f72061d1
@ -34,7 +34,7 @@ PreambleDef InputOrWarn
|
||||
PreambleDefEnd
|
||||
|
||||
Template GnumericSpreadsheet
|
||||
GuiName "Spreadsheet"
|
||||
GuiName "Gnumeric spreadsheet"
|
||||
HelpText
|
||||
A spreadsheet made with gnumeric, openoffice or excel.
|
||||
It imports as a long table, so any length
|
||||
@ -76,7 +76,7 @@ TemplateEnd
|
||||
Template RasterImage
|
||||
# By default, InsetExternal is displayed as a grey button
|
||||
# containing this text.
|
||||
GuiName "Bitmap: $$AbsOrRelPathParent$$Basename"
|
||||
GuiName "Raster image"
|
||||
# This text is used in the External dialog.
|
||||
# Provide enough information to explain to the user just
|
||||
# what the template can provide him with.
|
||||
@ -146,7 +146,7 @@ TemplateEnd
|
||||
|
||||
|
||||
Template XFig
|
||||
GuiName "Xfig: $$AbsOrRelPathParent$$Basename"
|
||||
GuiName "Xfig figure"
|
||||
HelpText
|
||||
An Xfig figure.
|
||||
HelpTextEnd
|
||||
@ -199,7 +199,7 @@ TemplateEnd
|
||||
|
||||
|
||||
Template ChessDiagram
|
||||
GuiName "Chess: $$AbsOrRelPathParent$$Basename"
|
||||
GuiName "Chess diagram"
|
||||
HelpText
|
||||
A chess position diagram.
|
||||
This template will use XBoard to edit the position.
|
||||
@ -298,7 +298,7 @@ Template LilyPond
|
||||
TemplateEnd
|
||||
|
||||
Template PDFPages
|
||||
GuiName "PDF pages: $$AbsOrRelPathParent$$Basename"
|
||||
GuiName "PDF pages"
|
||||
HelpText
|
||||
Includes PDF documents, using the 'pdfpages' package.
|
||||
To include multiple pages, use the 'pages'-option,
|
||||
@ -370,7 +370,7 @@ Template Date
|
||||
TemplateEnd
|
||||
|
||||
Template Dia
|
||||
GuiName "Dia: $$AbsOrRelPathParent$$Basename"
|
||||
GuiName "Dia diagram"
|
||||
HelpText
|
||||
Dia diagram.
|
||||
HelpTextEnd
|
||||
|
@ -199,7 +199,7 @@ GuiExternal::GuiExternal(GuiView & lv)
|
||||
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)
|
||||
|
@ -503,8 +503,14 @@ docstring screenLabel(InsetExternalParams const & params,
|
||||
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;
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
Loading…
Reference in New Issue
Block a user