This reverts commit 574158dbb9.
It crashes the first time the property is set, and it is only set once.
I don't want to make this nullable, so let's try something different....
This also fixes a bug that I introduced with my GTK 4 porting: the
promotion type selector dialog would always display pieces in the color
of the first player to promote a piece, but it should always change
color to match the current player.
Note that I declared all the GtkChild widgets as unowned due to
vala#1121, which I discovered while working on this.
The chess engine support currently lives in src/, which otherwise
handles only GUI functions. This is a little misplaced, because engines
are not related to the GUI. So lib/ would be a better location for it.
Except all the engine support is actually higher-level than lib/. So we
can nicely fit it in between src/ and lib/ by creating a second internal
lib, libengine.
This is only a small benefit, but it's nice to keep src/ focused on the
GUI.
It takes too much space in narrow mode, and it no longer needs to be a
button because we have a window menu again. I think I originally made
this a button when removing the window menu, but nowadays the menu is
back.
I probably should have removed GtkDialog.run() use first, in a separate
commit, but I didn't and now it would be a lot of effort to split it
out. So here it is: one big GTK 4 megacommit.
Let's show the actual positions of the pieces.
Note I couldn't figure out how to use markup here. Enabling it in the
GtkCellRenderer didn't seem to work.
This reverts 73a3af2e. There's no longer any need to use a short
message, since we will now always put it in the info bar.
Let's also italicize the text, as is appropriate. Sadly this means
translators will have to work with markup, because they may need to
remove the markup, or reorder the string, so it requires violating the
normal guidance to avoid markup in translatable strings. That's probably
fine; we should avoid it wherever possible, but not when it's really
needed.
...and always use the info bar instead, even when the screen is not
narrow.
The header bar subtitle will now exclusively be used to indicate the
current filename.
This simplifies the code, and avoids many strange bugs. As long as the
title is short, we can use it even in narrow mode. But the status that
we previously put into the subtitle is just too large, so it will need
the info bar. Extra status is rare, so it's OK to use the info bar even
in normal mode: it doesn't look good to have it up constantly, but it's
only used when an engine is not installed, or the game has ended, or an
en passant capture is performed, so it should be OK.
This fixes the subtitle getting messed up after using Undo when a game
has finished, but it also avoids strange state differences between
narrow and normal mode, and the complexity of switching between the two.