From: H.G. Muller Date: Sun, 7 Nov 2010 20:37:10 +0000 (+0100) Subject: Allow clicked name internal to the icsMenu command string X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=37c976246d65ccb8ed013af03dac284b4a431cff;p=xboard.git Allow clicked name internal to the icsMenu command string A command in the /icsMenu that was specified to contain the selected text or clicked word always appended this word at the end. Now the user can also configure it to appear in the middle, by putting a %s in the command string where he wants it to appear. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 76c36e8..620cad5 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -6802,6 +6802,7 @@ CommandX(HWND hwnd, char *command, BOOLEAN getname, BOOLEAN immediate) SendMessage(hwnd, EM_GETSELTEXT, 0, (LPARAM) name); } if (immediate) { + if(strstr(command, "%s")) snprintf(buf, MSG_SIZ, command, name); else snprintf(buf, MSG_SIZ, "%s %s", command, name); SetWindowText(hInput, buf); SendMessage(hInput, WM_CHAR, '\r', 0);