Page 1 of 1

Feature Request: Mute tells

PostPosted: 26 Dec 2016, 00:24
by net
First I want to say thank you very much for a great GUI. I've been using winboard since 2001 and love it.

Is there a place where I should post a feature request instead of here?

What I would like to see is being able to go to Options->ICS-> select "mute" next to the "Tell Text".

The reason is that most of the personal tells on chess servers have been negative from my experience, such as saying f you etc... because they are upset from the game.

(There is currently a Options->ICS->Quiet Play, which silences shouts. That could be another place to put it)

It would be nice but not necessary to also be able to provide an auto response when tells are muted.

Second question:
I downloaded the source and compiled in Visual Studio. I tried running it and it said missing file. So I copied the files from my C:\WinBoard-4.8.0\winboard directory over to my visual studio winboard\Debug directory and then was able to debug/run. However, I noticed something odd. When I move the chessboard via drag n drop it auto resizes to be one board size smaller. Any ideas?

Re: Feature Request: Mute tells

PostPosted: 26 Dec 2016, 14:55
by H.G.Muller
This is a good place for feature requests.

Tell silencing should be easy to do,as in fact the code to do it is already mostly there, for the chat-boxes. These also suppress tells from selected origins) in the ICS Console. Only difference is that they then print it in the corresponding chat window.

Actually this could be an alternative solution: allow a user to open a chatbox with Chat Partner 'ALL', which would capture everything not captured by other chatboxes. And then just leave that in the background. The advantage is that you could then look in that chat box after the game tosee the collected messages.

As for the other question: I don't understand what happens there. WinBoard should be able to start without any external file. For the MinGW compile I do that all the time. Just double-click the winboard.exe where the compiler created it. It would not find a winboard.ini file, but then it will use the compiled-in defaults for all settings. (Meaning it will make the board window the maximum size that fits the display, with small engine-output, game-history and eval-graph windows on top of it.)

Does the error message give a clue as to which file is missing?

Re: Feature Request: Mute tells

PostPosted: 26 Dec 2016, 23:20
by net
Thanks for the quick reply. That alternate solution sounds good. I started looking at the code. I haven't developed professionally in C/C++ (I'm a Java guy) so its a bit more work for me to understand it. But I read through wchat.c. And saw a section of code in backend.c to see if the incoming message is a tell (which may not be the right spot but was nice to see). Temporarily I did a if (strstr(data, "tells you") != NULL) return; at the top of ConsoleOutput in winboard.c (which I totally know is not the right way to do it but blocked the tells temporarily). I wanted to read the code more and understand when I get back from vacation (just left today).

When I'm back from vacation I'll look at the error output and post back about the issue I'm having with running winboard.exe after I compile.

