pitivi r1128 - in branches/SOC_2008_BLEWIS: . pitivi/ui



Author: blewis
Date: Sun Jun  1 22:32:27 2008
New Revision: 1128
URL: http://svn.gnome.org/viewvc/pitivi?rev=1128&view=rev

Log:
* pitivi/ui/timelineobjects.py:
uncommented some code and pitivi still doesn't crash. timeline now set
to default width


Modified:
   branches/SOC_2008_BLEWIS/ChangeLog
   branches/SOC_2008_BLEWIS/pitivi/ui/timelineobjects.py

Modified: branches/SOC_2008_BLEWIS/pitivi/ui/timelineobjects.py
==============================================================================
--- branches/SOC_2008_BLEWIS/pitivi/ui/timelineobjects.py	(original)
+++ branches/SOC_2008_BLEWIS/pitivi/ui/timelineobjects.py	Sun Jun  1 22:32:27 2008
@@ -116,24 +116,22 @@
         self.project_signals = SignalGroup()
         # FIXME: do we need this? or will the newproject sginal implicitly
         # handle this???
-#        self._connectToTimeline(instance.PiTiVi.current.timeline)
-#        instance.PiTiVi.connect("new-project-loaded",
-#            self._newProjectLoadedCb)
-#        instance.PiTiVi.connect("project-closed", self._projectClosedCb)
-#        instance.PiTiVi.connect("new-project-loading",
-#            self._newProjectLoadingCb)
-#        instance.PiTiVi.connect("new-project-failed",
-#            self._newProjectFailedCb)
-#
+        self._connectToTimeline(instance.PiTiVi.current.timeline)
+        instance.PiTiVi.connect("new-project-loaded",
+            self._newProjectLoadedCb)
+        instance.PiTiVi.connect("project-closed", self._projectClosedCb)
+        instance.PiTiVi.connect("new-project-loading",
+            self._newProjectLoadingCb)
+        instance.PiTiVi.connect("new-project-failed",
+            self._newProjectFailedCb)
+
 #        # size
 #        self.width = int(DEFAULT_WIDTH)
 #        self.height = int(DEFAULT_HEIGHT)
 #        self.realWidth = 0 # displayed width of the layout
 #        self.childheight = int(DEFAULT_SIMPLE_ELEMENT_HEIGHT)
 #        self.childwidth = int(DEFAULT_SIMPLE_ELEMENT_WIDTH)
-#        self.set_size_request(int(MINIMUM_WIDTH), int(MINIMUM_HEIGHT))
-#        self.set_property("width", int(DEFAULT_WIDTH))
-#        self.set_property("height", int(DEFAULT_HEIGHT))
+        self.set_size_request(int(MINIMUM_WIDTH), int(MINIMUM_HEIGHT))
 #
 #        # drag and drop
 #        self.drag_dest_set(gtk.DEST_DEFAULT_DROP | gtk.DEST_DEFAULT_MOTION,
@@ -198,19 +196,9 @@
         return True
     
     def _swap_right(self):
-        #if self.left:
-        #    self.right.props.x = (self.left.x + self.left.width + 
-        #    self.items.spacing)
-        #else:
-        #    self.right.props.x = 0
         self._swap(self.draging, self.right)
 
     def _swap_left(self):
-        #if self.right:
-        #    self.left.props.x = (self.right.props.x + self.right.props.width 
-        #       + self.items.spacing)
-        #else:
-        #    self.right.props.x = self.items.width - self.right.props.width
         self._swap(self.draging, self.left)
 
     def _swap(self, a, b):
@@ -244,9 +232,9 @@
     def _connectToTimeline(self, timeline):
         self.timeline = timeline
         self.condensed = self.timeline.videocomp.condensed
-        self.project_signals.connect(self.timeline.videocomp,
-                                     "condensed-list-changed",
-                                     None, self._condensedListChangedCb)
+        #self.project_signals.connect(self.timeline.videocomp,
+        #                             "condensed-list-changed",
+        #                             None, self._condensedListChangedCb)
 
     def _newProjectLoadingCb(self, unused_inst, unused_project):
         gst.log("...")
@@ -254,13 +242,13 @@
     def _newProjectLoadedCb(self, unused_inst, project):
         gst.log("...")
         assert(instance.PiTiVi.current == project)
-        # now we connect to the new project, so we can receive any
-        # signals that might be emitted while the project is loading
+        #now we connect to the new project, so we can receive any
+        #signals that might be emitted while the project is loading
         self._connectToTimeline(project.timeline)
-        # TODO: display final state of project now that loading has
-        # completed. this callback doesn't do do much else
+        #TODO: display final state of project now that loading has
+        #completed. this callback doesn't do do much else
 
-        # LOAD THE TIMELINE !!!
+        #LOAD THE TIMELINE !!!
         self._condensedListChangedCb(None, self.timeline.videocomp.condensed)
 
     def _newProjectFailedCb(self, unused_inst, unused_reason, unused_uri):
@@ -270,9 +258,9 @@
     def _clearTimeline(self):
         self.switchToNormalMode()
         self.project_signals.disconnectAll()
-        for widget in self.widgets.itervalues():
-            self.remove(widget)
-        self.widgets = {}
+        self.items.remove()
+        self.items = HList()
+        self.root.add_child(self.items)
 
     def _projectClosedCb(self, unused_pitivi, unused_project):
         self._clearTimeline()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]