Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/gametoolbar.py
diff options
context:
space:
mode:
author0x1c0de4f00d <julian.goldstein0@gmail.com>2013-07-17 23:58:53 (GMT)
committer 0x1c0de4f00d <julian.goldstein0@gmail.com>2013-07-17 23:58:53 (GMT)
commit2fc6a11ba94fc33913e224f21dd775edcebebd64 (patch)
treeca20de87497c34f0da70ae377fd86042fb20e7c1 /gametoolbar.py
parent57981b5df002c754822b35433f818d4f95ba98f0 (diff)
Added Help Button Linking to PlayGo WikiHEADmaster
Diffstat (limited to 'gametoolbar.py')
-rw-r--r--gametoolbar.py19
1 files changed, 17 insertions, 2 deletions
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)