diff options
author | Wade Brainerd <wadetb@gmail.com> | 2009-11-12 13:20:15 (GMT) |
---|---|---|
committer | Wade Brainerd <wadetb@gmail.com> | 2009-11-12 13:20:15 (GMT) |
commit | b33787972d715d9563e12e329481905c4d64dae3 (patch) | |
tree | 78dfc0adecd38c80a0d47fdd72211351a11ecab1 |
Create Git repository for Arachnophilia.
-rw-r--r-- | activity/activity-arachnophilia.svg | 9 | ||||
-rwxr-xr-x | activity/activity.info | 7 | ||||
-rw-r--r-- | arachnophilia.swf | bin | 0 -> 1556016 bytes | |||
-rwxr-xr-x | setup.py | 22 | ||||
-rwxr-xr-x | swfactivity.py | 53 |
5 files changed, 91 insertions, 0 deletions
diff --git a/activity/activity-arachnophilia.svg b/activity/activity-arachnophilia.svg new file mode 100644 index 0000000..31ebb60 --- /dev/null +++ b/activity/activity-arachnophilia.svg @@ -0,0 +1,9 @@ +<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd' [ + <!ENTITY stroke_color "#010101"> + <!ENTITY fill_color "#FFFFFF"> +]><svg enable-background="new 0 0 55 55" height="55px" version="1.1" viewBox="0 0 55 55" width="55px" x="0px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px"> +<g display="block" id="activity-eatboom"> + <path d="M 31.000427,5.6997328 C 23.156318,5.6997736 16.977422,7.6385884 12.466073,11.516806 C 7.9546995,15.395098 5.7002211,20.715188 5.7002293,27.478686 C 5.7002293,34.167293 7.9142938,39.464764 12.344373,43.371117 C 16.774444,47.277477 22.780141,49.230927 30.360063,49.230927 C 33.713074,49.230927 36.964899,48.903576 40.114759,48.247837 C 43.264545,47.592097 46.301307,46.608712 49.227641,45.297225 C 49.218277,44.252349 49.209248,43.202318 49.200114,42.154272 L 49.200114,25.145179 L 47.1863,25.145179 C 47.05603,25.438831 46.918559,25.745254 46.767603,26.078848 C 46.36162,26.964404 46.051679,27.717695 45.669414,28.388315 L 45.646238,28.50185 C 45.63612,28.493973 45.624486,28.487011 45.61436,28.479141 C 45.072791,29.401755 44.377562,30.168267 43.071741,30.914163 C 42.163374,28.53251 42.230635,26.819466 41.06372,25.445719 C 40.881034,25.343559 40.698028,25.243205 40.514629,25.145179 L 30.93668,25.145179 L 30.93668,32.384799 L 38.089352,32.384799 L 38.089352,40.523351 C 38.041451,40.54052 37.993073,40.557476 37.944475,40.574113 C 37.940576,40.575453 37.936791,40.576785 37.932883,40.578117 C 37.883752,40.594877 37.833515,40.611326 37.783663,40.627538 C 37.780182,40.628674 37.777003,40.630415 37.773521,40.63155 C 37.72317,40.647877 37.672474,40.663852 37.621393,40.679632 C 37.51226,40.713347 37.402095,40.745919 37.289619,40.777142 C 37.00845,40.855189 36.716558,40.925701 36.414555,40.988188 C 36.411106,40.988899 36.407862,40.990141 36.404413,40.99086 C 36.045136,41.064927 35.671817,41.126998 35.283048,41.179197 C 34.236464,41.319715 33.103457,41.390243 31.884191,41.390235 C 29.287796,41.390243 27.03326,40.98648 25.122689,40.178734 C 24.816058,40.049101 24.517759,39.909769 24.22879,39.759323 C 24.225767,39.757746 24.223121,39.755556 24.220098,39.753979 C 24.174498,39.730183 24.129079,39.706159 24.083913,39.681849 C 24.080915,39.680231 24.078219,39.678131 24.075221,39.676505 C 24.030096,39.65217 23.98516,39.6279 23.940478,39.603043 C 23.937496,39.601376 23.934768,39.599365 23.931785,39.597698 C 23.887144,39.572808 23.842708,39.548302 23.798501,39.522896 C 23.795543,39.521189 23.792766,39.51926 23.789808,39.517552 C 23.65196,39.438166 23.516251,39.356222 23.382695,39.271778 C 23.379287,39.26962 23.375969,39.267267 23.372553,39.265101 C 23.33014,39.238225 23.288497,39.211014 23.24651,39.183623 C 23.156409,39.124707 23.066594,39.064581 22.978483,39.003302 C 22.975165,39.000998 22.971658,38.998931 22.96834,38.996626 C 22.927549,38.968255 22.887021,38.940014 22.846648,38.911136 C 22.843363,38.908782 22.839791,38.906821 22.836505,38.90446 C 22.752761,38.844268 22.670655,38.7825 22.588762,38.720127 C 22.503658,38.655318 22.419774,38.589611 22.336669,38.522441 C 22.045825,38.287347 21.767057,38.03707 21.500716,37.773105 C 19.065649,35.359713 17.848308,31.936665 17.848325,27.502735 C 17.848308,23.03142 19.11197,19.593688 21.63836,17.18962 C 24.164708,14.785609 27.761718,13.583203 32.428939,13.58317 C 34.945129,13.583203 37.455076,13.910162 39.961189,14.564921 C 40.776439,14.777944 41.594057,15.027298 42.412543,15.311593 C 43.833527,16.464104 44.108879,18.160192 45.476725,20.347265 C 46.611534,19.392726 47.142199,18.520899 47.490547,17.522209 C 47.502066,17.528231 47.513798,17.533543 47.525316,17.539573 L 47.525316,17.423366 C 47.767316,16.699378 47.922942,15.906251 48.145395,14.966976 C 49.080142,10.930157 49.257781,9.8008942 47.551393,8.8667264 C 45.077862,7.782448 42.389604,7.0586886 39.701854,6.48647 C 36.927942,5.9619159 34.028308,5.6997736 31.000427,5.6997328 z" display="inline" fill="&fill_color;" stroke="&stroke_color;" stroke-linejoin="round" stroke-width="3.5"/> + +</g></svg> + diff --git a/activity/activity.info b/activity/activity.info new file mode 100755 index 0000000..0eb3004 --- /dev/null +++ b/activity/activity.info @@ -0,0 +1,7 @@ +[Activity] +name = Arachnophilia +activity_version = 1 +service_name = org.sugarlabs.Arachnophilia +icon = activity-arachnophilia +class = swfactivity.SWFActivity + diff --git a/arachnophilia.swf b/arachnophilia.swf Binary files differnew file mode 100644 index 0000000..bf42f53 --- /dev/null +++ b/arachnophilia.swf diff --git a/setup.py b/setup.py new file mode 100755 index 0000000..fae74b8 --- /dev/null +++ b/setup.py @@ -0,0 +1,22 @@ +#!/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() + diff --git a/swfactivity.py b/swfactivity.py new file mode 100755 index 0000000..8205e3f --- /dev/null +++ b/swfactivity.py @@ -0,0 +1,53 @@ +# Copyright (C) 2009, Tomeu Vizoso +# +# 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 +import os + +import gtk +try: + import gnash +except ImportError: + import subprocess + +from sugar.activity import activity + +SWFNAME = 'arachnophilia.swf' + +class SWFActivity(activity.Activity): + def __init__(self, handle): + activity.Activity.__init__(self, handle) + + toolbox = activity.ActivityToolbox(self) + self.set_toolbox(toolbox) + toolbox.show() + + try: + view = gnash.View() + view.props.uri = os.path.join(activity.get_bundle_path(), SWFNAME) + self.set_canvas(view) + view.show() + + except NameError: + socket = gtk.Socket() + self.set_canvas(socket) + self.show_all() + + args = [ + 'gnash', + '-x', str(socket.get_id()), + os.path.join(activity.get_bundle_path(), SWFNAME) + ] + self._process = subprocess.Popen(args) + |