# HG changeset patch # User drewp@bigasterisk.com # Date 1213571508 0 # Node ID fb888a771b422aa05e5c1e592c6228ad26e71486 # Parent c5db6b33203079ce999c5b2b21c0e924950620a5 curvecalc now starts up showing the whole time range diff -r c5db6b332030 -r fb888a771b42 bin/curvecalc --- a/bin/curvecalc Sun Jun 15 01:55:46 2008 +0000 +++ b/bin/curvecalc Sun Jun 15 23:11:48 2008 +0000 @@ -433,6 +433,7 @@ maxtime = wavelength(musicfilename) dispatcher.send("max time",maxtime=maxtime) dispatcher.connect(lambda: maxtime, "get max time",weak=0) +dispatcher.send("show all") curveset.load(basename=os.path.join(showconfig.curvesDir(), showconfig.songFilenameFromURI(song)), skipMusic=opts.skip_music) @@ -461,7 +462,7 @@ root.bind("", lambda evt: dispatcher.send('reload all subs')) create_status_lines(root) -for helpline in ["Bindings: C-s save subterms; Esc see current time; S-Esc see curtime to end; Mousewheel zoom; C-p play/pause music at mouse", +for helpline in ["Bindings: C-s save subterms; Esc see current time; S-Esc see curtime to end; C-Esc show all; Mousewheel zoom; C-p play/pause music at mouse", "Curve point bindings: B1 drag point; C-B1 curve add point; S-B1 sketch points; Del selected points; 1..5 add point at time; B1 drag select points", "Available in functions: nsin/ncos period=amp=1; within(a,b) bef(x) aft(x) compare to time; smoove(x) cubic smoothstep; chan(name); curvename(t) eval curve"]: tk.Label(root,text=helpline, font="Helvetica -12 italic", diff -r c5db6b332030 -r fb888a771b42 light9/curve.py --- a/light9/curve.py Sun Jun 15 01:55:46 2008 +0000 +++ b/light9/curve.py Sun Jun 15 23:11:48 2008 +0000 @@ -183,6 +183,7 @@ self.bind("", lambda ev: dispatcher.send("see time until end", t=self.current_time())) + self.bind("", lambda ev: dispatcher.send("show all")) self.bind("", lambda ev: dispatcher.send("music seek", t=self.world_from_screen(ev.x,0)[0])) diff -r c5db6b332030 -r fb888a771b42 light9/zoomcontrol.py --- a/light9/zoomcontrol.py Sun Jun 15 01:55:46 2008 +0000 +++ b/light9/zoomcontrol.py Sun Jun 15 23:11:48 2008 +0000 @@ -81,6 +81,7 @@ dispatcher.connect(self.zoom_about_mouse, "zoom about mouse") dispatcher.connect(self.see_time, "see time") dispatcher.connect(self.see_time_until_end, "see time until end") + dispatcher.connect(self.show_all, "show all") dispatcher.connect(self.zoom_to_range, "zoom to range") self.created=1 def zoom_to_range(self,start,end): @@ -88,6 +89,11 @@ self.end = end self.redrawzoom() + def show_all(self): + self.start = self.mintime + self.end = self.maxtime + self.redrawzoom() + def zoom_about_mouse(self,t,factor): self.start = t - factor*(t-self.start) self.end = t + factor*(self.end-t)