# HG changeset patch # User Neil Muller # Date 1259437028 0 # Node ID e813365af5678b13146f3be337f4f3009d0cf7dc # Parent 37f7454518d54e9200fdd957a29e7062e709414c Add quit button to toolbar diff -r 37f7454518d5 -r e813365af567 gamelib/toolbar.py --- a/gamelib/toolbar.py Sat Nov 28 19:33:41 2009 +0000 +++ b/gamelib/toolbar.py Sat Nov 28 19:37:08 2009 +0000 @@ -205,6 +205,9 @@ """Load game 'dialog'.""" savegame.RestoreDialog(self.gameboard.restore_game).open() + def quit_game(self): + self.gameboard._do_quit() + update_cash_counter = mkcountupdate('cash_counter') update_wood_counter = mkcountupdate('wood_counter') update_fox_counter = mkcountupdate('killed_foxes') @@ -302,6 +305,7 @@ self.add_heading("Game") self.add_tool("Save Game", self.save_game) self.add_tool("Load Game", self.load_game) + self.add_tool("Quit", self.quit_game) self.add_heading(" ") ## Dear pgu, is there a better way to get the current height?