Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO3
-rw-r--r--gametoolbar.py19
2 files changed, 18 insertions, 4 deletions
diff --git a/TODO b/TODO
index 2a97260..55a9017 100644
--- a/TODO
+++ b/TODO
@@ -2,6 +2,5 @@
- Support spectators
- Add a pretty panel to display who's turn it is, and who is spectating
- Add Atari Go mode.
- - Add a 'Help' button that will take you to the PlayGo wiki page.
- - Add different types of Ko and different rulesets.
+ - Add different types of Ko and different rulesets.
- Support removing dead stones at the end of the game
diff --git a/gametoolbar.py b/gametoolbar.py
index b21deca..ae35b75 100644
--- a/gametoolbar.py
+++ b/gametoolbar.py
@@ -19,7 +19,7 @@
import gtk
from os.path import join, dirname
-
+from os import system
from gettext import gettext as _
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.toolcombobox import ToolComboBox
@@ -87,6 +87,21 @@ class GameToolbar(gtk.Toolbar):
self.insert(self._ai_button, -1)
self._ai_button.show()
+ #Separator
+ separator = gtk.SeparatorToolItem()
+ separator.set_draw(True)
+ self.insert(separator, -1)
+
+ #Help Button
+ self.help_button = gtk.ToggleToolButton()
+ self.help_button.connect('toggled', self._help_toggled_cb)
+ self.help_button.set_label(_('Need Some Help?'))
+ self.insert(self.help_button, -1)
+ self.help_button.show()
+
+ def _help_toggled_cb(self, widget):
+ wiki_url = "http://wiki.laptop.org/go/PlayGo"
+ system("sensible-browser " + wiki_url)
def _add_widget(self, widget, expand=False):
tool_item = gtk.ToolItem()
tool_item.set_expand(expand)
@@ -121,7 +136,7 @@ class GameToolbar(gtk.Toolbar):
self.emit('ai-activated')
else:
self.emit('ai-deactivated')
-
+
def grey_out_ai(self):
self._ai_button.set_sensitive(False)