Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/objects/Menu.py
diff options
context:
space:
mode:
Diffstat (limited to 'objects/Menu.py')
-rw-r--r--objects/Menu.py35
1 files changed, 24 insertions, 11 deletions
diff --git a/objects/Menu.py b/objects/Menu.py
index f2222f8..84ab5b8 100644
--- a/objects/Menu.py
+++ b/objects/Menu.py
@@ -22,6 +22,9 @@ class Menu:
# h4 = gtk.HBox()
# h4.show()
+ self.adj = None
+ self.history = None
+
#Deshacer y borrar
herr = gtk.Frame(_("Tools"))
herr.show()
@@ -50,20 +53,15 @@ class Menu:
h = gtk.Frame(_("History"))
h.show()
h3.add(h)
- cont2 = gtk.VBox()
- cont2.show()
- h.add(cont2)
+ self.cont2 = gtk.VBox()
+ self.cont2.show()
+ h.add(self.cont2)
self.undo = gtk.Button(_("Undo"))
self.undo.show()
- cont2.add(self.undo)
+ self.cont2.add(self.undo)
- #gtk.Adjustment(value=0, lower=0, upper=0, step_incr=0, page_incr=0, page_size=0)
- self.adj = gtk.Adjustment(0, 0, 0, 1, 1)
- self.history = gtk.HScale(self.adj)
- self.history.set_digits(0)
- self.history.show()
- cont2.add(self.history)
+ self.cargarAdj(0, 0, 0, 1, 1)
z = gtk.Frame(_("Zoom"))
z.show()
@@ -150,4 +148,19 @@ class Menu:
def __clicBorrar(self, object, data):
for f in self.borrarListeners:
- f(-1) \ No newline at end of file
+ f(-1)
+
+
+ def cargarAdj(self, value=0, lower=0, upper=0, step_incr=0, page_incr=0, page_size=0):
+ #gtk.Adjustment(value=0, lower=0, upper=0, step_incr=0, page_incr=0, page_size=0)
+ if self.adj!=None:
+ del self.adj
+ if self.history !=None:
+ self.cont2.remove(self.history)
+ del self.history
+
+ self.adj = gtk.Adjustment(value, lower, upper, step_incr, page_incr, page_size)
+ self.history = gtk.HScale(self.adj)
+ self.history.set_digits(0)
+ self.history.show()
+ self.cont2.add(self.history) \ No newline at end of file