Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Runs both as a Sugar activity and as a stand alone app

  • Loading branch information...
commit f383f4ba4276a68b2f74fde0fc4817aa30367f64 1 parent f79c6a0
@cgueret authored
View
40 src/Backend.py
@@ -7,6 +7,7 @@
from rdflib import RDF, Literal, URIRef
from sugar.graphics import style
import gtk
+import os
class Box(DatastoreItem):
'''
@@ -29,12 +30,13 @@ class Item(DatastoreItem):
def __init__(self, id=None):
#DatastoreItem.__init__(self, 'Item', id)
super(Item, self).__init__('Item', id)
- print 'fdfds'
self.pixbuf = None
-
+ self.activity_root = None
+
def get_depiction(self):
if self.pixbuf == None:
- self.pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(self.get_metadata('hasDepiction')[0], style.zoom(160), style.zoom(120))
+ file_name = os.path.join(self.activity_root, 'data', self.get_metadata('hasDepiction')[0])
+ self.pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(file_name, style.zoom(160), style.zoom(120))
return self.pixbuf
def set_depiction(self, file_name):
@@ -46,42 +48,50 @@ def get_name(self):
def set_name(self, name):
self.set_metadata('name', Literal(name))
+ def set_activity_root(self, activity_root):
+ self.activity_root = activity_root
+
@classmethod
def cast(cls, instance):
instance.__class__ = cls
instance.pixbuf = None
+ instance.activity_root = None
class BackEnd(object):
- def __init__(self, datastore):
+ def __init__(self, datastore, activity_root):
self.datastore = datastore
+ self.activity_root = activity_root
def add_item(self, file_name):
'''
Store a new item in the data store
'''
+ # Create the entry in the data store
item = Item()
item.set_name(file_name.split('.')[0])
item.set_depiction(file_name)
self.datastore.save_item(item)
+ # Save the image
+ imagebytes = file.read(open(file_name, 'r'))
+ f = open(os.path.join(self.activity_root, 'data', file_name), 'w')
+ try:
+ f.write(imagebytes)
+ finally:
+ f.close()
def get_items(self):
'''
Query the datastore for all the items
'''
- items = self.datastore.get_items('Item')
- for item in items:
- item = Item.cast(item)
- #print items[0].get_metadata()
- #print items
- return items
-
- query = 'SELECT * WHERE { ?s <%s> <%s>}' % (RDF.type, OLPC['Item'])
+ #items = self.datastore.get_items('Item')
+ query = 'SELECT * WHERE { ?s <%s> <%s>} ORDER BY ?s' % (RDF.type, OLPC['Item'])
items = []
for line in self.datastore.sparql_get(query):
uri = line.split(',')[-1][4:-1]
id = uri.split('/')[-1]
print "load item %s" % id
item = Item(id)
+ item.set_activity_root(self.activity_root)
items.append(item)
# Load all the meta data
query = 'SELECT * WHERE { <%s> ?p ?o}' % item.get_resource()
@@ -94,9 +104,11 @@ def get_items(self):
o = URIRef(o[4:-1])
elif o[0] == '"':
o = Literal(o[1:-1])
- item.set_metadata(p, o)
-
+ item.set_metadata(p, o)
return items
+ #for item in items:
+ # item = Item.cast(item)
+ #return items
def get_boxes(self):
'''
View
12 src/Frontend.py
@@ -18,7 +18,7 @@ def __init__(self):
class SortingPanel(object):
DND_TARGET = [("text/plain", gtk.TARGET_SAME_APP, 0)]
- def __init__(self, datastore):
+ def __init__(self, datastore, backend):
'''
Constructor
'''
@@ -32,6 +32,7 @@ def __init__(self, datastore):
# The data store to dialog with
self.datastore = datastore
+ self.backend = backend
# Create the left part
left_part = gtk.Notebook()
@@ -64,9 +65,8 @@ def __init__(self, datastore):
self.widget.attach(right_part, 1, 2, 0, 1, xoptions=gtk.EXPAND | gtk.FILL, yoptions=gtk.EXPAND | gtk.FILL, xpadding=style.DEFAULT_SPACING, ypadding=style.DEFAULT_SPACING)
# Get the data from the backend
- backend = BackEnd(datastore)
- boxes = backend.get_boxes()
- items = backend.get_items()
+ boxes = self.backend.get_boxes()
+ items = self.backend.get_items()
# Load the boxes
for box in boxes:
@@ -166,7 +166,7 @@ def get_widget(self):
class MainWindow(object):
- def __init__(self, datastore):
+ def __init__(self, datastore, backend):
'''
Constructor
'''
@@ -179,7 +179,7 @@ def __init__(self, datastore):
self.window.set_position(gtk.WIN_POS_CENTER)
# Create the panels of the application
- sortingPanel = SortingPanel(datastore)
+ sortingPanel = SortingPanel(datastore, backend)
# Pack everything
self.panels = gtk.Notebook()
View
9 src/MANIFEST
@@ -0,0 +1,9 @@
+Frontend.py
+SortGameActivity.py
+Backend.py
+main.py
+Datastore.py
+setup.py
+test.py
+activity/activity.info
+activity/sort.svg
View
40 src/SortGameActivity.py
@@ -0,0 +1,40 @@
+'''
+Created on Mar 1, 2011
+
+@author: cgueret
+'''
+from sugar.activity import activity
+from sugar.graphics import style
+from Frontend import SortingPanel
+from Datastore import Datastore
+from Backend import BackEnd
+import pango
+import logging
+
+logger = logging.getLogger('sortgame-activity')
+
+
+
+class SortGameActivity(activity.Activity):
+ def __init__(self, handle):
+ activity.Activity.__init__(self, handle)
+ logger.debug("test")
+
+ # Configure the toolbox
+ toolbox = activity.ActivityToolbox(self)
+ activity_toolbar = toolbox.get_activity_toolbar()
+ activity_toolbar.keep.props.visible = False
+ activity_toolbar.share.props.visible = False
+ self.set_toolbox(toolbox)
+ toolbox.show()
+
+ # Create a data store and the app
+ datastore = Datastore("127.0.0.1:8080")
+ backend = BackEnd(datastore, self.get_activity_root())
+ main = SortingPanel(datastore, backend)
+ widget = main.get_widget()
+
+ # pack
+ self.set_canvas(widget)
+ widget.grab_focus()
+ widget.modify_font(pango.FontDescription("sans %d" % style.zoom(10)))
View
9 src/activity/activity.info
@@ -0,0 +1,9 @@
+[Activity]
+name = Sort Game
+service_name = nl.vu.SortGameActivity
+icon = sort
+exec = sugar-activity SortGameActivity.SortGameActivity
+show_launcher = yes
+activity_version = 1
+mime_types = text/plain
+license = GPLv2+
View
101 src/activity/sort.svg
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1/EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [
+ <!ENTITY stroke_color "#000000">
+ <!ENTITY fill_color #FFFFFF">
+]>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48px"
+ height="48px"
+ id="svg2993"
+ version="1.1"
+ inkscape:version="0.48.1 r9760"
+ sodipodi:docname="New document 3">
+ <defs
+ id="defs2995">
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect3066"
+ is_visible="true" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect3062"
+ is_visible="true" />
+ <inkscape:path-effect
+ effect="spiro"
+ id="path-effect3022"
+ is_visible="true" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="7"
+ inkscape:cx="24"
+ inkscape:cy="24"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:window-width="1440"
+ inkscape:window-height="829"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata2998">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <rect
+ style="fill:&fill_color;;fill-rule:evenodd;stroke:&stroke_color;;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="rect3001"
+ width="17.571428"
+ height="16.428572"
+ x="3"
+ y="11.142858" />
+ <rect
+ style="fill:&fill_color;;fill-rule:evenodd;stroke:&stroke_color;;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ id="rect3003"
+ width="18.714285"
+ height="16.571428"
+ x="27"
+ y="28.857143" />
+ <path
+ style="fill:none;stroke:&stroke_color;;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 22,14.714286 c 0.179852,0.08137 0.374446,0.130015 0.571429,0.142857 0.190111,0.01239 0.380913,0 0.571428,0 l 1.428572,0 c 0.09906,0 0.1989,0.0099 0.29222,0.04312 0.09332,0.03323 0.181248,0.08502 0.279208,0.09974 0.04714,0.0071 0.09512,0.005 0.142753,0.0031 C 25.333241,15.001184 25.380901,15 25.428571,15 L 26,15 l 2,0 2.142857,0 c 0.143685,0 0.287208,-0.0083 0.430264,-0.02173 C 30.716176,14.964837 30.864906,14.95106 31,15 c 0.100242,0.03631 0.185653,0.106046 0.285714,0.142857 0.112603,0.04143 0.236427,0.03857 0.355786,0.02636 0.119358,-0.01221 0.238717,-0.03326 0.3585,-0.02636 0.121557,0.007 0.239391,0.04254 0.356384,0.07627 0.116992,0.03373 0.236145,0.06614 0.357902,0.06659 0.09631,3.58e-4 0.191437,-0.01931 0.28724,-0.02919 0.0958,-0.0099 0.195915,-0.0093 0.284188,0.02919 0.04919,0.02146 0.09266,0.05384 0.137979,0.08258 0.04532,0.02874 0.09438,0.05453 0.147736,0.06028 0.04741,0.0051 0.09554,-0.0059 0.142857,0 0.04337,0.0054 0.08402,0.02502 0.119589,0.05043 0.03557,0.02541 0.06657,0.05659 0.09706,0.0879 0.0305,0.03132 0.06082,0.06306 0.09535,0.08985 0.03453,0.0268 0.07376,0.04867 0.116567,0.05753 0.03584,0.0074 0.07305,0.0055 0.109205,-1.77e-4 0.03616,-0.0057 0.07163,-0.01501 0.107464,-0.02245 0.03584,-0.0074 0.07239,-0.01301 0.108934,-0.01096 0.03654,0.002 0.07332,0.01213 0.102969,0.0336 0.0275,0.01991 0.04738,0.04832 0.06812,0.0752 0.02074,0.02688 0.04386,0.05356 0.07474,0.06766 0.02202,0.01005 0.04676,0.01303 0.07095,0.01206 0.02419,-9.8e-4 0.04805,-0.0058 0.07176,-0.01066 0.02371,-0.0049 0.04751,-0.0099 0.07167,-0.01136 0.02417,-0.0015 0.04893,7.83e-4 0.07133,0.01 0.03147,0.0129 0.05599,0.03838 0.0772,0.06497 0.02121,0.02658 0.04034,0.05519 0.06566,0.07789 0.04592,0.04118 0.108981,0.05943 0.170641,0.06089 0.06166,0.0015 0.122617,-0.01253 0.18203,-0.02909 0.05941,-0.01656 0.118318,-0.03583 0.179253,-0.04537 0.06093,-0.0095 0.124924,-0.0089 0.182362,0.01357 0.06453,0.02525 0.11761,0.07833 0.142857,0.142857 0.134851,-0.05825 0.29372,-0.05825 0.428571,0 0.157993,0.06824 0.275185,0.207666 0.428572,0.285714 0.09527,0.04848 0.204481,0.07337 0.285714,0.142858 0.05126,0.04385 0.08831,0.10318 0.142857,0.142857 0.04331,0.0315 0.09504,0.04872 0.145351,0.06708 0.05031,0.01836 0.101337,0.0391 0.140364,0.07578 0.02481,0.02331 0.04369,0.05208 0.06496,0.07866 0.02128,0.02658 0.04617,0.05184 0.07789,0.0642 0.0226,0.0088 0.04746,0.01051 0.07164,0.0086 0.02418,-0.0019 0.04792,-0.0074 0.07164,-0.01247 0.02372,-0.0051 0.04765,-0.0099 0.0719,-0.0105 0.02425,-6.07e-4 0.04903,0.0032 0.07054,0.01439 0.03015,0.01573 0.05111,0.0443 0.07111,0.07181 0.02,0.02751 0.0413,0.05592 0.07175,0.07105 0.02176,0.01081 0.0467,0.01393 0.07097,0.0127 0.02427,-0.0012 0.04811,-0.0066 0.0718,-0.01199 0.02369,-0.0054 0.0475,-0.01089 0.07175,-0.01235 0.02425,-0.0015 0.04921,0.0013 0.07118,0.01164 0.03073,0.01451 0.05276,0.04231 0.07298,0.06962 0.02022,0.02731 0.04065,0.0559 0.06987,0.07324 0.02085,0.01237 0.04509,0.01822 0.06929,0.01966 0.0242,0.0014 0.04845,-0.0014 0.07236,-0.0054 0.04781,-0.008 0.09604,-0.02084 0.144068,-0.01428 0.05163,0.0071 0.09824,0.03635 0.134666,0.07361 0.03642,0.03726 0.06377,0.08229 0.08956,0.127574 0.02578,0.04528 0.05049,0.09149 0.08268,0.132471 0.03218,0.04098 0.07276,0.07694 0.121669,0.09492 0.04563,0.01677 0.09722,0.01677 0.142857,0 0.09354,0.05092 0.188854,0.09858 0.285715,0.142857 0.130565,0.05968 0.265832,0.114353 0.377736,0.204279 0.05595,0.04496 0.10554,0.09869 0.140776,0.161226 0.03524,0.06254 0.0557,0.134197 0.05292,0.205923 -9.28e-4,0.02394 -0.0044,0.04771 -0.0059,0.07162 -0.0015,0.02391 -9.73e-4,0.04829 0.0059,0.07124 0.0099,0.03322 0.03269,0.06143 0.05929,0.08369 0.0266,0.02225 0.05713,0.03921 0.08727,0.05637 0.03014,0.01716 0.06034,0.03485 0.08589,0.0583 0.02555,0.02345 0.04641,0.05336 0.05327,0.08736 0.0047,0.02342 0.0027,0.04762 4.43e-4,0.07141 -0.0022,0.02379 -0.0046,0.04792 -4.43e-4,0.07145 0.006,0.03404 0.02542,0.06464 0.04983,0.08912 0.02441,0.02448 0.05372,0.04345 0.08331,0.06131 0.0296,0.01787 0.05984,0.03491 0.08704,0.05624 0.0272,0.02134 0.05151,0.04744 0.06553,0.07904 0.01488,0.03353 0.01737,0.07146 0.01352,0.107942 -0.0039,0.03648 -0.01376,0.072 -0.02285,0.107539 -0.0091,0.03554 -0.01744,0.07161 -0.01809,0.108285 -6.49e-4,0.03668 0.0069,0.07438 0.02742,0.104806 0.01898,0.02817 0.04748,0.04819 0.07455,0.06871 0.02706,0.02052 0.05417,0.04326 0.06831,0.07414 0.0101,0.02206 0.01283,0.04691 0.01151,0.07113 -0.0013,0.02422 -0.0065,0.04804 -0.01169,0.07174 -0.0052,0.0237 -0.01034,0.04753 -0.0116,0.07175 -0.0013,0.02423 0.0016,0.04908 0.01178,0.07108 0.0143,0.03081 0.04156,0.05336 0.06867,0.07382 0.02711,0.02046 0.0556,0.0406 0.07418,0.06903 0.02012,0.03078 0.02672,0.06886 0.02505,0.105596 -0.0017,0.03674 -0.01107,0.07263 -0.02078,0.108106 -0.0097,0.03547 -0.01981,0.0711 -0.02296,0.10774 -0.0031,0.03664 0.0011,0.07483 0.01869,0.10713 0.01619,0.02974 0.04246,0.05253 0.06886,0.07373 0.02641,0.02119 0.05391,0.04187 0.07399,0.06913 0.02879,0.03908 0.04001,0.08878 0.04125,0.1373 0.0012,0.04852 -0.0066,0.09678 -0.01476,0.144633 -0.01632,0.0957 -0.02649,0.192415 -0.02649,0.289495 l 0,1.571429 0,1 c 0,0.07238 0.0063,0.144565 0.01644,0.216226 0.0051,0.03583 0.0099,0.07187 0.0092,0.108051 -7.33e-4,0.03618 -0.0075,0.07299 -0.02566,0.104294 -0.01698,0.02926 -0.04292,0.05211 -0.06907,0.07356 -0.02615,0.02146 -0.05327,0.0424 -0.07379,0.06929 -0.03763,0.04933 -0.04934,0.114575 -0.04477,0.176446 0.0046,0.06187 0.02402,0.12155 0.04343,0.180476 0.01941,0.05893 0.03907,0.118504 0.04412,0.180338 0.005,0.06184 -0.0059,0.127134 -0.04278,0.177025 -0.02009,0.02718 -0.04682,0.04857 -0.07284,0.07014 -0.02602,0.02157 -0.05204,0.0441 -0.07001,0.07272 -0.02624,0.04179 -0.03305,0.09342 -0.02864,0.142572 0.0044,0.04915 0.01924,0.09667 0.03358,0.143891 0.01433,0.04722 0.02835,0.09509 0.03105,0.14436 0.0027,0.04927 -0.0069,0.100748 -0.03598,0.140606 -0.01998,0.02738 -0.04784,0.04774 -0.07444,0.06875 -0.0266,0.021 -0.05304,0.0439 -0.06842,0.07411 -0.01096,0.02152 -0.01572,0.0458 -0.01655,0.06993 -8.25e-4,0.02413 0.0022,0.04823 0.006,0.07207 0.0077,0.04767 0.01898,0.09617 0.01052,0.143715 -0.0063,0.03529 -0.02362,0.06854 -0.04897,0.09389 -0.02535,0.02535 -0.05859,0.04269 -0.09389,0.04897 -0.139062,0.06695 -0.298971,0.08977 -0.45121,0.0644 -0.152239,-0.02537 -0.296101,-0.09883 -0.405933,-0.207257 -0.04797,-0.04736 -0.08978,-0.101309 -0.142857,-0.142857 -0.02704,-0.02117 -0.05671,-0.03886 -0.08314,-0.06079 -0.02643,-0.02193 -0.05005,-0.04912 -0.05972,-0.08207 -0.0067,-0.02296 -0.0063,-0.04739 -0.0044,-0.07125 0.0019,-0.02385 0.0053,-0.04769 0.0044,-0.07161 -0.0014,-0.03538 -0.01242,-0.07008 -0.02977,-0.10095 -0.01734,-0.03087 -0.04088,-0.05802 -0.06752,-0.08135 -0.05329,-0.04665 -0.118109,-0.07774 -0.182302,-0.107655 -0.06419,-0.02992 -0.129432,-0.05971 -0.184397,-0.104375 -0.02748,-0.02233 -0.05221,-0.04833 -0.07122,-0.0782 -0.01902,-0.02987 -0.03222,-0.06371 -0.03622,-0.0989 -0.0055,-0.04802 0.0062,-0.09607 0.01334,-0.143865 0.0036,-0.0239 0.006,-0.04809 0.0047,-0.07221 -0.0014,-0.02412 -0.0067,-0.04828 -0.018,-0.06964 -0.01584,-0.02995 -0.0423,-0.05268 -0.06884,-0.07373 -0.02654,-0.02105 -0.05423,-0.04162 -0.07402,-0.06912 -0.02882,-0.04006 -0.03809,-0.09159 -0.03516,-0.140855 0.0029,-0.04927 0.0171,-0.09709 0.03147,-0.144299 0.01438,-0.04721 0.02916,-0.09478 0.03336,-0.143948 0.0042,-0.04917 -0.003,-0.100818 -0.02968,-0.142327 -0.01828,-0.02843 -0.0446,-0.05061 -0.07071,-0.07208 -0.02611,-0.02147 -0.05278,-0.04307 -0.07215,-0.07077 -0.02097,-0.03 -0.03236,-0.06599 -0.03653,-0.102348 -0.0042,-0.03636 -0.0014,-0.07321 0.0041,-0.109395 0.01104,-0.07236 0.03301,-0.143631 0.0324,-0.216828 -5.97e-4,-0.07125 -0.02298,-0.141458 -0.05904,-0.202912 -0.03606,-0.06145 -0.08543,-0.114444 -0.140777,-0.159315 -0.110692,-0.08974 -0.243493,-0.146813 -0.371611,-0.209202 -0.03159,-0.01538 -0.06336,-0.03139 -0.09,-0.0543 -0.02664,-0.02291 -0.04804,-0.05374 -0.05285,-0.08855 -0.0033,-0.0238 0.0012,-0.04788 0.0043,-0.07171 0.0031,-0.02383 0.0046,-0.04883 -0.0043,-0.07115 -0.0064,-0.01594 -0.01772,-0.0295 -0.03068,-0.04075 -0.01296,-0.01125 -0.02758,-0.0204 -0.04206,-0.02963 -0.01448,-0.0092 -0.02896,-0.01863 -0.04154,-0.03031 -0.01258,-0.01168 -0.02328,-0.02584 -0.02857,-0.04217 -0.0074,-0.02288 -0.0037,-0.04768 7e-5,-0.07143 0.0038,-0.02375 0.0074,-0.04858 -7e-5,-0.07142 -0.0054,-0.01631 -0.01614,-0.03043 -0.02879,-0.04204 -0.01265,-0.01162 -0.02718,-0.02096 -0.04168,-0.03015 -0.0145,-0.0092 -0.02914,-0.01835 -0.04206,-0.02965 -0.01292,-0.01131 -0.02418,-0.02497 -0.03033,-0.04101 -0.0086,-0.02243 -0.0066,-0.0474 -0.0033,-0.0712 0.0033,-0.0238 0.0076,-0.04803 0.0033,-0.07165 -0.0031,-0.01704 -0.01074,-0.03308 -0.02085,-0.04716 -0.0101,-0.01408 -0.02266,-0.02626 -0.03619,-0.03709 -0.02705,-0.02167 -0.05792,-0.03805 -0.08583,-0.0586 C 37.482431,22.220148 37.427625,22.110538 37.428571,22"
+ id="path3060"
+ inkscape:path-effect="#path-effect3062"
+ inkscape:original-d="m 22,14.714286 c 0.190476,0.04762 0.377762,0.110579 0.571429,0.142857 0.187884,0.03131 0.380952,0 0.571428,0 0.476191,0 0.952381,0 1.428572,0 0.723934,0 -0.170368,-0.04259 0.571428,0.142857 0.09239,0.0231 0.190476,0 0.285714,0 0.190477,0 0.380953,0 0.571429,0 0.666667,0 1.333333,0 2,0 0.714286,0 1.428571,0 2.142857,0 0.148561,0 0.744769,-0.02809 0.857143,0 0.1033,0.02582 0.184699,0.109185 0.285714,0.142857 0.09256,0.03085 0.597329,0 0.714286,0 0.41202,0 0.189399,0.01164 0.714286,0.142857 0.179271,0.04482 0.392157,-0.04482 0.571428,0 0.103301,0.02582 0.184699,0.109186 0.285715,0.142857 0.04518,0.01506 0.100265,-0.0213 0.142857,0 0.653801,0.326901 -0.606203,-0.05921 0.428571,0.285715 0.09826,0.03275 0.344283,-0.04214 0.428572,0 0.06023,0.03012 0.08262,0.11274 0.142857,0.142857 0.08518,0.04259 0.20053,-0.04259 0.285714,0 0.06023,0.03012 0.08262,0.11274 0.142857,0.142857 0.09085,0.04542 0.595969,-0.03944 0.714286,0 0.06389,0.0213 0.09524,0.09524 0.142857,0.142857 0.142857,0 0.288488,-0.02802 0.428571,0 0.369928,0.07399 0.195256,0.130171 0.428572,0.285714 0.0886,0.05906 0.197118,0.08379 0.285714,0.142858 0.05603,0.03736 0.08682,0.105501 0.142857,0.142857 0.0886,0.05906 0.197118,0.08379 0.285715,0.142857 0.05603,0.03735 0.08262,0.11274 0.142857,0.142857 0.151778,0.07589 0.133935,-0.07589 0.285714,0 0.06023,0.03012 0.08262,0.11274 0.142857,0.142857 0.151779,0.07589 0.133936,-0.07589 0.285714,0 0.06023,0.03012 0.08262,0.11274 0.142858,0.142857 0.151778,0.07589 0.133935,-0.07589 0.285714,0 0.171428,0.08572 0.257143,0.342857 0.428571,0.428572 0.04259,0.0213 0.09524,0 0.142857,0 0.09524,0.04762 0.197118,0.08379 0.285715,0.142857 0.05941,0.03961 0.545881,0.520335 0.571428,0.571428 0.0213,0.04259 -0.0213,0.100266 0,0.142858 0.06023,0.120467 0.225481,0.165246 0.285715,0.285714 0.02129,0.04259 -0.0213,0.100265 0,0.142857 0.06023,0.120468 0.22548,0.165247 0.285714,0.285714 0.05714,0.114286 -0.05714,0.314286 0,0.428572 0.03012,0.06023 0.11274,0.08262 0.142857,0.142857 0.04259,0.08518 -0.04259,0.200531 0,0.285714 0.03012,0.06023 0.11274,0.08262 0.142857,0.142857 0.05714,0.114286 -0.05714,0.314286 0,0.428572 0.03012,0.06023 0.11274,0.08262 0.142857,0.142857 0.01878,0.03756 0,0.496725 0,0.571428 0,0.52381 0,1.047619 0,1.571429 0,0.333333 0,0.666667 0,1 0,0.06434 0.02174,0.385095 0,0.428571 -0.03012,0.06023 -0.11274,0.08262 -0.142857,0.142858 -0.04506,0.09012 0.04506,0.624161 0,0.714285 -0.03012,0.06023 -0.11274,0.08262 -0.142857,0.142857 -0.04489,0.08979 0.04489,0.48164 0,0.571429 -0.03012,0.06023 -0.11274,0.08262 -0.142857,0.142857 -0.07619,0.152381 0.07619,0.133333 0,0.285714 -0.03012,0.06023 -0.09524,0.09524 -0.142857,0.142858 -0.285714,-0.04762 -0.578632,-0.06328 -0.857143,-0.142858 -0.06475,-0.0185 -0.09524,-0.09524 -0.142857,-0.142857 -0.04762,-0.04762 -0.11274,-0.08262 -0.142857,-0.142857 -0.0213,-0.04259 0.02129,-0.100265 0,-0.142857 C 39.501141,25.859424 39.070288,25.569147 39,25.428571 c -0.04259,-0.08518 0.04259,-0.20053 0,-0.285714 -0.03012,-0.06023 -0.11274,-0.08262 -0.142857,-0.142857 -0.0449,-0.08979 0.04489,-0.48164 0,-0.571429 -0.03012,-0.06023 -0.11274,-0.08262 -0.142857,-0.142857 -0.05714,-0.114285 0.05714,-0.314285 0,-0.428571 -0.03308,-0.06615 -0.487408,-0.487408 -0.571429,-0.571429 -0.04762,-0.04762 -0.11274,-0.08262 -0.142857,-0.142857 -0.0213,-0.04259 0.0213,-0.100265 0,-0.142857 -0.03012,-0.06023 -0.11274,-0.08262 -0.142857,-0.142857 -0.0213,-0.04259 0.0213,-0.100266 0,-0.142857 -0.03012,-0.06023 -0.11274,-0.08262 -0.142857,-0.142857 -0.0213,-0.04259 0.0213,-0.100266 0,-0.142858 -0.03012,-0.06023 -0.11274,-0.08262 -0.142857,-0.142857 C 37.361228,21.865313 37.902369,22.473797 37.428571,22"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;stroke:&stroke_color;;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 40.571429,26.857143 c 0.170338,-0.103542 0.372404,-0.154059 0.571428,-0.142857 0.04768,0.0027 0.09592,0.0088 0.142857,0 0.06855,-0.01281 0.128117,-0.05664 0.173495,-0.109598 0.04538,-0.05296 0.07846,-0.115092 0.11222,-0.176117 0.0168,-0.03038 0.03404,-0.06086 0.05695,-0.08694 0.02291,-0.02608 0.05217,-0.04776 0.08591,-0.05592 0.02322,-0.0056 0.0475,-0.0047 0.07132,-0.0027 0.02382,0.0019 0.04773,0.0047 0.07154,0.0027 0.05354,-0.0045 0.101924,-0.03283 0.1464,-0.06298 0.04448,-0.03015 0.08819,-0.06334 0.139314,-0.07988 0.06858,-0.02218 0.142916,-0.01208 0.214187,-0.0013 0.07127,0.01076 0.145278,0.0218 0.214385,0.0013 0.06725,-0.01993 0.123101,-0.06828 0.165538,-0.124133 0.04244,-0.05585 0.07316,-0.119502 0.105535,-0.18173 0.03237,-0.06223 0.06725,-0.124267 0.11621,-0.174499 0.04896,-0.05023 0.114063,-0.08809 0.184145,-0.09107 0.02388,-0.001 0.04773,0.002 0.07157,0.0037 0.02384,0.0018 0.04814,0.0022 0.07129,-0.0037 0.03352,-0.0086 0.06252,-0.03033 0.08547,-0.05624 0.02295,-0.02591 0.0405,-0.05607 0.05783,-0.08603 0.01733,-0.02996 0.03476,-0.06017 0.05753,-0.08625 0.02276,-0.02608 0.05149,-0.04807 0.08488,-0.05719 0.02308,-0.0063 0.0474,-0.0062 0.07127,-0.0046 0.02386,0.0016 0.04767,0.0048 0.07159,0.0046 0.04331,-3.78e-4 0.08614,-0.01197 0.125129,-0.03081 0.03899,-0.01885 0.07427,-0.04483 0.10589,-0.07442 0.06324,-0.05919 0.112029,-0.131878 0.159548,-0.204295 0.09504,-0.144832 0.201226,-0.282259 0.323718,-0.404751 C 44.619047,24.380953 44.809524,24.190476 45,24 c 0.04762,-0.04762 0.09524,-0.09524 0.142857,-0.142857 0.02411,-0.02411 0.04612,-0.0502 0.0667,-0.07738 0.01029,-0.01359 0.02072,-0.02718 0.03301,-0.03899 0.01229,-0.01181 0.02673,-0.02188 0.04315,-0.02648 0.02289,-0.0098 0.0489,-0.0099 0.07341,-0.0056 0.0245,0.0044 0.048,0.01301 0.07178,0.02038 0.02378,0.0074 0.04834,0.01354 0.07322,0.01274 0.01244,-4.02e-4 0.02488,-0.0026 0.03648,-0.0071 0.0116,-0.0045 0.02236,-0.01137 0.03084,-0.02048 5.79e-4,-0.08679 -0.01004,-0.173825 -0.0015,-0.260203 0.0043,-0.04319 0.01338,-0.08617 0.03053,-0.12603 0.01715,-0.03986 0.04259,-0.0766 0.0763,-0.103929 0.03371,-0.02733 0.07595,-0.04487 0.119337,-0.04588 0.04339,-0.001 0.08758,0.01529 0.117518,0.04671 0.01497,0.01571 0.02627,0.03496 0.03225,0.05582 0.006,0.02086 0.0066,0.04329 0.0013,0.06434 -0.0053,0.02104 -0.01653,0.04062 -0.03233,0.05549 -0.01581,0.01487 -0.03617,0.02492 -0.05765,0.02798 -0.01903,-0.01709 -0.04474,-0.02655 -0.07031,-0.02586 -0.02557,6.86e-4 -0.05073,0.0115 -0.06882,0.02959 -0.01809,0.01809 -0.02891,0.04325 -0.02959,0.06882 -6.86e-4,0.02557 0.0088,0.05128 0.02586,0.07031"
+ id="path3064"
+ inkscape:path-effect="#path-effect3066"
+ inkscape:original-d="m 40.571429,26.857143 c 0.190476,-0.04762 0.378903,-0.104352 0.571428,-0.142857 0.04669,-0.0093 0.103236,0.02641 0.142857,0 0.112067,-0.07471 0.190476,-0.190476 0.285715,-0.285715 0.04762,-0.04762 0.08262,-0.11274 0.142857,-0.142857 0.04259,-0.0213 0.09524,0 0.142857,0 0.335025,0 -0.06734,0.03367 0.285714,-0.142857 0.114286,-0.05714 0.314286,0.05714 0.428572,0 0.140575,-0.07029 0.430853,-0.501141 0.571428,-0.571428 0.04259,-0.0213 0.100266,0.0213 0.142857,0 0.120468,-0.06023 0.165247,-0.225481 0.285715,-0.285715 0.04259,-0.0213 0.100265,0.0213 0.142857,0 0.091,-0.0455 0.602033,-0.602033 0.714285,-0.714285 C 44.619048,24.380952 44.809524,24.190476 45,24 c 0.04762,-0.04762 0.09524,-0.09524 0.142857,-0.142857 0.04762,-0.04762 0.08262,-0.11274 0.142857,-0.142857 0.08518,-0.04259 0.200531,0.04259 0.285715,0 0.149034,-0.07452 0.225919,-0.345509 0.285714,-0.285715 0.04762,0.04762 -0.09524,0.09524 -0.142857,0.142858"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
View
6 src/main.py
@@ -11,14 +11,16 @@
if __name__ == '__main__':
# Create a data store
datastore = Datastore("127.0.0.1:8080")
- backend = BackEnd(datastore)
+ backend = BackEnd(datastore, ".")
# Add some content to the sort application
#backend.add_item("rubberDuck.jpg")
#backend.add_item("chair.jpg")
# Create the application
- main = MainWindow(datastore)
+ main = MainWindow(datastore, backend)
# Start gtk main loop
gtk.main()
+
+# siacia - syndicat intercommunal de l'argens - frejus, roquebrune
View
9 src/setup.py
@@ -0,0 +1,9 @@
+'''
+Created on Mar 1, 2011
+
+@author: cgueret
+'''
+#!/usr/bin/env python
+
+from sugar.activity import bundlebuilder
+bundlebuilder.start()
Please sign in to comment.
Something went wrong with that request. Please try again.