Posted by John Thu 7th Dec 2006 22:20 - Syntax is Diff - 34 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
-
Index: TimeLineBar.py
-
===================================================================
-
--- TimeLineBar.py (revision 994)
-
+++ TimeLineBar.py (working copy)
-
@@ -14,6 +14,7 @@
-
import gettext
-
import os
-
import Globals
-
+import gobject
-
-
_=gettext.gettext
-
-
@@ -95,7 +96,7 @@
-
self.add(self.hbox)
-
self.headerhbox.connect("check-resize", self.projectview.Update)
-
self.connect("size-allocate", self.OnAllocate)
-
- self.hbox.pack_start(self.timeline)
-
+ self.hbox.pack_start(self.timeline)
-
-
#_____________________________________________________________________
-
-
@@ -175,12 +176,22 @@
-
if self.bpmeditPacked:
-
self.bpmframe.remove(self.bpmedit)
-
#FIXME: find a better way to do project.PrepareClick() it doesn't take a really long time with large bpm
-
- newbpm = float(self.bpmedit.get_text())
-
- if newbpm > 400:
-
- newbpm = 400.0
-
- self.project.transport.SetBPM(newbpm)
-
- self.project.PrepareClick()
-
+ oldbpm = self.bpmedit.get_text()
-
-
+ if oldbpm:
-
+ newbpm = float(oldbpm)
-
+ if newbpm > 400:
-
+ newbpm = 400.0
-
+
-
+ self.project.transport.SetBPM(newbpm)
-
+ self.project.PrepareClick()
-
+
-
+ tempstring = _("Enter a correct tempo value")
-
+
-
+ tempid = self.mainview.SetStatusBar(tempstring)
-
+
-
+ gobject.timeout_add(1500, self.mainview.ClearStatusBar, tempid)
-
+
-
self.bpmframe.add(self.bpmeventbox)
-
self.bpmedit.destroy()
-
self.bpmframe.show_all()
-
@@ -209,7 +220,13 @@
-
denom=int(sig[1])
-
except (ValueError,IndexError):
-
denom=self.project.transport.meter_denom
-
-
-
+
-
+ if nom < denom:
-
+ self.sigframe.add(self.sigeventbox)
-
+ self.sigedit.destroy()
-
+ self.sigframe.show_all()
-
+ self.sigeditPacked = False
-
+
-
self.project.transport.SetMeter(nom, denom)
-
-
self.sigframe.add(self.sigeventbox)
-
PermaLink to this entry https://pastebin.co.uk/7172
Posted by John Thu 7th Dec 2006 22:20 - Syntax is Diff - 34 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers