Commit graph

2142 commits

Author SHA1 Message Date
Jordi Mas
b06ce64de2 Fixes to Catalan translation 2020-12-22 21:40:06 +01:00
Jordi Mas i Hernandez
1205e0f357 Update Catalan translation 2020-12-22 15:12:43 +00:00
Anders Jonsson
b8abc36714 Update Swedish translation 2020-12-16 22:02:05 +00:00
Daniel Mustieles
2c2b78e26f Updated Spanish translation 2020-12-15 10:28:00 +01:00
Florentina Mușat
f47bd36b32 Update Romanian translation 2020-12-12 17:36:51 +00:00
Yuri Chornoivan
f334580473 Update Ukrainian translation 2020-12-07 09:03:32 +00:00
Michael Catanzaro
a413c88e0d Reduce length of engine oops message
We don't have much space in the window title, especially on narrow mode.
2020-12-06 12:55:30 -06:00
Yuri Chornoivan
0c4f379015 Update Ukrainian translation 2020-12-06 18:33:57 +00:00
Michael Catanzaro
53f4aea057 Update NEWS 2020-12-06 12:13:22 -06:00
Michael Catanzaro
1b7143072e Set game_needs_saving = false after a normal Save
This currently only happens after Save As. Oops?
2020-12-06 11:46:53 -06:00
Michael Catanzaro
809df32ff1 Improve en passant description in history combo
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.
2020-12-06 11:33:44 -06:00
Michael Catanzaro
0fb74df114 Use a longer message to explain en passant captures
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.
2020-12-06 11:33:44 -06:00
Michael Catanzaro
e6fd940ff9 Stop using header bar subtitle for game status...
...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.
2020-12-06 11:33:44 -06:00
Yuri Chornoivan
a576403d68 Update Ukrainian translation 2020-12-06 16:56:03 +00:00
Michael Catanzaro
937006aff3 Disconnect engine timeout check when game ends
Oops, this is a regression from 5ca2ab04. We don't want to complain that
the engine has not moved if the game is over....
2020-12-06 10:25:53 -06:00
Michael Catanzaro
c0fabc35d9 Bring back separate Save and Save As
This will allow the user to decide whether or not to open the file
chooser. Surprisingly, the code for both of these still exists -- it was
already possible to choose between them using keyboard shortcuts -- so
all we need to do is edit the menu.
2020-12-06 10:08:31 -06:00
Michael Catanzaro
ba72876f72 Open Game menu item should have ellipses...
...because it opens the file chooser.
2020-12-06 10:07:03 -06:00
Michael Catanzaro
5ca2ab0440 Fix check for engine timeout in untimed games
We currently give the engine 10 seconds to move, and end the game with
an engine error if it takes longer than that, to avoid the game stalling
forever if the engine breaks. But we use the chess clock to run this
check, meaning it doesn't work in untimed games. And games are untimed
by default. Oops.

Fix it by not relying on the chess clock.

Fixes #54
2020-12-06 09:56:33 -06:00
Michael Catanzaro
d06b74cf38 Never open file chooser to /run
If we are sandboxed, then any files we save are going to be located
under /run inside the sandbox. But that's not where they are on the host
system, so we should try to avoid exposing this to the user. Sad reality
is that there is no way we can know where the file really exists on the
host, so let's just not preselect the file's location in this case.

Fixes #53
2020-12-06 09:16:38 -06:00
Yuri Chornoivan
4c4f3504f5 Update Ukrainian translation 2020-12-06 07:43:13 +00:00
Michael Catanzaro
e6f28affd7 Better handle case where window subtitle is the filename
This never looks good in narrow mode, so if we are in narrow mode, never
set the window subtitle.

But if we start in normal mode, then the user switches to narrow mode,
it looks weird for the subtitle to disappear and not come back. So let's
maintain it as the window subtitle. It should definitely not move to the
info bar, like other subtitles, since that looks weird.
2020-12-05 12:43:07 -06:00
Michael Catanzaro
23994bb997 Remove stray menu button changes that snuck into previous commit
I was testing a local hack. This wasn't supposed to be pushed.
2020-12-05 12:31:27 -06:00
Michael Catanzaro
39fb1c5651 Use info bar to display game status in narrow mode
The main header bar doesn't have enough space to show messages when the
screen is narrow. So when running in mobile mode, let's add an info bar.

This looks better than my first attempt, 0e8090dcd1.
2020-12-05 12:28:48 -06:00
Michael Catanzaro
19f5df8be7 Revert "Window should be a bit narrower before entering narrow mode"
This reverts commit 2345085d92.

I'm going to try using an info bar instead. It's less obnoxious, and is
useful to avoid ellipsizing the window title even at larger window
sizes.
2020-12-05 11:11:36 -06:00
Michael Catanzaro
4129f1950a Revert "Use inner headerbar in narrow mode"
This reverts commit 0e8090dcd1.

