diff options
Diffstat (limited to 'toolbar.py')
-rw-r--r-- | toolbar.py | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/toolbar.py b/toolbar.py new file mode 100644 index 0000000..5d4aab5 --- /dev/null +++ b/toolbar.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +import gtk +from sugar.activity import activity +class Toolbar(): + def __init__(self,view): + self.toolbox=activity.ActivityToolbox(view.controller.activity) + self.toolbox.show() + view.controller.activity.set_toolbox(self.toolbox) + #El Layout inicial + + #encabezado = gtk.Label(' El encabezado, categoria y dificultad') + #encabezado.show() + + #Preparando el menu + self.menu = gtk.HBox() + self.alineacion = gtk.Alignment(0.5, 1, 0.5, 1) + self.categoriaL = gtk.Label("Categoria:") + self.categoriaL.show() + self.categorias = gtk.combo_box_new_text() + self.categorias.insert_text(0,"Todas") + self.categorias.insert_text(1,"Matematica") + self.categorias.insert_text(2,"Historia") + self.categorias.insert_text(3,"Castellano") + self.categorias.set_active(0) + self.categorias.show() + self.dificultadL = gtk.Label("Dificultad:") + self.dificultadL.show() + self.dificultades = gtk.combo_box_new_text() + self.dificultades.insert_text(0,"1") + self.dificultades.insert_text(1,"2") + self.dificultades.insert_text(2,"3") + self.dificultades.set_active(0) + self.dificultades.show() + self.iniciarB = gtk.Button("Inicio") + self.iniciarB.connect("clicked", view.controller.newGame) + self.iniciarB.show() + self.finalizarB = gtk.Button("Terminar") + self.finalizarB.show() + self.menu.pack_start(self.alineacion) + self.menu.pack_start(self.categoriaL) + self.menu.pack_start(self.categorias) + self.menu.pack_start(self.dificultadL) + self.menu.pack_start(self.dificultades) + self.menu.pack_start(self.iniciarB) + self.menu.pack_start(self.finalizarB) + self.menu.show() |