X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwchat.c;h=d6dc5027940de709e531156f25462c0ba4726c69;hb=5cd55bddca592918f38deff675d05b650a71412e;hp=fbf3e15d1a803d1845817a92ccdf1846e7cb1c40;hpb=585dbd5f9edbf64775568e3f986e63969d15f912;p=xboard.git diff --git a/winboard/wchat.c b/winboard/wchat.c index fbf3e15..d6dc502 100644 --- a/winboard/wchat.c +++ b/winboard/wchat.c @@ -3,6 +3,8 @@ * * Author: H.G.Muller (August 2009) * + * Copyright 2009, 2010 Free Software Foundation, Inc. + * * ------------------------------------------------------------------------ * * GNU XBoard is free software: you can redistribute it and/or modify @@ -47,7 +49,6 @@ void ChatPopUp(); void ChatPopDown(); /* Imports from backend.c */ -char * SavePart(char *str); extern int opponentKibitzes; /* Imports from winboard.c */ @@ -137,6 +138,7 @@ LRESULT CALLBACK ChatProc( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam static SnapData sd; char buf[MSG_SIZ], mess[MSG_SIZ]; int partner = -1, i; + static BOOL filterHasFocus[MAX_CHAT]; for(i=0; i is pressed while editing the filter, it's better to apply + the filter rather than selecting the current game. + */ + if( LOWORD(wParam) == IDC_ChatPartner ) { + switch( HIWORD(wParam) ) { + case EN_SETFOCUS: + filterHasFocus[partner] = TRUE; + break; + case EN_KILLFOCUS: + filterHasFocus[partner] = FALSE; + break; + } + } + + if( filterHasFocus[partner] && (LOWORD(wParam) == IDC_Send) ) { + SetFocus(GetDlgItem(hDlg, OPT_ChatInput)); + wParam = IDC_Change; + } + /* [AS] End command replacement */ + switch (LOWORD(wParam)) { case IDCANCEL: