X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xengineoutput.c;h=5bd07a83ccc3edfd47e81cb1d5f33e20d7b1553e;hb=bbcce91fb6aced3fea5c5c1415d0edfecc33927c;hp=6fe993188bec3c431cf2e38eb3a282fc34b7211f;hpb=ea750683ac62717dd7346de17b5ae072622ff92a;p=xboard.git diff --git a/xengineoutput.c b/xengineoutput.c index 6fe9931..5bd07a8 100644 --- a/xengineoutput.c +++ b/xengineoutput.c @@ -4,21 +4,23 @@ * Author: Alessandro Scotti (Dec 2005) * * ------------------------------------------------------------------------ - * This program is free software; you can redistribute it and/or modify + * + * GNU XBoard is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * the Free Software Foundation, either version 3 of the License, or (at + * your option) any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU XBoard is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * along with this program. If not, see http://www.gnu.org/licenses/. + * * ------------------------------------------------------------------------ - */ + ** See the file ChangeLog for a revision history. */ + #include "config.h" #include @@ -952,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); }