Top Banner
OLPC & Sugarlabs The NZ Volunteers
23

OLPC & Sugarlabs

Jan 15, 2016

Download

Documents

thimba

OLPC & Sugarlabs. The NZ Volunteers. Sugar is written in Python. Hacking Sugar. XO-1 /usr/share/sugar/shell/view/home/favoritesview.py XO-1.5 /usr/lib/python2.6/site-packages/jarabe/desktop/favoritesview.py - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OLPC & Sugarlabs

OLPC & Sugarlabs

The NZ Volunteers

Page 2: OLPC & Sugarlabs

Sugar is written in Python

Page 3: OLPC & Sugarlabs

Hacking SugarXO-1/usr/share/sugar/shell/view/home/favoritesview.py

XO-1.5/usr/lib/python2.6/site-packages/jarabe/desktop/favoritesview.py

_LAYOUT_MAP = {RING_LAYOUT: favoriteslayout.RingLayout,#BOX_LAYOUT: favoriteslayout.BoxLayout,#TRIANGLE_LAYOUT: favoriteslayout.TriangleLayout,#SUNFLOWER_LAYOUT: favoriteslayout.SunflowerLayout,RANDOM_LAYOUT: favoriteslayout.RandomLayout}

  

Page 4: OLPC & Sugarlabs

 class MyLayout(RingLayout):

    __gtype_name__ = 'MyLayout'

    icon_name = 'view-mylayout'

    profile_key = 'my-layout'

    def __init__(self):        RingLayout.__init__(self)

    def _calculate_radius_and_icon_size(self, children_count):        return None, style.STANDARD_ICON_SIZE

    def _calculate_position(self, radius, icon_size, index, children_count):        width, height = self.box.get_allocation()        # angle decreases as the radius increases        angle = index * (2 * math.pi / (12.0 + index / 6.0)) - math.pi / 2        # radius is proportional to index/children_count        myminimum = _MINIMUM_RADIUS * .67        newradius = ((_MAXIMUM_RADIUS - myminimum)*(index*1.1)/children_count)+myminimum        x = newradius * math.cos(angle) + (width - icon_size) / 2        y = newradius * math.sin(angle) + (height - icon_size - style.GRID_CELL_SIZE) / 2        return x, y

Spiral View - favoriteslayout.py

Page 5: OLPC & Sugarlabs

Sprial View (part 2) - favoritesview.py

RING_LAYOUT, BOX_LAYOUT, TRIANGLE_LAYOUT, SUNFLOWER_LAYOUT, MY_LAYOUT, RANDOM_LAYOUT = \xrange(6)

_LAYOUT_MAP = {RING_LAYOUT: favoriteslayout.RingLayout,BOX_LAYOUT: favoriteslayout.BoxLayout,TRIANGLE_LAYOUT: favoriteslayout.TriangleLayout,SUNFLOWER_LAYOUT: favoriteslayout.SunflowerLayout,MY_LAYOUT: favoriteslayout.MyLayout,RANDOM_LAYOUT: favoriteslayout.RandomLayout}

Page 6: OLPC & Sugarlabs

New Zealand Volunteer Group

Page 7: OLPC & Sugarlabs

 

Page 8: OLPC & Sugarlabs

 

Page 9: OLPC & Sugarlabs

 

Page 10: OLPC & Sugarlabs

 

Page 11: OLPC & Sugarlabs
Page 12: OLPC & Sugarlabs

 

Page 13: OLPC & Sugarlabs

In Bhutan: Learning by themselves

Page 14: OLPC & Sugarlabs

Where are all the XOs?

Page 15: OLPC & Sugarlabs

Picture courtesy of Myna IT Consulting

Page 16: OLPC & Sugarlabs
Page 17: OLPC & Sugarlabs

Hardware doesn't matter

Page 18: OLPC & Sugarlabs

 

Page 19: OLPC & Sugarlabs

 

Page 20: OLPC & Sugarlabs

 

Page 21: OLPC & Sugarlabs

 

Page 22: OLPC & Sugarlabs

How can you help?

• Join a volunteer group• Download Sugar and try it out - tell your friends• Tweet about OLPC and Sugar• Make a donation

Page 23: OLPC & Sugarlabs

More Information

• wiki.laptop.org - OLPC wiki • wiki.sugarlabs.org - Sugarlabs Wiki

 • www.laptop.org.nz - NZ OLPC Volunteers