[iagno] Update title on back.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [iagno] Update title on back.
- Date: Thu, 5 Dec 2019 22:45:10 +0000 (UTC)
commit 8c30dc8ec0ad5ee564ec998d97138d959431499f
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Thu Dec 5 23:44:27 2019 +0100
Update title on back.
src/iagno.vala | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/iagno.vala b/src/iagno.vala
index 0d3c09c..756aca3 100644
--- a/src/iagno.vala
+++ b/src/iagno.vala
@@ -613,6 +613,7 @@ private class Iagno : Gtk.Application, BaseApplication
private void back_cb ()
requires (game_is_set)
{
+ set_window_title (game.reverse);
if (game.current_color != player_one && computer != null && !game.is_complete)
((!) computer).move (SLOW_MOVE_DELAY);
else if (game.is_complete)
@@ -667,11 +668,7 @@ private class Iagno : Gtk.Application, BaseApplication
opening = Opening.REVERSI;
bool reverse = settings.get_string ("type") == "reverse";
- /* Translators: name of one of the games, as displayed in the headerbar when playing */
- window.set_title (reverse ? _("Reverse Reversi")
-
- /* Translators: name of one of the games, as displayed in the headerbar when playing */
- : _("Classic Reversi"));
+ set_window_title (reverse);
game = new Game (reverse, opening, (uint8) size /* 4 <= size <= 16 */, print_logs);
game_is_set = true;
game.turn_ended.connect (turn_ended_cb);
@@ -878,6 +875,15 @@ private class Iagno : Gtk.Application, BaseApplication
window.set_history_button_label (game.current_color);
}
+ private void set_window_title (bool reverse)
+ {
+ /* Translators: name of one of the games, as displayed in the headerbar when playing */
+ window.set_title (reverse ? _("Reverse Reversi")
+
+ /* Translators: name of one of the games, as displayed in the headerbar when playing */
+ : _("Classic Reversi"));
+ }
+
/*\
* * Sound
\*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]