Opened 9 years ago

Closed 9 years ago

#3380 closed defect (fixed)

Maze in jhbuild should show the activity icon in the toolbar

Reported by: manuq Owned by: RafaelOrtiz
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Maze Version: Unspecified
Severity: Unspecified Keywords: 12.1.0, easy-hacks, patch
Cc: humitos Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

There is a conditional in the method that builds the toolbar in activity.py of olpcgame. In the XO I can see the activity icon on the top left, and it displays the activity subtoolbar with the title entry. That is not the case while running Maze inside jhbuild, no activity icon is shown, and the title entry is in the main toolbar.

Attachments (1)

0001-Maze-icon-in-the-toolbar-SL-3380.patch (3.0 KB) - added by humitos 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 9 years ago 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:

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'

comment:2 Changed 9 years ago by godiard

  • Keywords 12.1.0 added

The activity icon is not displayed in Maze (os9) and there are not separators at top right and top left like in other activities to preserve the top corners.

Changed 9 years ago by humitos

comment:4 Changed 9 years ago by humitos

  • Keywords patch added

comment:5 Changed 9 years ago by humitos

This patch will fix #3474 as well.

comment:6 Changed 9 years ago by RafaelOrtiz

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.