[pitivi: 3/13] Fix indentation in pitivi/ui/sourcelist.py.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 3/13] Fix indentation in pitivi/ui/sourcelist.py.
- Date: Mon, 16 Mar 2009 08:04:05 -0400 (EDT)
commit 472d6c41fab5ec46901ade5bc8d9ce3a2fadbc46
Author: Alessandro Decina <alessandro decina collabora co uk>
Date: Wed Mar 11 15:03:45 2009 +0100
Fix indentation in pitivi/ui/sourcelist.py.
---
pitivi/ui/sourcelist.py | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/pitivi/ui/sourcelist.py b/pitivi/ui/sourcelist.py
index 3092663..8561338 100644
--- a/pitivi/ui/sourcelist.py
+++ b/pitivi/ui/sourcelist.py
@@ -78,25 +78,29 @@ ui = '''
def beautify_stream(stream):
if type(stream) == AudioStream:
- if stream.raw:
- templ = ngettext("<b>Audio:</b> %d channel at %d <i>Hz</i> (%d <i>bits</i>)",
- "<b>Audio:</b> %d channels at %d <i>Hz</i> (%d <i>bits</i>)",
- stream.channels)
- templ = templ % (stream.channels, stream.rate, stream.width)
- return templ
- return _("<b>Unknown Audio format:</b> %s") % stream.audiotype
+ if stream.raw:
+ templ = ngettext("<b>Audio:</b> %d channel at %d <i>Hz</i> (%d <i>bits</i>)",
+ "<b>Audio:</b> %d channels at %d <i>Hz</i> (%d <i>bits</i>)",
+ stream.channels)
+ try:
+ templ = templ % (stream.channels, stream.rate, stream.width)
+ except TypeError:
+ import pdb; pdb.set_trace()
+ return templ
+
+ return _("<b>Unknown Audio format:</b> %s") % stream.audiotype
elif type(stream) == VideoStream:
- if stream.raw:
- if stream.framerate.num:
- templ = _("<b>Video:</b> %d x %d <i>pixels</i> at %.2f<i>fps</i>")
- templ = templ % (stream.par * stream.width , stream.height,
- float(stream.framerate))
- else:
- templ = _("<b>Image:</b> %d x %d <i>pixels</i>")
- templ = templ % (stream.par * stream.width, stream.height)
- return templ
- return _("<b>Unknown Video format:</b> %s") % stream.videotype
+ if stream.raw:
+ if stream.framerate.num:
+ templ = _("<b>Video:</b> %d x %d <i>pixels</i> at %.2f<i>fps</i>")
+ templ = templ % (stream.par * stream.width , stream.height,
+ float(stream.framerate))
+ else:
+ templ = _("<b>Image:</b> %d x %d <i>pixels</i>")
+ templ = templ % (stream.par * stream.width, stream.height)
+ return templ
+ return _("<b>Unknown Video format:</b> %s") % stream.videotype
elif type(stream) == TextStream:
return _("<b>Text:</b> %s") % stream.texttype
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]