blob: fd0d81c3e5bff2b279517156455fa920c5c71cd5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
'''
Created on Feb 4, 2013
@author: Samu
'''
import gtk
from gui.Ejercitario import Ejercitario
class ContenedorTemas(gtk.HBox):
# This is a callback function. The data arguments are ignored
# in this example. More on callbacks below.
def __init__(self, id_tema, descripcion, ventana_padre, vista_temas, cliente_WS):
# create a new window
super(ContenedorTemas, self).__init__()
self.ventana_padre = ventana_padre
self.vista_temas = vista_temas
self.cliente_WS = cliente_WS
label_descripcion = gtk.Label(descripcion)
boton = gtk.Button("Comenzar")
boton.connect("clicked", self.__comenzar_cb)
self.add(label_descripcion)
self.add(boton)
def __comenzar_cb(self, boton):
self.ventana_padre.remove(self.vista_temas)
ejercitario = Ejercitario(self.cliente_WS)
self.ventana_padre.add (ejercitario)
|