Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activity.py62
-rw-r--r--activity/activity.info7
-rw-r--r--activity/simplegraph.svg76
-rwxr-xr-xsetup.py21
4 files changed, 166 insertions, 0 deletions
diff --git a/activity.py b/activity.py
new file mode 100644
index 0000000..0e25fcd
--- /dev/null
+++ b/activity.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+import gtk
+
+from sugar.activity import activity
+from sugar.activity.widgets import ActivityToolbarButton
+from sugar.graphics.toolbarbox import ToolbarBox
+
+class SimpleGraph(actvitiy.Activity):
+
+ def __init__(self, handle):
+
+ activity.Activity.__init__(self, handle, True)
+
+ self.max_participiants = 0
+
+ # TOOLBARS
+ self.toolbarbox = ToolbarBox()
+
+ self.activity_button = ActivityToolbarButton(self)
+ self.toolbarbox.toolbar.insert(self.activity_button)
+
+ self.set_toolbar_box(self.toolbarbox)
+
+ # CANVAS
+ self.paned = gtk.HPaned()
+
+ self.treeview = TreeView()
+ self.paned.add1(self.treeview)
+
+ self.set_canvas(self.paned)
+
+ self.show_all()
+
+class TreeView(gtk.TreeView):
+
+ def __init__(self):
+ gtk.TreeView.__init__(self)
+
+ self.model = gtk.ListStore()
+
+ # Label column
+
+ column = gtk.TreeViewColumn("Label")
+ label = gtk.CellRendererText()
+
+ column.pack_start(label)
+ column.set_attributes(label, text=0)
+ self.append_column(column)
+
+ # Value column
+
+ column = gtk.TreeViewColumn("Value")
+ value = gtk.CellRendererText()
+
+ column.pack_start(value)
+ column.set_attributes(value, text=1)
+
+ self.append_column(column)
+
+ self.show_all()
diff --git a/activity/activity.info b/activity/activity.info
new file mode 100644
index 0000000..dd799bd
--- /dev/null
+++ b/activity/activity.info
@@ -0,0 +1,7 @@
+[Activity]
+name = SimpleGraph
+activity_version = 1
+bundle_id = org.sugarlabs.SimpleGraph
+exec = sugar-activity activity.SimpleGraph -s
+icon = simplegraph
+license = GPLv3+
diff --git a/activity/simplegraph.svg b/activity/simplegraph.svg
new file mode 100644
index 0000000..8e94bd0
--- /dev/null
+++ b/activity/simplegraph.svg
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<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"
+ version="1.1"
+ width="62"
+ height="60"
+ viewBox="0 0 62 60"
+ id="svg2"
+ xml:space="preserve"
+ inkscape:version="0.48.2 r9819"
+ sodipodi:docname="activity-jamedit.svg"><metadata
+ id="metadata24"><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><defs
+ id="defs22" /><sodipodi:namedview
+ pagecolor="#FFFFFF"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1280"
+ inkscape:window-height="746"
+ id="namedview23"
+ showgrid="false"
+ inkscape:zoom="6.3280823"
+ inkscape:cx="26.751055"
+ inkscape:cy="26.982428"
+ inkscape:window-x="0"
+ inkscape:window-y="26"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="g6167" /><g
+ transform="translate(60.127119,11.292373)"
+ id="activity-browse"
+ style="display:block">
+
+ <g
+ transform="translate(-128.87712,-22.838983)"
+ id="g7"
+ style="display:inline">
+
+
+
+
+
+
+ <g
+ transform="matrix(0.10822504,0,0,0.09945444,61.358446,34.085169)"
+ id="g6167"><rect
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+ id="rect3001"
+ width="141.63542"
+ height="228.80536"
+ x="152.98723"
+ y="79.540161" /><rect
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3001-6"
+ width="141.63542"
+ height="357.50836"
+ x="292.43243"
+ y="-49.16283" /><rect
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:25.09949684;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline"
+ id="rect3001-1"
+ width="141.63542"
+ height="484.62247"
+ x="428.2272"
+ y="-176.27692" /></g></g>
+</g></svg> \ No newline at end of file
diff --git a/setup.py b/setup.py
new file mode 100755
index 0000000..530f97c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2006, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+from sugar.activity import bundlebuilder
+
+bundlebuilder.start()