X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=5bd07a83ccc3edfd47e81cb1d5f33e20d7b1553e;hb=bbcce91fb6aced3fea5c5c1415d0edfecc33927c;hp=0ff63c60f593cf9c771f00effd8f98f06eb2997d;hpb=91d8e5853ca580769cc130aa6ea004869118d171;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 0ff63c6..5bd07a8 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -954,13 +954,22 @@ EngineOutputProc(w, event, prms, nprms) } // [HGM] kibitz: write kibitz line; split window for it if necessary -void OutputKibitz(char *text) +void OutputKibitz(int window, char *text) { if(!EngineOutputIsUp()) return; - if(!opponentKibitzes) DoClearMemo(1); - opponentKibitzes = TRUE; // thas causes split window DisplayMode in ICS modes. + if(!opponentKibitzes) { // on first kibitz of game, clear memos + DoClearMemo(1); + if(gameMode == IcsObserving) DoClearMemo(0); + } + opponentKibitzes = TRUE; // this causes split window DisplayMode in ICS modes. VerifyDisplayMode(); - DoSetWindowText(1, nLabel, gameMode == IcsPlayingWhite ? gameInfo.black : gameInfo.white); // opponent name - SetIcon( 1, nColorIcon, gameMode == IcsPlayingWhite ? nColorBlack : nColorWhite); - InsertIntoMemo(1, text); + if(gameMode == IcsObserving) { + DoSetWindowText(0, nLabel, gameInfo.white); + SetIcon( 0, nColorIcon, nColorWhite); + SetIcon( 0, nStateIcon, nClear); + } + DoSetWindowText(1, nLabel, gameMode == IcsPlayingBlack ? gameInfo.white : gameInfo.black); // opponent name + SetIcon( 1, nColorIcon, gameMode == IcsPlayingBlack ? nColorWhite : nColorBlack); + SetIcon( 1, nStateIcon, nClear); + InsertIntoMemo(window-1, text); }