diff options
author | Alfonso <Poncho@localhost.localdomain> | 2010-05-21 11:51:35 (GMT) |
---|---|---|
committer | Alfonso <Poncho@localhost.localdomain> | 2010-05-21 11:51:35 (GMT) |
commit | 8b9f35c30792196419ec4c254ba844c5324acf83 (patch) | |
tree | 14ca773ab3f11259e0a0327098cac3518fd589d0 | |
parent | 20a8eee036728857e9d293aad80d40c2de66cb58 (diff) |
anhadida interfaz grafica similar a gbrainy. Escucho sugerencias
-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) |