[pitivi] viewer: Make target a property to clarify what it represents
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] viewer: Make target a property to clarify what it represents
- Date: Tue, 4 Feb 2014 21:55:54 +0000 (UTC)
commit 3ed284d54d4151d91596504fc54509011328015b
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Jan 13 14:27:31 2014 +0100
viewer: Make target a property to clarify what it represents
pitivi/viewer.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 65a3e2b..7cbdf33 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -103,7 +103,6 @@ class ViewerContainer(Gtk.VBox, Loggable):
self._haveUI = False
self._createUi()
- self.target = self.internal
self.undock_action = undock_action
if undock_action:
self.undock_action.connect("activate", self._toggleDocked)
@@ -111,6 +110,13 @@ class ViewerContainer(Gtk.VBox, Loggable):
if not self.settings.viewerDocked:
self.undock()
+ @property
+ def target(self):
+ if self.docked:
+ return self.internal
+ else:
+ return self.external
+
def setPipeline(self, pipeline, position=None):
"""
Set the Viewer to the given Pipeline.
@@ -362,7 +368,6 @@ class ViewerContainer(Gtk.VBox, Loggable):
self.docked = False
self.settings.viewerDocked = False
self.undock_action.set_label(_("Dock Viewer"))
- self.target = self.external
self.remove(self.buttons_container)
self.external_vbox.pack_end(self.buttons_container, False, False, 0)
@@ -392,7 +397,6 @@ class ViewerContainer(Gtk.VBox, Loggable):
self.docked = True
self.settings.viewerDocked = True
self.undock_action.set_label(_("Undock Viewer"))
- self.target = self.internal
self.fullscreen_button.destroy()
self.external_vbox.remove(self.buttons_container)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]