mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Use master buffer params for quote style
+ some formatting polishment
This commit is contained in:
parent
826c5c5383
commit
7533e7a0a1
@ -1688,30 +1688,39 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
|
|||||||
MenuDefinition iqs;
|
MenuDefinition iqs;
|
||||||
MenuDefinition rqs;
|
MenuDefinition rqs;
|
||||||
MenuDefinition xqs;
|
MenuDefinition xqs;
|
||||||
InsetQuotesParams::QuoteStyle globalqs = bv->buffer().params().quotes_style;
|
InsetQuotesParams::QuoteStyle globalqs =
|
||||||
|
bv->buffer().masterBuffer()->params().quotes_style;
|
||||||
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xld"));
|
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xld"));
|
||||||
docstring desc = bformat(_("%1$stext (dynamic)"), docstring(1, quoteparams.getQuoteChar(globalqs, InsetQuotesParams::PrimaryQuotes,
|
docstring desc = bformat(_("%1$stext (dynamic)"),
|
||||||
|
docstring(1, quoteparams.getQuoteChar(globalqs,
|
||||||
|
InsetQuotesParams::PrimaryQuotes,
|
||||||
InsetQuotesParams::OpeningQuote)));
|
InsetQuotesParams::OpeningQuote)));
|
||||||
if (prefixIs(qtype, "x"))
|
if (prefixIs(qtype, "x"))
|
||||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
else
|
else
|
||||||
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xls"));
|
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xls"));
|
||||||
desc = bformat(_("%1$stext (dynamic)"), docstring(1, quoteparams.getQuoteChar(globalqs, InsetQuotesParams::SecondaryQuotes,
|
desc = bformat(_("%1$stext (dynamic)"),
|
||||||
|
docstring(1, quoteparams.getQuoteChar(globalqs,
|
||||||
|
InsetQuotesParams::SecondaryQuotes,
|
||||||
InsetQuotesParams::OpeningQuote)));
|
InsetQuotesParams::OpeningQuote)));
|
||||||
if (prefixIs(qtype, "x"))
|
if (prefixIs(qtype, "x"))
|
||||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
else
|
else
|
||||||
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrd"));
|
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrd"));
|
||||||
desc = bformat(_("text%1$s (dynamic)"), docstring(1, quoteparams.getQuoteChar(globalqs, InsetQuotesParams::PrimaryQuotes,
|
desc = bformat(_("text%1$s (dynamic)"),
|
||||||
|
docstring(1, quoteparams.getQuoteChar(globalqs,
|
||||||
|
InsetQuotesParams::PrimaryQuotes,
|
||||||
InsetQuotesParams::ClosingQuote)));
|
InsetQuotesParams::ClosingQuote)));
|
||||||
if (prefixIs(qtype, "x"))
|
if (prefixIs(qtype, "x"))
|
||||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
else
|
else
|
||||||
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrs"));
|
cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrs"));
|
||||||
desc = bformat(_("text%1$s (dynamic)"), docstring(1, quoteparams.getQuoteChar(globalqs, InsetQuotesParams::SecondaryQuotes,
|
desc = bformat(_("text%1$s (dynamic)"),
|
||||||
|
docstring(1, quoteparams.getQuoteChar(globalqs,
|
||||||
|
InsetQuotesParams::SecondaryQuotes,
|
||||||
InsetQuotesParams::ClosingQuote)));
|
InsetQuotesParams::ClosingQuote)));
|
||||||
if (prefixIs(qtype, "x"))
|
if (prefixIs(qtype, "x"))
|
||||||
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
|
||||||
|
Loading…
Reference in New Issue
Block a user