From 37c976246d65ccb8ed013af03dac284b4a431cff Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 7 Nov 2010 21:37:10 +0100 Subject: [PATCH] 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. --- winboard/winboard.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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); -- 1.7.0.4