[pitivi] ui/clipproperties.py: Do not use receiver
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui/clipproperties.py: Do not use receiver
- Date: Wed, 22 Sep 2010 13:46:28 +0000 (UTC)
commit 1d83423b61f9668a3d7ee53dc89d9d1b66791ee9
Author: Thibault Saunier <tsaunier gnome org>
Date: Wed Sep 1 14:14:46 2010 +0200
ui/clipproperties.py: Do not use receiver
pitivi/ui/clipproperties.py | 34 +++++++++++++++++++++++-----------
1 files changed, 23 insertions(+), 11 deletions(-)
---
diff --git a/pitivi/ui/clipproperties.py b/pitivi/ui/clipproperties.py
index 5e5fe54..33aad01 100644
--- a/pitivi/ui/clipproperties.py
+++ b/pitivi/ui/clipproperties.py
@@ -32,7 +32,6 @@ import dnd
from gettext import gettext as _
from pitivi.log.loggable import Loggable
-from pitivi.receiver import receiver, handler
from pitivi.timeline.track import TrackEffect
from pitivi.stream import VideoStream
@@ -61,7 +60,7 @@ class ClipProperties(gtk.VBox, Loggable):
self.app = instance
self.settings = instance.settings
- self.project = None
+ self._project = None
self.info_bar_box = gtk.VBox()
self.effect_properties_handling = EffectsPropertiesHandling(instance.action_log)
@@ -74,12 +73,16 @@ class ClipProperties(gtk.VBox, Loggable):
self.effect_expander.show()
self.show()
- def _setProject(self):
- if self.project:
- self.effect_expander.connectTimelineSelection(self.project.timeline)
- self.effect_properties_handling.pipeline = self.project.pipeline
+ def _setProject(self, project):
+ self._project = project
+ if project:
+ self.effect_expander.connectTimelineSelection(self._project.timeline)
+ self.effect_properties_handling.pipeline = self._project.pipeline
- project = receiver(_setProject)
+ def _getProject(self):
+ return self._project
+
+ project = property(_getProject, _setProject)
def addInfoBar(self, text):
info_bar = gtk.InfoBar()
@@ -116,6 +119,7 @@ class EffectProperties(gtk.Expander):
self.clip_properties = clip_properties
self._info_bar = None
self._config_ui_h_pos = {}
+ self._timeline = None
self.VContent = gtk.VPaned()
self.add(self.VContent)
@@ -198,12 +202,20 @@ class EffectProperties(gtk.Expander):
self.VContent.pack1(self.table, resize=True, shrink=False)
self._showInfoBar()
- self.VContent.show()
+ self.Vcontent.show()
+
+ def _getTimeline(self):
+ return self._timeline
+
+ def _setTimeline(self, timeline):
+ self._timeline = timeline
+ if timeline:
+ self.timeline.connect('selection-changed', self._selectionChangedCb)
+
+ timeline = property(_getTimeline, _setTimeline)
- timeline = receiver()
- @handler(timeline, "selection-changed")
- def selectionChangedCb(self, timeline):
+ def _selectionChangedCb(self, timeline):
for timeline_object in self.timeline_objects:
timeline_object.disconnect_by_func(self._trackObjectAddedCb)
timeline_object.disconnect_by_func(self._trackRemovedRemovedCb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]