i18n color patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Here's a patch to extend /sys/accessibility/speakup/i18n/colors to include the "bright" colors, so they can be replaced for better localization.

Thanks,

Trevor


diff -u speakup.orig/i18n.c speakup/i18n.c
--- speakup.orig/i18n.c	2013-08-17 12:55:57.025060236 -0400
+++ speakup/i18n.c	2021-06-10 20:58:34.219214947 -0400
@@ -88,6 +88,13 @@
 	[MSG_COLOR_YELLOW] = "yellow",
 	[MSG_COLOR_WHITE] = "white",
 	[MSG_COLOR_GREY] = "grey",
+	[MSG_COLOR_BRIGHTBLUE] "bright blue",
+	[MSG_COLOR_BRIGHTGREEN] "bright green",
+	[MSG_COLOR_BRIGHTCYAN] "bright cyan",
+	[MSG_COLOR_BRIGHTRED] "bright red",
+	[MSG_COLOR_BRIGHTMAGENTA] "bright magenta",
+	[MSG_COLOR_BRIGHTYELLOW] "bright yellow",
+	[MSG_COLOR_BRIGHTWHITE] "bright white",
 
 	/* Names of key states. */
 	[MSG_STATE_DOUBLE] = "double",
diff -u speakup.orig/i18n.h speakup/i18n.h
--- speakup.orig/i18n.h	2013-08-17 12:55:57.025060236 -0400
+++ speakup/i18n.h	2021-06-10 21:02:25.615803472 -0400
@@ -92,7 +92,14 @@
 	MSG_COLOR_YELLOW,
 	MSG_COLOR_WHITE,
 	MSG_COLOR_GREY,
-	MSG_COLORS_END = MSG_COLOR_GREY,
+	MSG_COLOR_BRIGHTBLUE,
+	MSG_COLOR_BRIGHTGREEN,
+	MSG_COLOR_BRIGHTCYAN,
+	MSG_COLOR_BRIGHTRED,
+	MSG_COLOR_BRIGHTMAGENTA,
+	MSG_COLOR_BRIGHTYELLOW,
+	MSG_COLOR_BRIGHTWHITE,
+	MSG_COLORS_END = MSG_COLOR_BRIGHTWHITE,
 
 	MSG_STATES_START,
 	MSG_STATE_DOUBLE = MSG_STATES_START,
diff -u speakup.orig/main.c speakup/main.c
--- speakup.orig/main.c	2013-08-17 12:55:57.025060236 -0400
+++ speakup/main.c	2021-06-10 21:04:50.023180822 -0400
@@ -394,10 +394,6 @@
 {
 	int fg = spk_attr & 0x0f;
 	int bg = spk_attr >> 4;
-	if (fg > 8) {
-		synth_printf("%s ", spk_msg_get(MSG_BRIGHT));
-		fg -= 8;
-	}
 	synth_printf("%s", spk_msg_get(MSG_COLORS_START + fg));
 	if (bg > 7) {
 		synth_printf(" %s ", spk_msg_get(MSG_ON_BLINKING));

[Index of Archives]     [Linux for the Blind]     [Fedora Discussioin]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]

  Powered by Linux