Use nicer symbols, allow multiple games at once

This commit is contained in:
2012-04-19 01:46:09 -04:00
parent 902f34395f
commit 0e48b1249d
9 changed files with 78 additions and 24 deletions

18
pygo.py
View File

@ -29,28 +29,22 @@ class Pygo():
self.tree.signal_autoconnect(self)
self.window = self.tree.get_widget('window')
self.contents = self.tree.get_widget('main_box')
self.games = self.tree.get_widget('games')
def init_widgets(self):
self.window.resize(1000,800)
self.gogame = None
self.window.resize(800,600)
# gobject.timeout_add(1000, self.update)
def on_game_close(self, widget):
if self.gogame:
self.contents.remove(self.gogame)
self.gogame = None
self.games.remove_page(self.games.get_current_page())
def on_local_new(self, widget):
# Remove any existing game
# fixme - we'll remove this later and add a new concurrent game instead
self.on_game_close(None)
self.gogame = gogame.GoGame(goban.Goban())
self.contents.pack_start(self.gogame)
self.gogame.show_all()
game = gogame.GoGame(goban.Goban())
self.games.append_page(game, gtk.Label('Local Game'))
game.show_all()
def on_net_direct(self, widget):