[pitivi/ges: 57/287] Use a global variable for the GES timeline background
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 57/287] Use a global variable for the GES timeline background
- Date: Thu, 15 Mar 2012 16:30:37 +0000 (UTC)
commit a2715b90604e007ce9303b9cd4c9da17b990970d
Author: Thibault Saunier <thibault saunier collabora com>
Date: Wed Oct 5 18:50:04 2011 -0300
Use a global variable for the GES timeline background
The goal of the background is to somhow let gaps actually happen
pitivi/project.py | 4 +++-
pitivi/ui/timeline.py | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index d21c7cb..18fc3c3 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -31,6 +31,7 @@ from pitivi.sourcelist import SourceList
from pitivi.settings import ExportSettings
from pitivi.signalinterface import Signallable
from pitivi.utils import Seeker
+from pitivi.ui.timeline import BACKGROUND_PRIORITY
class ProjectError(Exception):
@@ -92,7 +93,8 @@ class Project(Signallable, Loggable):
self.timeline.add_layer(self.layer)
self.back_layer = ges.TimelineLayer()
self.background = ges.TimelineTestSource()
- self.back_layer.set_priority(99)
+ self.back_layer.set_priority(BACKGROUND_PRIORITY)
+ #FIXME THIS IS SO DIRTY GES port
self.background.set_property("duration", 313960000000)
self.back_layer.add_object(self.background)
self.timeline.add_layer(self.back_layer)
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 2cd2f9a..8abd7cc 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -68,6 +68,9 @@ ALIGN = _("Align clips based on their soundtracks")
SELECT_BEFORE = ("Select all sources before selected")
SELECT_AFTER = ("Select all after selected")
+#FIXME We should not use a background when gaps are properly handled in GES
+BACKGROUND_PRIORITY = 500
+
ui = '''
<ui>
<menubar name="MainMenuBar">
@@ -483,7 +486,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
def _add_temp_source(self):
uris = self.selection_data.split("\n")
for layer in self.app.projectManager.current.timeline.get_layers():
- if layer.get_priority() != 99:
+ if layer.get_priority() != BACKGROUND_PRIORITY:
break
for uri in uris:
src = ges.TimelineFileSource(uri)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]