Allow customization of label string for note insets. We actually had

strings in the layout file, but they were not used.

Question: Should we just remove InsetNote::setButtonLabel() now? The
only purpose it is serving is to provide a backup in case no label is
defined.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36884 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2010-12-14 23:16:19 +00:00
parent f659c8f420
commit d1e0a0e4ed
2 changed files with 8 additions and 4 deletions

View File

@ -77,7 +77,7 @@ InsetLayout Foot
End
InsetLayout Note:Comment
LabelString comment
LabelString Comment
LatexType environment
LatexName comment
BgColor commentbg
@ -92,7 +92,7 @@ End
InsetLayout Note:Note
LabelString note
LabelString Note
LatexType command
LatexName note
BgColor notebg
@ -107,7 +107,7 @@ End
InsetLayout Note:Greyedout
LabelString greyedout
LabelString Greyedout
LatexType environment
LatexName lyxgreyedout
BgColor greyedoutbg

View File

@ -156,7 +156,11 @@ void InsetNote::read(Lexer & lex)
void InsetNote::setButtonLabel()
{
docstring const label = notetranslator_loc().find(params_.type);
docstring label = getLayout().labelstring();
if (label.empty())
label = notetranslator_loc().find(params_.type);
else
label = translateIfPossible(label);
setLabel(label);
}