[pitivi] ui: cleanup imports
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui: cleanup imports
- Date: Sun, 2 Mar 2014 12:38:34 +0000 (UTC)
commit 830ccb8c3b42a33c01a819c70063f9f3b73df5a6
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Mar 1 17:08:31 2014 +0100
ui: cleanup imports
pitivi/utils/ui.py | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/utils/ui.py b/pitivi/utils/ui.py
index c9b30ca..6a9e741 100644
--- a/pitivi/utils/ui.py
+++ b/pitivi/utils/ui.py
@@ -27,8 +27,13 @@ classes that help with UI drawing around the application
"""
-from decimal import Decimal
+import cairo
+import decimal
+import os
+import urllib
+
from gettext import ngettext, gettext as _
+
from gi.repository import Clutter
from gi.repository import Cogl
from gi.repository import GLib
@@ -39,9 +44,6 @@ from gi.repository import Gst
from gi.repository import Gtk
from gi.repository.GstPbutils import DiscovererVideoInfo, DiscovererAudioInfo,\
DiscovererStreamInfo, DiscovererSubtitleInfo, DiscovererInfo
-from urllib import unquote
-import cairo
-import os
from pitivi.utils.loggable import doLog, ERROR
@@ -50,6 +52,7 @@ from pitivi.utils.loggable import doLog, ERROR
##
# UI pixels information constants
##
+
LAYER_HEIGHT_EXPANDED = 50
LAYER_HEIGHT_COLLAPSED = 15
TRACK_SPACING = 8
@@ -254,9 +257,9 @@ def info_name(info):
@type info: L{GES.Asset} or L{DiscovererInfo}
"""
if isinstance(info, GES.Asset):
- filename = unquote(os.path.basename(info.get_id()))
+ filename = urllib.unquote(os.path.basename(info.get_id()))
elif isinstance(info, DiscovererInfo):
- filename = unquote(os.path.basename(info.get_uri()))
+ filename = urllib.unquote(os.path.basename(info.get_uri()))
else:
raise Exception("Unsupported argument type: %s" % type(info))
return GLib.markup_escape_text(filename)
@@ -422,7 +425,7 @@ def get_value_from_model(model, key):
if row[1] == key:
return str(row[0])
if isinstance(key, Gst.Fraction):
- return "%.3f" % Decimal(float(key.num) / key.denom)
+ return "%.3f" % decimal.Decimal(float(key.num) / key.denom)
return str(key)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]