From 9f0a3238a9d99eaad3b314266152af5562f74772 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 23 Nov 2021 12:39:57 +0200 Subject: Preferences: Option for ANSI background color (SGR) --- po/en.po | 5 +++++ res/lang/cs.bin | Bin 30757 -> 30788 bytes res/lang/de.bin | Bin 29758 -> 29789 bytes res/lang/en.bin | Bin 25872 -> 25903 bytes res/lang/eo.bin | Bin 24821 -> 24852 bytes res/lang/es.bin | Bin 29589 -> 29620 bytes res/lang/es_MX.bin | Bin 26928 -> 26959 bytes res/lang/fi.bin | Bin 29424 -> 29455 bytes res/lang/fr.bin | Bin 29809 -> 29840 bytes res/lang/gl.bin | Bin 28778 -> 28809 bytes res/lang/hu.bin | Bin 30601 -> 30632 bytes res/lang/ia.bin | Bin 27928 -> 27959 bytes res/lang/ie.bin | Bin 28516 -> 28547 bytes res/lang/isv.bin | Bin 24592 -> 24623 bytes res/lang/pl.bin | Bin 29204 -> 29235 bytes res/lang/ru.bin | Bin 43902 -> 43933 bytes res/lang/sk.bin | Bin 24925 -> 24956 bytes res/lang/sr.bin | Bin 43352 -> 43383 bytes res/lang/tok.bin | Bin 26638 -> 26669 bytes res/lang/tr.bin | Bin 28832 -> 28863 bytes res/lang/uk.bin | Bin 43233 -> 43264 bytes res/lang/zh_Hans.bin | Bin 24826 -> 24857 bytes res/lang/zh_Hant.bin | Bin 25021 -> 25052 bytes src/app.c | 6 ++++++ src/ui/util.c | 5 +++++ 25 files changed, 16 insertions(+) diff --git a/po/en.po b/po/en.po index 5066c847..da8eb0f6 100644 --- a/po/en.po +++ b/po/en.po @@ -1494,9 +1494,14 @@ msgstr "On Light" msgid "prefs.gemtext.ansi" msgstr "ANSI escapes:" +# Color of the text foreground, i.e., the characters. msgid "prefs.gemtext.ansi.fg" msgstr "FG Color" +# Color of text background. +msgid "prefs.gemtext.ansi.bg" +msgstr "BG Color" + msgid "prefs.gemtext.ansi.fontstyle" msgstr "Font Style" diff --git a/res/lang/cs.bin b/res/lang/cs.bin index 13a06323..074fd199 100644 Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ diff --git a/res/lang/de.bin b/res/lang/de.bin index 55b390ce..984dc0d3 100644 Binary files a/res/lang/de.bin and b/res/lang/de.bin differ diff --git a/res/lang/en.bin b/res/lang/en.bin index 1c7dfcba..05d4aed7 100644 Binary files a/res/lang/en.bin and b/res/lang/en.bin differ diff --git a/res/lang/eo.bin b/res/lang/eo.bin index 52235451..1ed829cf 100644 Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ diff --git a/res/lang/es.bin b/res/lang/es.bin index b793d5b9..4da756f9 100644 Binary files a/res/lang/es.bin and b/res/lang/es.bin differ diff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin index 06d38e55..67d8bf97 100644 Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ diff --git a/res/lang/fi.bin b/res/lang/fi.bin index 27ad7ba6..ec457bab 100644 Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ diff --git a/res/lang/fr.bin b/res/lang/fr.bin index 141df204..3cda1aeb 100644 Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ diff --git a/res/lang/gl.bin b/res/lang/gl.bin index b30684ab..97ee8cd8 100644 Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ diff --git a/res/lang/hu.bin b/res/lang/hu.bin index 9d100d45..54638c8e 100644 Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ diff --git a/res/lang/ia.bin b/res/lang/ia.bin index ef621e77..b2951276 100644 Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ diff --git a/res/lang/ie.bin b/res/lang/ie.bin index 64e6b7bf..e0c3c0e0 100644 Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ diff --git a/res/lang/isv.bin b/res/lang/isv.bin index b9e88984..c9d84e0a 100644 Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ diff --git a/res/lang/pl.bin b/res/lang/pl.bin index c58632ba..9632ed8a 100644 Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ diff --git a/res/lang/ru.bin b/res/lang/ru.bin index b0128aae..0dcf418a 100644 Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ diff --git a/res/lang/sk.bin b/res/lang/sk.bin index 714e0d4f..9d0d5988 100644 Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ diff --git a/res/lang/sr.bin b/res/lang/sr.bin index 7729cf9d..e10669ce 100644 Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ diff --git a/res/lang/tok.bin b/res/lang/tok.bin index ff7538b0..b3033b5a 100644 Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ diff --git a/res/lang/tr.bin b/res/lang/tr.bin index 88412aef..1d9d0159 100644 Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ diff --git a/res/lang/uk.bin b/res/lang/uk.bin index a17c7aaa..4e83b83b 100644 Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ diff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin index 66dbe965..118050e3 100644 Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ diff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin index 69d0afe2..3bfb29ba 100644 Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ diff --git a/src/app.c b/src/app.c index 374bab71..9a292ea5 100644 --- a/src/app.c +++ b/src/app.c @@ -2445,6 +2445,10 @@ iBool handleCommand_App(const char *cmd) { iChangeFlags(d->prefs.gemtextAnsiEscapes, allowFg_AnsiFlag, arg_Command(cmd)); return iTrue; } + else if (equal_Command(cmd, "prefs.gemtext.ansi.bg.changed")) { + iChangeFlags(d->prefs.gemtextAnsiEscapes, allowBg_AnsiFlag, arg_Command(cmd)); + return iTrue; + } else if (equal_Command(cmd, "prefs.gemtext.ansi.fontstyle.changed")) { iChangeFlags(d->prefs.gemtextAnsiEscapes, allowFontStyle_AnsiFlag, arg_Command(cmd)); return iTrue; @@ -2891,6 +2895,8 @@ iBool handleCommand_App(const char *cmd) { d->prefs.boldLinkLight); setToggle_Widget(findChild_Widget(dlg, "prefs.gemtext.ansi.fg"), d->prefs.gemtextAnsiEscapes & allowFg_AnsiFlag); + setToggle_Widget(findChild_Widget(dlg, "prefs.gemtext.ansi.bg"), + d->prefs.gemtextAnsiEscapes & allowBg_AnsiFlag); setToggle_Widget(findChild_Widget(dlg, "prefs.gemtext.ansi.fontstyle"), d->prefs.gemtextAnsiEscapes & allowFontStyle_AnsiFlag); setToggle_Widget(findChild_Widget(dlg, "prefs.font.smooth"), d->prefs.fontSmoothing); diff --git a/src/ui/util.c b/src/ui/util.c index bc9c2825..92bf7000 100644 --- a/src/ui/util.c +++ b/src/ui/util.c @@ -2656,6 +2656,11 @@ iWidget *makePreferences_Widget(void) { "${prefs.gemtext.ansi.fg}"); setFlags_Widget(tog, fixedWidth_WidgetFlag, iFalse); updateSize_LabelWidget((iLabelWidget *) tog); + setTextCStr_LabelWidget( + addChild_Widget(ansi, tog = iClob(makeToggle_Widget("prefs.gemtext.ansi.bg"))), + "${prefs.gemtext.ansi.bg}"); + setFlags_Widget(tog, fixedWidth_WidgetFlag, iFalse); + updateSize_LabelWidget((iLabelWidget *) tog); setTextCStr_LabelWidget( addChild_Widget(ansi, tog = iClob(makeToggle_Widget("prefs.gemtext.ansi.fontstyle"))), "${prefs.gemtext.ansi.fontstyle}"); -- cgit v1.2.3