[Bugs] #3380 UNSP: Maze in jhbuild should show the activity icon in the toolbar
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Wed Mar 21 12:09:53 EDT 2012
#3380: Maze in jhbuild should show the activity icon in the toolbar
------------------------------------------+---------------------------------
Reporter: manuq | Owner: RafaelOrtiz
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team
Component: Maze | Version: Unspecified
Severity: Unspecified | Keywords: easy-hacks
Distribution: Unspecified | Status_field: Unconfirmed
------------------------------------------+---------------------------------
Comment(by humitos):
I'm working on the sugar-emulator compiled with jhbuild (running master
git with my recent patches upgrading olpcgames); I don't see the Activity
Icon on the top-left, instead of this I see the title entry on the top-
left.
I'm trying to add the !ActivityToolbarButton with the subtoolbar like Moon
does, for example, with this code:
{{{
#!python
class MazeActivity(olpcgames.PyGameActivity):
game_name = 'game'
game_title = _('Maze')
game_size = None # let olpcgames pick a nice size for us
def build_toolbar(self):
"""Build our Activity toolbar for the Sugar system."""
toolbar = super(MazeActivity, self).build_toolbar()
# create the Maze Button in the top-left of the screen
activity_button = ActivityToolbarButton(self)
activity_name = toolbar.get_nth_item(0)
toolbar.remove(activity_name)
activity_button.show()
toolbar.insert(activity_button, 0)
return toolbar
}}}
I can show the Activity Button and remove the title entry, but I don't
find the way to show the title entry when I press on the Activity Button.
Actually, when I press on it I get this error:
{{{
Traceback (most recent call last):
File "/srv/sugar-jhbuild/install/lib/python2.7/site-
packages/sugar/graphics/toolbarbox.py", line 37, in <lambda>
lambda widget: self.set_expanded(not self.is_expanded()))
File "/srv/sugar-jhbuild/install/lib/python2.7/site-
packages/sugar/graphics/toolbarbox.py", line 97, in set_expanded
if box.expanded_button is not None:
AttributeError: 'NoneType' object has no attribute 'expanded_button'
}}}
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/3380#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list