Do you guys have a github or another repo I can pull from and look at the commit history? If you end up doing the alternate solution I'd like to see how it was done to understand the code more. Or I can also take a stab at it, either way. If I do it I'll have a few questions to point me in the right direction. Is it mainly wchat.c that I should look in (I don't have the code in front of me right now). Also, if I want to do an auto reply, what file should I look at?

Thanks

Re: Feature Request: Mute tells

PostPosted: 27 Dec 2016, 09:20
by H.G.Muller
The official XBoard/WinBoard repository is at http://git.savannah.gnu.org/cgit/xboard.git . I have another git repository at http://hgm.nubati.net/cgi-bin/gitweb.cgi , which might contain patches that only end up in the Savannah repository later (or not at all).

The best place to patch here would be in backend.c. The handling of messages from the ICS is in the (huge and quite awful) routine read_from_ics(), where a matching routine looking_at() determines what the ICS wants done. The code starting at the line

Code: Select all
       if(started == STARTED_NONE && (looking_at(buf, &i, "* tells you:") || looking_at(buf, &i, "* says:") ||


takes care of the handling of tell / shouts and the like. In particular it tests if there exists a chatbox dedicated to the user or channel (for tells), or (lacking that) for the type of message (kibitz, shout, ...). It would just be a matter of adding such another test for a chatbox with chatParter equal to "all" when you are currently playing, and the incoming message is a tell.

Re: Feature Request: Mute tells

PostPosted: 28 Dec 2016, 01:59
by net
Thanks, that's a good explanation. Looks like this will be a nice easy one to get started on contributing to xboard/winboard.

Also, thanks for providing your git repositories.

I'll get started when I'm back from vacation in a couple of weeks.

What is the process that you guys follow for contributing? Should I pull from the the latest version of the official repo, and then email a git patch to be code reviewed? Or do I signup for an account on that repo, then submit a pull request?

Also, for versioning are you guys using semantic versioning or another method?

Thanks again!

Re: Feature Request: Mute tells

PostPosted: 07 Jan 2017, 03:04
by net
Okay, I'm back.

I downloaded xboard 4.9.1 source code and I opened the winboard/winboard.dsp

Image 1 below shows the first prompt I clicked okay on.

Image 2 is the setting I made so it would compile.

Image 3 is when running it and selecting freechess.org to connect to.

Image

Image

Image

When running in debug mode there is the following output in the console below. When running without debug mode there is no output in the console.

I'm using Visual Studio Professional 2013 Version 12.0.30723.00 Update 3

'winboard.exe' (Win32): Loaded 'C:\Users\black\Downloads\xboard-4.9.1.tar\xboard-4.9.1\winboard\Debug\winboard.exe'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wsock32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\lpk.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\usp10.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shlwapi.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\winmm.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120d.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\comdlg32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\shell32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\imm32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msctf.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\riched32.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\riched20.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\uxtheme.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\dwmapi.dll'. Symbols loaded.
'winboard.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ole32.dll'. Symbols loaded.
The program '[6692] winboard.exe' has exited with code 1 (0x1).

Re: Feature Request: Mute tells

PostPosted: 07 Jan 2017, 10:35
by H.G.Muller
Supporting Visual Studio is an official goal of the WinBoard project, and a makefile.ms and project file are suplied with the sources. But since none of the recently active developers does use Visual Studio, the support for it could have grown obsolete.

Note that I was also unable to connect to FICS yesterday, but connecting to ICC was no problem. WinBoard will produce the popup "Connection closed by ICS" whenever there is an error on the connection, which sometimes is a bit misleading, as the ICS doesn't even have to be involved. You will for instance also get this message when you use /icshelper=timeseal, and there is no timeseal.exe in the WinBoard folder.

Re: Feature Request: Mute tells

PostPosted: 08 Jan 2017, 05:54
by net
thanks, that was it. I added timeseal.exe to the Debug folder and it worked.

When I run it and move the chessboard it automatically shrinks one board size. And it continues to shrink one board size every time I move it. I posted a video here: http://sendvid.com/39ot5db0

Re: Feature Request: Mute tells

PostPosted: 08 Jan 2017, 11:15
by H.G.Muller
Hmm, it does not do that for me. I have heard others complain about it, however. Which Windows version do you use?

This behavior is controlled by the fuction ResizeBoard() in winboard.c, called from the window process WndProc() for the board window. When the latter receives the message WM_EXITSIZEMOVE as a result of dragging the window, it interrogates the system for the new size of the window. It then calls ResizeBoard(), passing it this new size. ResizeBoard() then calls InitDrawingSizes() to calculate the required size for each of the square sizes (which is a complicated function of the current variant, font sizes, whether logos are used, etc.) until it finds one that fits. It then uses that square size, and shrinks the window so that it exactly fits.

Normally, when you do nothing but dragging, the same square size should still fit in the window (i.e. the window size retrieved by GetClietRect() in the WM_EXITSIZEMOVE case should not have changed). The behavior you have suggests that either the system reports a smaller window size after the moving, or that InitDrawingSizes suddenly report a larger requirement for the same square size (e.g. because some of the parameters returned by GetSystemMetrics() have changed).

I guess the only way to find out what happens is to put some debug printfs in ResizeBoard(), such as

Code: Select all
if(appData.debugMode) fprintf(debugFP, "new size = %d x %d, %d -> %d x %d\n", newSizeX, newSizeY, newSize, sizeInfo[newSize].cliWidth, sizeInfo[newSize].cliHeight);