[pitivi: 12/16] Use os.path.join in EncodingDialog
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 12/16] Use os.path.join in EncodingDialog
- Date: Tue, 7 Jun 2011 16:27:45 +0000 (UTC)
commit 2ad440d9cea4cd5e5001977a87bc5dbe77232ced
Author: Alex BÄ?luÈ? <alexandru balut gmail com>
Date: Wed May 25 21:03:08 2011 +0200
Use os.path.join in EncodingDialog
pitivi/ui/encodingdialog.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index a181e16..3829fd6 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -43,6 +43,7 @@ from pitivi.ui.common import\
get_combo_value,\
set_combo_value
+
def beautify_factoryname(factory):
"""Returns a nice name for the specified gst.ElementFactory instance."""
# only replace lowercase versions of "format", "video", "audio"
@@ -54,6 +55,7 @@ def beautify_factoryname(factory):
name = name.replace(word, "")
return " ".join(word for word in name.split())
+
def extension_for_muxer(muxer):
"""Returns the file extension appropriate for the specified muxer."""
exts = {
@@ -86,6 +88,7 @@ def extension_for_muxer(muxer):
"webmmux": "webm"}
return exts.get(muxer)
+
def factorylist(factories):
"""Create a gtk.ListStore() of sorted, beautified factory names.
@@ -121,7 +124,8 @@ class EncodingDialog(Renderer, Loggable):
self.builder.connect_signals(self)
# UI widgets
- self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
+ icon = os.path.join(configure.get_pixmap_dir(), "pitivi-render-16.png")
+ self.window.set_icon_from_file(icon)
# FIXME: re-enable this widget when bug #637078 is implemented
self.selected_only_button.destroy()
@@ -317,7 +321,8 @@ class EncodingDialog(Renderer, Loggable):
dialog.window.destroy()
def _renderButtonClickedCb(self, unused_button):
- self.outfile = self.filebutton.get_uri() + "/" + self.fileentry.get_text()
+ self.outfile = os.path.join(self.filebutton.get_uri(),
+ self.fileentry.get_text())
self.progress = EncodingProgressDialog(self.app, self)
self.window.hide() # Hide the rendering settings dialog while rendering
self.progress.window.show()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]