diff options
-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] |