X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=dialogs.c;h=0a486020e39d8d69c86704cf75d1b2545c9dfbbd;hb=3b5c8a9ed7061c6aff8f897a74be47b853360163;hp=03c56eabbcbe56ae43c602cada9340327e163ef1;hpb=86932d68dc115d304fddb290947fd04323d62cbd;p=xboard.git diff --git a/dialogs.c b/dialogs.c index 03c56ea..0a48602 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1918,4 +1918,35 @@ BoardPopUp (int squareSize, int lineGap, void *clockFontThingy) return mainOptions; } +void +DisplayMessage (char *message, char *extMessage) +{ + /* display a message in the message widget */ + + char buf[MSG_SIZ]; + + if (extMessage) + { + if (*message) + { + snprintf(buf, sizeof(buf), "%s %s", message, extMessage); + message = buf; + } + else + { + message = extMessage; + }; + }; + + safeStrCpy(lastMsg, message, MSG_SIZ); // [HGM] make available + + /* need to test if messageWidget already exists, since this function + can also be called during the startup, if for example a Xresource + is not set up correctly */ + if(mainOptions[14].handle) + SetWidgetLabel(&mainOptions[14], message); + + return; +} +