pitivi r1408 - trunk/pitivi/ui
- From: edwardrv svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1408 - trunk/pitivi/ui
- Date: Fri, 28 Nov 2008 17:35:58 +0000 (UTC)
Author: edwardrv
Date: Fri Nov 28 17:35:57 2008
New Revision: 1408
URL: http://svn.gnome.org/viewvc/pitivi?rev=1408&view=rev
Log:
Got rid of some instance.PiTiVi accesses
Modified:
trunk/pitivi/ui/timeline.py
trunk/pitivi/ui/timelineobject.py
trunk/pitivi/ui/track.py
Modified: trunk/pitivi/ui/timeline.py
==============================================================================
--- trunk/pitivi/ui/timeline.py (original)
+++ trunk/pitivi/ui/timeline.py Fri Nov 28 17:35:57 2008
@@ -228,13 +228,16 @@
Zoomable.zoomOut()
def deleteSelected(self, unused_action):
- instance.PiTiVi.current.timeline.deleteSelection()
+ if self.timeline:
+ self.timeline.deleteSelection()
def unlinkSelected(self, unused_action):
- instance.PiTiVi.current.timeline.unlinkSelection()
+ if self.timeline:
+ self.timeline.unlinkSelection()
def relinkSelected(self, unused_action):
- instance.PiTiVi.current.timeline.relinkSelection()
+ if self.timeline:
+ self.timeline.relinkSelection()
## PlayGround timeline position callback
Modified: trunk/pitivi/ui/timelineobject.py
==============================================================================
--- trunk/pitivi/ui/timelineobject.py (original)
+++ trunk/pitivi/ui/timelineobject.py Fri Nov 28 17:35:57 2008
@@ -3,7 +3,6 @@
import gtk
import os.path
import pango
-import pitivi.instance as instance
from urllib import unquote
from pitivi.receiver import receiver, handler
from view import View
@@ -19,10 +18,10 @@
_cursor = ARROW
def drag_start(self):
- instance.PiTiVi.current.timeline.disableEdgeUpdates()
+ self._view.timeline.disableEdgeUpdates()
def drag_end(self):
- instance.PiTiVi.current.timeline.enableEdgeUpdates()
+ self._view.timeline.enableEdgeUpdates()
def set_pos(self, item, pos):
self._view.element.snapStartDurationTime(max(
@@ -35,8 +34,9 @@
element = receiver()
- def __init__(self, element, **kwargs):
+ def __init__(self, element, timeline, **kwargs):
self.element = element
+ self.timeline = timeline
goocanvas.Rect.__init__(self,
width=5,
fill_color_rgba=0x00000022,
@@ -86,16 +86,17 @@
mode = 1
elif self._last_event.get_state() & gtk.gdk.CONTROL_MASK:
mode = 2
- instance.PiTiVi.current.timeline.setSelectionToObj(
+ self._view.timeline.setSelectionToObj(
self._view.element, mode)
- def __init__(self, element, composition):
+ def __init__(self, element, composition, timeline):
goocanvas.Group.__init__(self)
View.__init__(self)
Zoomable.__init__(self)
self.element = element
self.comp = composition
+ self.timeline = timeline
self.bg = goocanvas.Rect(
height=self.__HEIGHT__,
@@ -110,9 +111,9 @@
fill_color_rgba=0x000000FF,
alignment=pango.ALIGN_LEFT)
- self.start_handle = StartHandle(element,
+ self.start_handle = StartHandle(element, timeline,
height=self.__HEIGHT__)
- self.end_handle = EndHandle(element,
+ self.end_handle = EndHandle(element, timeline,
height=self.__HEIGHT__)
for thing in (self.bg, self.start_handle, self.end_handle, self.name):
Modified: trunk/pitivi/ui/track.py
==============================================================================
--- trunk/pitivi/ui/track.py (original)
+++ trunk/pitivi/ui/track.py Fri Nov 28 17:35:57 2008
@@ -2,7 +2,6 @@
from timelineobject import TimelineObject
from pitivi.timeline.objects import MEDIA_TYPE_VIDEO
from pitivi.receiver import receiver, handler
-import pitivi.instance as instance
import goocanvas
# TODO: layer managment controls
@@ -12,15 +11,16 @@
comp = receiver()
- def __init__(self, comp=None):
+ def __init__(self, comp=None, timeline=None):
goocanvas.Group.__init__(self)
Zoomable.__init__(self)
self.widgets = {}
self.comp = comp
+ self.timeline = timeline
@handler(comp, "source-added")
def _objectAdded(self, unused_timeline, element):
- w = TimelineObject(element, self.comp)
+ w = TimelineObject(element, self.comp, self.timeline)
self.widgets[element] = w
self.add_child(w)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]