Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofer@localhost.localdomain>2013-01-20 16:38:12 (GMT)
committer Cristhofer Travieso <cristhofer@localhost.localdomain>2013-01-20 16:38:12 (GMT)
commitf9848bafe8e4e80292f8fb1f851e2b10f4d29c5f (patch)
treeaf38864c7d1afa765dfe45a4e46a412683ffbf3e
parent5b277c37e40a0f0357051eae20b740a33d11c59a (diff)
Fixing bags
Signed-off-by: Cristhofer Travieso <cristhofer@localhost.localdomain>
-rw-r--r--.gitignore4
-rw-r--r--activity.py61
2 files changed, 65 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1e4c0c4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.pyc
+*.pyo
+*.mo
+*~
diff --git a/activity.py b/activity.py
new file mode 100644
index 0000000..7b8a4e7
--- /dev/null
+++ b/activity.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+# -*- coding: UTF-8 -*-
+
+# activity.py by:
+# Cristhofer Travieso <cristhofert97@gmail.com>
+
+# 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 3 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 Gtk
+
+from sugar.activity import activity
+from sugar.graphics.toolbarbox import ToolbarBox
+from sugar.activity.widgets import ActivityToolbarButton
+from sugar.activity.widgets import StopButton
+from sugar.graphics.toolbutton import ToolButton
+
+
+class Electricity(activity.Activity):
+
+ def __init__(self, handle):
+
+ activity.Activity.__init__(self, handle, True)
+
+ self.max_participans = 1
+
+ #Toolbars
+
+ toolbarbox = ToolbarBox()
+
+ activity_button = ActivityToolbarButton(self)
+ toolbarbox.toolbar.insert(activity_button, 0)
+
+ play_btn = ToolButton()
+ toolbarbox.toolbar.insert(play_btn, -1)
+
+ self._electric_source_btn = ToolButton()
+ electric_source_toolbar = Gtk.Toolbar()
+
+ self._electric_source_btn.props.page = electric_source_toolbar
+ toolbarbox.toolbar.insert(self._electric_source_btn, -1)
+
+ stop_btn = StopButton(self)
+ toolbarbox.toolbar.inster(stop_button, -1)
+
+ self.set_toolbar_box(toolbarbox)
+
+ self.show_all()
+
+