diff --git a/accessibility.c b/accessibility.c
index ef26fbc..c84aea4 100644
--- a/accessibility.c
+++ b/accessibility.c
@@ -901,7 +901,8 @@ SayMachineMove(int evenIfDuplicate)
} else {
/* starts not with digit */
if(StrCaseStr(lastMsg, "illegal")) PlayIcsUnfinishedSound();
- set_accessible_description(lastMsg, TRUE);
+ SayMoveDetailed(currentMove-1);
+ //set_accessible_description(lastMsg, TRUE);
}
}
diff --git a/args.h b/args.h
index bd5b4e7..1aad301 100644
--- a/args.h
+++ b/args.h
@@ -314,6 +314,8 @@ ArgDescriptor argDescriptors[] = {
{ "xcoords", ArgFalse, (void *) &appData.showCoords, FALSE, INVALID },
{ "-coords", ArgFalse, (void *) &appData.showCoords, FALSE, INVALID },
{ "showThinking", ArgBoolean, (void *) &appData.showThinking, TRUE, (ArgIniType) FALSE },
+ { "showAccessibilityStatusbar", ArgBoolean, (void *) &appData.showAccessibilityStatusbar, TRUE,
(ArgIniType) FALSE },
+ { "AnnounceMove", ArgBoolean, (void *) &appData.announceMove, TRUE, (ArgIniType) FALSE }, //text to
speech
{ "thinking", ArgTrue, (void *) &appData.showThinking, FALSE, INVALID },
{ "xthinking", ArgFalse, (void *) &appData.showThinking, FALSE, INVALID },
{ "-thinking", ArgFalse, (void *) &appData.showThinking, FALSE, INVALID },
diff --git a/common.h b/common.h
index ff2b34c..1084ffa 100644
--- a/common.h
+++ b/common.h
@@ -552,6 +552,8 @@ typedef struct {
Boolean oneClick;
Boolean quietPlay;
Boolean showThinking;
+ Boolean showAccessibilityStatusbar;
+ Boolean announceMove; //text to speech
Boolean ponderNextMove;
Boolean periodicUpdates;
Boolean autoObserve;
diff --git a/dialogs.c b/dialogs.c
index d2e36ba..bdfd5bf 100644
--- a/dialogs.c
+++ b/dialogs.c
@@ -3085,5 +3085,24 @@ void set_accessible_description(char *mess, int flag)
}
notify_accessible_description(&mainOptions[W_ACC_TITLE],buf);
+
+
+ char tts_buf[8000];
+ if(appData.announceMove)
+ {
+ system("pkill paplay");
+ //sprintf(tts_buf,"pico2wave -l en-GB -w info.wav '%s' && paplay info.wav &",val);
+ sprintf(tts_buf,"espeak '%s' --stdout | paplay &",buf);
+ system(tts_buf);
+ }
+
buf[0] = NULLCHAR;
}
+
+
+void
+ShowAccessibilityStatusbarEvent ()
+{
+ printf("\nAccessibilityStatusbar = %d", appData.showAccessibilityStatusbar);
+ show_hide_accessibility_status_bar(&mainOptions[W_ACC_TITLE],appData.showAccessibilityStatusbar);
+}
diff --git a/gtk/xoptions.c b/gtk/xoptions.c
index 51b9781..f563ff4 100644
--- a/gtk/xoptions.c
+++ b/gtk/xoptions.c
@@ -982,6 +982,17 @@ void notify_accessible_description(Option *opt, char *val)
//system(buf);
}
+void
+show_hide_accessibility_status_bar(Option *opt,int val)
+{
+ if (val){
+ gtk_widget_show(GTK_WIDGET(opt->handle));
+ }
+ else{
+ gtk_widget_hide(GTK_WIDGET(opt->handle));
+ }
+}
+
void GenericCallback(GtkWidget *widget, gpointer gdata)
{
const gchar *name;
diff --git a/menus.c b/menus.c
index 1439873..71df285 100644
--- a/menus.c
+++ b/menus.c
@@ -401,6 +401,22 @@ NothingProc ()
# define MARK_MENU_ITEM(X,Y) MarkMenuItem(X, Y)
#endif
+
+void
+ShowAccessibilityStatusbarProc ()
+{
+ appData.showAccessibilityStatusbar = !appData.showAccessibilityStatusbar;
+ ShowAccessibilityStatusbarEvent();
+ MARK_MENU_ITEM("Accessibility.ShowAccessibilityStatusbar", appData.showAccessibilityStatusbar);
+}
+
+void
+AnnounceMoveProc ()
+{
+ appData.announceMove = !appData.announceMove;
+ MARK_MENU_ITEM("Options.AnnounceMove", appData.announceMove);
+}
+
void
PonderNextMoveProc ()
{
@@ -752,12 +768,15 @@ MenuItem optionsMenu[] = {
{N_("Test Legality"), "<Ctrl><Shift>l", "TestLegality", TestLegalityProc},
{"----", NULL, NULL, NothingProc},
#endif
+ {N_("Announce Move"), NULL, "AnnounceMove", AnnounceMoveProc,
CHECK },
{N_("Save Settings Now"), NULL, "SaveSettingsNow", SaveSettingsProc},
{N_("Save Settings on Exit"), NULL, "SaveSettingsonExit", SaveOnExitProc, CHECK },
{NULL, NULL, NULL, NULL}
};
MenuItem accessibilityMenu[] = {
+ {N_("Show Status Bar"), NULL, "ShowAccessibilityStatusbar", ShowAccessibilityStatusbarProc,
CHECK},
+ {"----", NULL, NULL, NothingProc},
{N_("SayClockTime"), "<Alt>t", "SayClockTime", SayClockTime},
{"----", NULL, NULL, NothingProc},
{N_("SayWhosTurn"), "<Alt><Shift>m", "SayWhosTurn", SayWhosTurn},
@@ -1341,6 +1360,15 @@ InitMenuMarkers()
if (saveSettingsOnExit) {
MarkMenuItem("Options.SaveSettingsonExit", True);
}
+
+ if (appData.announceMove) {
+ MarkMenuItem("Options.AnnounceMove", True);
+ }
+
+ if (appData.showAccessibilityStatusbar) {
+ MarkMenuItem("Accessibility.ShowAccessibilityStatusbar", True);
+ }
+ ShowAccessibilityStatusbarEvent();
EnableNamedMenuItem("File.SaveSelected", False);
// all XBoard builds get here, but not WinBoard...