diff options
author | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-06-21 22:15:18 (GMT) |
---|---|---|
committer | Cristhofer Travieso <cristhofert97@gmail.com> | 2012-06-21 22:15:18 (GMT) |
commit | 3ebfdba1cf85c656045309212d6334c69d56c18b (patch) | |
tree | 42026320e30576491f007cc5746eb4d52e38bba0 | |
parent | 80e766fafd419a6b91daef2dbb71c157e2f17064 (diff) |
Agrege los combox
-rw-r--r-- | Activity.py | 10 | ||||
-rw-r--r-- | Convert.py | 12 |
2 files changed, 18 insertions, 4 deletions
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() @@ -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] |