MenuDefinition sqs;
MenuDefinition gqs;
MenuDefinition pqs;
- MenuDefinition fqs;
+ MenuDefinition cqs;
MenuDefinition aqs;
MenuDefinition qqs;
+ MenuDefinition bqs;
+ MenuDefinition wqs;
+ MenuDefinition fqs;
+ MenuDefinition iqs;
+ MenuDefinition rqs;
+ MenuDefinition xqs;
+ InsetQuotesParams::QuoteStyle globalqs =
+ bv->buffer().masterBuffer()->params().quotes_style;
+ FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xld"));
+ docstring desc = bformat(_("%1$stext (dynamic)"),
+ docstring(1, quoteparams.getQuoteChar(globalqs,
+ InsetQuotesParams::PrimaryQuotes,
+ InsetQuotesParams::OpeningQuote)));
+ if (prefixIs(qtype, "x"))
+ add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else
+ xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xls"));
+ desc = bformat(_("%1$stext (dynamic)"),
+ docstring(1, quoteparams.getQuoteChar(globalqs,
+ InsetQuotesParams::SecondaryQuotes,
+ InsetQuotesParams::OpeningQuote)));
+ if (prefixIs(qtype, "x"))
+ add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else
+ xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrd"));
+ desc = bformat(_("text%1$s (dynamic)"),
+ docstring(1, quoteparams.getQuoteChar(globalqs,
+ InsetQuotesParams::PrimaryQuotes,
+ InsetQuotesParams::ClosingQuote)));
+ if (prefixIs(qtype, "x"))
+ add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else
+ xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype xrs"));
+ desc = bformat(_("text%1$s (dynamic)"),
+ docstring(1, quoteparams.getQuoteChar(globalqs,
+ InsetQuotesParams::SecondaryQuotes,
+ InsetQuotesParams::ClosingQuote)));
+ if (prefixIs(qtype, "x"))
+ add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else
+ xqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+
for (; qq != end; ++qq) {
docstring const style = from_ascii(qq->first);
- FuncRequest const cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype ") + style);
- docstring const desc = contains(style, 'l') ?
+ cmd = FuncRequest(LFUN_INSET_MODIFY, from_ascii("changetype ") + style);
+ desc = contains(style, 'l') ?
bformat(_("%1$stext"), qq->second) : bformat(_("text%1$s"), qq->second);
if (prefixIs(style, qtype[0]))
add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
gqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
else if (prefixIs(style, 'p') && !prefixIs(qtype, "p"))
pqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
- else if (prefixIs(style, 'f') && !prefixIs(qtype, "f"))
- fqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'c') && !prefixIs(qtype, "c"))
+ cqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
else if (prefixIs(style, 'a') && !prefixIs(qtype, "a"))
aqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
else if (prefixIs(style, 'q') && !prefixIs(qtype, "q"))
qqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'b') && !prefixIs(qtype, "b"))
+ bqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'w') && !prefixIs(qtype, "w"))
+ wqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'f') && !prefixIs(qtype, "f"))
+ fqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'i') && !prefixIs(qtype, "i"))
+ iqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
+ else if (prefixIs(style, 'r') && !prefixIs(qtype, "r"))
+ rqs.add(MenuItem(MenuItem::Command, toqstr(desc), cmd));
}
+ if (!xqs.empty()) {
+ MenuItem item(MenuItem::Submenu, qt_("Dynamic Quotation Marks"));
+ item.setSubmenu(xqs);
+ add(item);
+ }
if (!eqs.empty()) {
MenuItem item(MenuItem::Submenu,
toqstr(quoteparams.getGuiLabel(InsetQuotesParams::EnglishQuotes)));
item.setSubmenu(pqs);
add(item);
}
- if (!fqs.empty()) {
+ if (!cqs.empty()) {
MenuItem item(MenuItem::Submenu,
- toqstr(quoteparams.getGuiLabel(InsetQuotesParams::FrenchQuotes)));
- item.setSubmenu(fqs);
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::SwissQuotes)));
+ item.setSubmenu(cqs);
add(item);
}
if (!aqs.empty()) {
item.setSubmenu(qqs);
add(item);
}
+ if (!bqs.empty()) {
+ MenuItem item(MenuItem::Submenu,
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::BritishQuotes)));
+ item.setSubmenu(bqs);
+ add(item);
+ }
+ if (!wqs.empty()) {
+ MenuItem item(MenuItem::Submenu,
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::SwedishGQuotes)));
+ item.setSubmenu(wqs);
+ add(item);
+ }
+ if (!fqs.empty()) {
+ MenuItem item(MenuItem::Submenu,
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::FrenchQuotes)));
+ item.setSubmenu(fqs);
+ add(item);
+ }
+ if (!iqs.empty()) {
+ MenuItem item(MenuItem::Submenu,
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::FrenchINQuotes)));
+ item.setSubmenu(iqs);
+ add(item);
+ }
+ if (!rqs.empty()) {
+ MenuItem item(MenuItem::Submenu,
+ toqstr(quoteparams.getGuiLabel(InsetQuotesParams::RussianQuotes)));
+ item.setSubmenu(rqs);
+ add(item);
+ }
}