diff options
author | jgimenez <joedgimenez@gmail.com> | 2010-05-21 12:01:57 (GMT) |
---|---|---|
committer | jgimenez <joedgimenez@gmail.com> | 2010-05-21 12:01:57 (GMT) |
commit | 3d5c7b232657c06db1c85b9fe7093c4ccc4c54b1 (patch) | |
tree | d2095fa33aca320365a1ab3741dd084c0413ca16 | |
parent | aa559f4deebcd9b4e073193b94efa1481cb6bf17 (diff) | |
parent | 8b9f35c30792196419ec4c254ba844c5324acf83 (diff) |
Merge branch 'master' of http://git.sugarlabs.org/git/sugar-brain/mainline
-rwxr-xr-x | activity.py | 79 |
1 files changed, 70 insertions, 9 deletions
diff --git a/activity.py b/activity.py index 4f16635..e8714ed 100755 --- a/activity.py +++ b/activity.py @@ -6,15 +6,76 @@ import gtk class SugarBrainActivity(activity.Activity): def __init__(self, handle): activity.Activity.__init__(self, handle) - - # Creates the Toolbox. It contains the Activity Toolbar, which is the - # bar that appears on every Sugar window and contains essential - # functionalities, such as the 'Collaborate' and 'Close' buttons. - toolbox = activity.ActivityToolbox(self) - self.set_toolbox(toolbox) + toolbox=activity.ActivityToolbox(self) toolbox.show() + self.set_toolbox(toolbox) + #El Layout inicial + l1 = gtk.VBox() + + #encabezado = gtk.Label(' El encabezado, categoria y dificultad') + #encabezado.show() + + #Preparando el menu + menu = gtk.HBox() + alineacion = gtk.Alignment(0.5, 1, 0.5, 1) + categoriaL = gtk.Label("Categoria:") + categoriaL.show() + categorias = gtk.combo_box_new_text() + categorias.insert_text(0,"Todas") + categorias.insert_text(1,"Matematica") + categorias.insert_text(2,"Historia") + categorias.insert_text(3,"Castellano") + categorias.set_active(0) + categorias.show() + dificultadL = gtk.Label("Dificultad:") + dificultadL.show() + dificultades = gtk.combo_box_new_text() + dificultades.insert_text(0,"nivel 1") + dificultades.insert_text(1,"nivel 2") + dificultades.insert_text(2, "nivel 3") + dificultades.set_active(0) + dificultades.show() + iniciarB = gtk.Button("Inicio") + iniciarB.show() + finalizarB = gtk.Button("Terminar") + finalizarB.show() + menu.pack_start(alineacion) + menu.pack_start(categoriaL) + menu.pack_start(categorias) + menu.pack_start(dificultadL) + menu.pack_start(dificultades) + menu.pack_start(iniciarB) + menu.pack_start(finalizarB) + menu.show() + + + #contenedor = gtk.EventBox() + #imagen = gtk.Image() + #imagen.setFromFile("script01.svg") + #imagen.show() + + #respuesta + respuesta = gtk.HBox() + respL = gtk.Label("Respuesta:") + respL.show() + respT = gtk.Entry() + respT.show() + respB = gtk.Button("Respuesta") + respB.show() + sgteB = gtk.Button("Siguiente") + sgteB.show() + respuesta.pack_start(respL, False, False, 0) + respuesta.pack_start(respT) + respuesta.pack_start(respB) + respuesta.pack_start(sgteB) + respuesta.show() + - self.box_principal = gtk.VBox(False, 0) + #agrupo todo + #l1.pack_start(encabezado) + l1.pack_start(menu, False, False, 4) + l1.pack_start(respuesta, False, False, 360) + #l1.pack_start(imagen) - self.set_canvas(self.box_principal) - self.box_principal.show() + l1.show() + self.set_canvas(l1) |