From 3ebfdba1cf85c656045309212d6334c69d56c18b Mon Sep 17 00:00:00 2001 From: Cristhofer Travieso Date: Thu, 21 Jun 2012 22:15:18 +0000 Subject: Agrege los combox --- diff --git a/Activity.py b/Activity.py index 74b5b5e..9c202b4 100644 --- a/Activity.py +++ b/Activity.py @@ -106,7 +106,13 @@ class Canvas(gtk.VBox): def __init__(self): gtk.VBox.__init__(self) - self.add(gtk.Label("Of ")) - self.add(gtk.Label("to")) + self._hbox = gtk.HBox() + self.combo1 = gtk.Combo_box_new_text() + self.combo2 = gtk.Combo_box_new_text() + + self._hbox.add(gtk.Label("Of ")) + self._hbox.add(self.combo1) + self._hbox.add(gtk.Label("to")) + self._hbox.add(self.combo2) self.show_all() diff --git a/Convert.py b/Convert.py index 0d71366..a1ef537 100644 --- a/Convert.py +++ b/Convert.py @@ -19,7 +19,15 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA class convert(): - - def __init__(self, num, uni1, uni2 type_u, ): + def __init__(self, number, uni1, uni2, type_u, ): super(convert, self).__init__() + self.list = {"long": {}, + "vol": {}, + "area": {}, + "peso": {}, + "vel": {}, + "time": {}} + + self.a = number * self.list[type_u][uni1] + return self.a * self.list[type_u][uni2] -- cgit v0.9.1