[jokosher-devel] [patch] or [bug report] importing events from (non-audio) file
- From: chris procter <chris-procter talk21 com>
- To: Jokosher gnome <jokosher-devel-list gnome org>
- Subject: [jokosher-devel] [patch] or [bug report] importing events from (non-audio) file
- Date: Wed, 19 Jul 2006 10:29:58 +0100 (BST)
Hi,
Ok so with svn access I shouldn't be posting patches
to the list but given the serious but non-fatal nature
of the bug, the closeness to release, and the
rubbishness of my patch I thought I'd get a second
opinion.
Essentially when you "Import Audio File" it does no
checking on the file and will let you import a text
file for example. I've logged this as bug 138
(http://jokosher.python-hosting.com/ticket/138) .
My patch then just deletes the erroneous event out of
hand, this sucks pretty damn hard but gstreamer
reports the error messages asynchronously in a
different thread making raise/catching the eror
impossible, and the Event object has no communication
with the gui so forcing a pop-up is impossible, so I
cant see a way of catching the error and reporting to
the user.
So heres my crude patch and if someone can provide
some pointers on how to make it halfway decent that
would be great.
chris
___________________________________________________________
All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine
http://uk.docs.yahoo.com/nowyoucan.html
Index: Event.py
===================================================================
--- Event.py (revision 465)
+++ Event.py (working copy)
@@ -394,6 +394,10 @@
except:
# no size available yet
pass
+
+ def bus_error(self, bus, message):
+ print "Automatically deleted event following an error"
+ self.Delete()
def GenerateWaveform(self):
""" Renders the level information for the GUI
@@ -410,6 +414,7 @@
self.bus.connect("message::element", self.bus_message)
self.bus.connect("message::state-changed", self.bus_message_statechange)
self.bus.connect("message::eos", self.bus_eos)
+ self.bus.connect("message::error", self.bus_error)
self.levels = []
self.isLoading = True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]