Emmanuele, Matthias, and Exalm all do not like it.
2020-12-05 10:07:20 -06:00
Michael Catanzaro
9411e198b8 Fix some new switch warnings 2020-12-05 10:04:20 -06:00
Yuri Chornoivan
19696a6739 Update Ukrainian translation 2020-12-05 08:12:59 +00:00
Michael Catanzaro
b8a76a2639 Fix "engine error" after user resigns before engine moves
If the user has resigned, the engine doesn't know the game is over,
because we don't tell it. So if the user resigns immediately after
moving, and the engine has not moved yet, we need to ignore it when it
does.

Fixes #49
2020-12-04 18:45:53 -06:00
Michael Catanzaro
39a6a2fe86 Fix "engine error" on new game after engine moves during pause
When we replay the engine's move later, we should make sure we are still
playing the same game AND that the state of the game is still the same.
Otherwise, discard the engine's move. The user has done something to
advance the state of the game beyond what the engine knows about, so
it's totally expected that the engine's move may no longer apply.

The state of the game ought to always be the same as it was before. Add
an assert just to be sure.

Halfway fixes #49
2020-12-04 18:35:15 -06:00
Michael Catanzaro
05d7bb3a11 Prefix all custom PGN tags with X-GNOME
We will still honor the original tag name when importing, so users who
saved games with older versions of GNOME Chess won't be affected.
2020-12-04 18:14:20 -06:00
Michael Catanzaro
d8d14506ae Add warning comment about the Seven Tag Roster 2020-12-04 18:04:23 -06:00
Michael Catanzaro
fb46a6765c Fix "engine error" on stalemate
When the game is stalemated, the chess engine will declare a draw. We
then check if it can claim a draw, and if not, declare that the game has
ended due to an engine bug. Since stalemate is not a valid reason to
claim a draw -- it is a forced draw, not a claimable draw -- this means
we incorrectly claim the engine is broken.

Stalemate requires special handling.
2020-12-04 17:46:40 -06:00
Michael Catanzaro
25cba4973a Promotion type selector dialog should fit mobile screens 2020-12-04 16:51:34 -06:00
Michael Catanzaro
8e01fb40ef Rework promotion type selector dialog to not use action area
Fixes #19
2020-12-04 16:51:13 -06:00
Michael Catanzaro
48a1ae651a Avoid deprecated use of librsvg 2020-12-04 15:49:02 -06:00
Michael Catanzaro
ef1fe371bb Add translator comments for en passant captures 2020-12-04 15:44:57 -06:00
Michael Catanzaro
73a3af2e3e Reduce length of en passant capture notice
There is not much space in the header bar, so let's keep the text as
short as possible.
2020-12-04 15:43:39 -06:00
Michael Catanzaro
ba7601886f Fix minimum meson version 2020-12-04 15:25:19 -06:00
Michael Catanzaro
f7a462b1eb Update doap
It's been 3.5 years since Sahil's last commit. Thanks for helping
maintain gnome-chess, Sahil!
2020-12-04 15:10:02 -06:00
Michael Catanzaro
2345085d92 Window should be a bit narrower before entering narrow mode
I tried 400 first, but then it's no longer possible to smoothly switch
between narrow and desktop mode. 500 is a bit too big to transition into
the clunky inner headerbar, so let's try 450.
2020-12-04 14:57:00 -06:00
Michael Catanzaro
0e8090dcd1 Use inner headerbar in narrow mode
The main headerbar doesn't have enough space to show messages when the
screen is narrow. So when running in mobile mode, let's add a secondary
headerbar.
2020-12-04 14:57:00 -06:00
Michael Catanzaro
b7c10f6f4f Remove extra GtkBox
We currently have a vertical GtkBox that contains the GtkInfoBar and
then another vertical GtkBox. Only one box is needed.
2020-12-04 14:57:00 -06:00
Michael Catanzaro
ed38dbe57b Hide timers in untimed games
There's no need to show the timers at all if the game is untimed.

Fixes #39
2020-12-04 14:57:00 -06:00
Michael Catanzaro
1ac2d80a3e Make all chess engines easier on easy/normal difficulty
This is not likely to have a very strong effect, but it's the best we
can do short of writing an entirely new chess engine. The HoiChess
engine seems to be notably easier than other engines, so currently that
seems like the best choice to distribute with GNOME Chess.

Fixes #18, at least sort of.
2020-12-04 14:57:00 -06:00
Michael Catanzaro
9d76722bfb Define log domain for gnome-chess
This allows displaying gnome-chess debug messages, but not other debug
messages, by setting the environment variable
G_MESSAGES_DEBUG=gnome-chess.
2020-12-04 14:57:00 -06:00
Michael Catanzaro
9bfd236a14 Update copyright year 2020-12-04 14:57:00 -06:00
Marek Černocký
e4097abd9c Updated Czech translation 2020-11-29 11:56:06 +01:00
Piotr Drąg
60057f70e0 help: Remove duplicate logos 2020-11-07 11:48:13 +01:00
Adrien Plazas
c073af3da4 data: List compatible form-factors
This will allow the app to be available in Phosh and PureOS Store.
2020-11-04 13:54:02 +01:00
Ask Hjorth Larsen
462d8eb05d Updated Danish translation 2020-11-01 13:51:58 +01:00