Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/PrestametuVoz.activity/prestame_tu_voz.py
diff options
context:
space:
mode:
authorEsteban Arias <earias@plan.ceibal.edu.uy>2010-09-20 18:16:24 (GMT)
committer Esteban Arias <earias@plan.ceibal.edu.uy>2010-09-20 18:16:24 (GMT)
commit07341d2801bb138c53b6465a5492a80621d7073d (patch)
tree146c3acacf7b098401024acc9cb45e97542ce5d0 /PrestametuVoz.activity/prestame_tu_voz.py
first commit
Diffstat (limited to 'PrestametuVoz.activity/prestame_tu_voz.py')
-rwxr-xr-xPrestametuVoz.activity/prestame_tu_voz.py88
1 files changed, 88 insertions, 0 deletions
diff --git a/PrestametuVoz.activity/prestame_tu_voz.py b/PrestametuVoz.activity/prestame_tu_voz.py
new file mode 100755
index 0000000..572d714
--- /dev/null
+++ b/PrestametuVoz.activity/prestame_tu_voz.py
@@ -0,0 +1,88 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#Copyright (C) 2010 Federico Moreira - <federico@piensalibre.info>
+# Alejandro Esperón - <ratman26@gmail.com>
+# Esteban Arias - <earias@plan.ceibal.edu.uy>
+#
+# 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, see <http://www.gnu.org/licenses/>
+
+
+import gtk
+from gettext import gettext as _
+from sugar.activity.activity import Activity, ActivityToolbox
+
+from toolbar import ConfigToolbar
+import grid
+import config_nuevo
+
+_TOOLBAR_CONFIG = 1
+
+class PrestameTuVozActivity(Activity):
+
+ def __init__(self, handle):
+ Activity.__init__(self, handle)
+
+ self.config_load = False
+
+ toolbox = ActivityToolbox(self)
+
+ toolbar_config = ConfigToolbar(toolbox, self)
+ toolbox.add_toolbar(_('Configuration'), toolbar_config)
+ toolbar_config.show()
+
+ self.set_toolbox(toolbox)
+ toolbox.show()
+
+ self.lista_tarjetas =[]
+ self.pos_actual = 0
+ self.recording = False
+ self.rec_process = None
+
+ self.mainbox = gtk.VBox()
+ #self.mainbox.pack_start(self.image)
+
+ self.tablebox = grid.VentanaPrincipal()
+ self.control = grid.ControlBarrido(self.tablebox)
+ self.chatbox = grid.get_chat_box()
+ self.tablebox.show_all()
+ self.control.show_all()
+ self.chatbox.show_all()
+ self.mainbox.pack_start(self.control)
+ self.mainbox.pack_start(self.tablebox)
+ self.mainbox.pack_start(self.chatbox)
+
+ self.set_canvas(self.mainbox)
+ self.mainbox.show_all()
+
+ self.toolbox.connect('current-toolbar-changed', self.change_mode)
+
+ def change_mode(self, notebook, index):
+ if index == _TOOLBAR_CONFIG:
+ if not self.config_load:
+ self.config_load = True
+ self.mainbox.remove(self.control)
+ self.mainbox.remove(self.tablebox)
+ self.mainbox.remove(self.chatbox)
+
+ self.ventana_config = config_nuevo.VentanaConfig()
+ self.mainbox.pack_start(self.ventana_config)
+ self.ventana_config.show_all()
+
+ else:
+ self.mainbox.remove(self.ventana_config)
+
+ self.mainbox.pack_start(self.control)
+ self.mainbox.pack_start(self.tablebox)
+ self.mainbox.pack_start(self.chatbox)
+