File glchess-human-orientation.patch of Package gnome-games.1599

From d73198b999f39ba166f6125bb9c02bdb7b5ed88d Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
Date: Mon, 08 Oct 2012 21:09:26 +0000
Subject: glchess: Fix board orientation set to human always showing the white side

https://bugzilla.gnome.org/show_bug.cgi?id=655299
---
diff --git a/glchess/src/chess-scene.vala b/glchess/src/chess-scene.vala
index 7507b02..6c7588d 100644
--- a/glchess/src/chess-scene.vala
+++ b/glchess/src/chess-scene.vala
@@ -65,6 +65,7 @@ public class ChessScene : Object
     private Timer animation_timer;
     private double animation_time;
 
+    public signal bool is_human (ChessPlayer player);
     public signal void changed ();
 
     public int selected_rank = -1;
@@ -154,7 +155,10 @@ public class ChessScene : Object
              case "black":
                  return 180.0;
              case "human":
-                 return 0.0; // FIXME
+                 if (is_human (game.black))
+                     return 180.0;
+                 else
+                     return 0.0;
              case "current":
                  return game.current_player.color == Color.WHITE ? 0.0 : 180.0;
              }
diff --git a/glchess/src/glchess.vala b/glchess/src/glchess.vala
index 64e4f44..e7fb109 100644
--- a/glchess/src/glchess.vala
+++ b/glchess/src/glchess.vala
@@ -118,6 +118,7 @@ public class Application : Gtk.Application
         vbox.pack_start (info_label, true, true, 0);
 
         scene = new ChessScene ();
+        scene.is_human.connect ((p) => { return p == human_player; } );
         scene.changed.connect (scene_changed_cb);
         settings.bind ("show-move-hints", scene, "show-move-hints", SettingsBindFlags.GET);
         settings.bind ("show-numbering", scene, "show-numbering", SettingsBindFlags.GET);
--
cgit v0.9.1
openSUSE Build Service is sponsored by