Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofert97@gmail.com>2012-06-21 22:15:18 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2012-06-21 22:15:18 (GMT)
commit3ebfdba1cf85c656045309212d6334c69d56c18b (patch)
tree42026320e30576491f007cc5746eb4d52e38bba0
parent80e766fafd419a6b91daef2dbb71c157e2f17064 (diff)
Agrege los combox
-rw-r--r--Activity.py10
-rw-r--r--Convert.py12
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()
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]