[pitivi] mediafilespreviewer: Clarify what parameter the PreviewWidget constructor expects
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mediafilespreviewer: Clarify what parameter the PreviewWidget constructor expects
- Date: Sun, 2 Mar 2014 12:38:09 +0000 (UTC)
commit 06660905dd34d63a76f058b4cfaae4a691ad28b9
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Mar 1 16:22:34 2014 +0100
mediafilespreviewer: Clarify what parameter the PreviewWidget constructor expects
pitivi/mainwindow.py | 4 ++--
pitivi/mediafilespreviewer.py | 10 ++++++++--
pitivi/medialibrary.py | 6 +++---
pitivi/viewer.py | 2 +-
4 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index aca8204..7352ac7 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -1006,7 +1006,7 @@ class PitiviMainWindow(Gtk.Window, Loggable):
chooser = Gtk.FileChooserWidget(action=Gtk.FileChooserAction.OPEN)
chooser.set_select_multiple(False)
- previewer = PreviewWidget(self.app)
+ previewer = PreviewWidget(self.settings)
chooser.set_preview_widget(previewer)
chooser.set_use_preview_label(False)
chooser.connect('update-preview', previewer.add_preview_request)
@@ -1268,7 +1268,7 @@ class PreviewAssetWindow(Gtk.Window):
self.set_type_hint(Gdk.WindowTypeHint.UTILITY)
self.set_transient_for(main_window)
- self._previewer = PreviewWidget(main_window, minimal=True)
+ self._previewer = PreviewWidget(main_window.settings, minimal=True)
self.add(self._previewer)
self._previewer.previewUri(self._asset.get_id())
self._previewer.show()
diff --git a/pitivi/mediafilespreviewer.py b/pitivi/mediafilespreviewer.py
index b791814..5988d52 100644
--- a/pitivi/mediafilespreviewer.py
+++ b/pitivi/mediafilespreviewer.py
@@ -69,15 +69,21 @@ acceptable_tags = [
class PreviewWidget(Gtk.Grid, Loggable):
+ """
+ Widget for displaying a GStreamer sink with playback controls.
- def __init__(self, instance, minimal=False):
+ @ivar settings: The settings of the app.
+ @type settings: L{GlobalSettings}
+ """
+
+ def __init__(self, settings, minimal=False):
Gtk.Grid.__init__(self)
Loggable.__init__(self)
self.log("Init PreviewWidget")
self.connect('destroy', self._destroy_cb)
- self.settings = instance.settings
+ self.settings = settings
self.preview_cache = {}
self.preview_cache_errors = {}
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 046aa1e..f2cd424 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -131,13 +131,13 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
'play': (GObject.SignalFlags.RUN_LAST, None,
(GObject.TYPE_PYOBJECT,))}
- def __init__(self, instance, uiman):
+ def __init__(self, app, uiman):
Gtk.VBox.__init__(self)
Loggable.__init__(self)
self.pending_rows = []
- self.app = instance
+ self.app = app
self._errors = []
self._missing_thumbs = []
self._project = None
@@ -459,7 +459,7 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
self._importDialog.set_current_folder(self.app.settings.lastImportFolder)
self._importDialog.connect('response', self._dialogBoxResponseCb)
self._importDialog.connect('close', self._dialogBoxCloseCb)
- previewer = PreviewWidget(self.app)
+ previewer = PreviewWidget(self.app.settings)
self._importDialog.set_preview_widget(previewer)
self._importDialog.set_use_preview_label(False)
self._importDialog.connect('update-preview', previewer.add_preview_request)
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 4ba5fd2..16063a2 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -787,7 +787,7 @@ class TransformationBox():
class ViewerWidget(Gtk.AspectFrame, Loggable):
"""
- Widget for displaying properly GStreamer video sink
+ Widget for displaying a GStreamer video sink.
@ivar settings: The settings of the application.
@type settings: L{GlobalSettings}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]