[jokosher-devel] Small patch to fix bug #87780 - Jokosher crashes when recording from pause



Oops, forgot to attach file...

---------- Forwarded message ----------
From: Knut Erik Teigen <knutert gmail com >
Date: Jul 20, 2007 5:32 PM
Subject: Small patch to fix bug #87780 - Jokosher crashes when recording from pause
To: jokosher-devel-list gnome org

Hey,

Recording from pause should be an option, since sometimes it is easier to just listen through the
track to decide where to record from. Now, you have to listen, press stop and then seek to that position.
So when pressing record, I added a check to see if the project is paused. If it is,
the current position is stored, the project stopped, then moved to the current position
and then the Record function is continued.

Not sure if this is the most elegant way to do it, but it works..:)

Regards,
Knut Erik Teigen
Index: JokosherApp.py
===================================================================
--- JokosherApp.py	(revision 1446)
+++ JokosherApp.py	(working copy)
@@ -407,6 +407,12 @@
 		Parameters:
 			widget -- reserved for GTK callbacks, don't use it explicitly.
 		"""
+
+                if self.isPaused:
+                        pos = self.project.transport.GetPosition()
+                        self.project.Stop()
+                        self.project.transport.SetPosition(pos)
+
 		# toggling the record button invokes this function so we use the settingButtons var to 
 		# indicate that we're just changing the GUI state and dont need to do anything code-wise
 		if self.settingButtons:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]