[gnome-chess/chess-telepathy-networking-support-664946-rebase: 9/64] [Glchess Screen] Bind "opponent-type" setting to its UI controller
- From: Chandni Verma <vchandni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/chess-telepathy-networking-support-664946-rebase: 9/64] [Glchess Screen] Bind "opponent-type" setting to its UI controller
- Date: Sun, 23 Dec 2012 03:39:23 +0000 (UTC)
commit 72173bdfe2b7b3b41eec794f9f566a59a8ab14dc
Author: Chandni Verma <chandniverma2112 gmail com>
Date: Tue May 1 12:43:15 2012 +0530
[Glchess Screen] Bind "opponent-type" setting to its UI controller
src/gnome-chess.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index 170d19a..c85340f 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -1318,9 +1318,10 @@ public class Application : Gtk.Application
[CCode (cname = "G_MODULE_EXPORT opponent_changed_cb", instance_pos = -1)]
public void opponent_changed_cb (Gtk.Action action)
{
- /* TODO: opponent settings */
if (action == radioaction_opponent_robot)
{
+ settings.set_string ("opponent-type", "robot");
+
show_robot_opponent_widgets (true);
show_game_options ();
}
@@ -1328,9 +1329,15 @@ public class Application : Gtk.Application
{
show_robot_opponent_widgets (false);
if (action == radioaction_opponent_local_player)
+ {
+ settings.set_string ("opponent-type", "local-player");
show_game_options ();
+ }
else
+ {
+ settings.set_string ("opponent-type", "remote-player");
show_remote_player_selector ();
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]