pitivi r1160 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- From: blewis svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1160 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- Date: Wed, 9 Jul 2008 13:34:14 +0000 (UTC)
Author: blewis
Date: Wed Jul 9 13:34:14 2008
New Revision: 1160
URL: http://svn.gnome.org/viewvc/pitivi?rev=1160&view=rev
Log:
* pitivi/ui/complextimeline.py:
timeline objects can be selected, and change color when selected.
also fixed an error preventing source widgets from being removed from the
complex timeline.
Modified:
branches/SOC_2008_BLEWIS/ChangeLog
branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py
Modified: branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py
==============================================================================
--- branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py (original)
+++ branches/SOC_2008_BLEWIS/pitivi/ui/complextimeline.py Wed Jul 9 13:34:14 2008
@@ -44,7 +44,10 @@
"height" : VIDEO_TRACK_HEIGHT,
"fill_color_rgba" : 0x556633FF
},
- {}
+ {
+ "normal_color" : 0x556633FF,
+ "selected_color" : 0x334411FF,
+ }
)
AUDIO_SOURCE = (
@@ -54,7 +57,10 @@
"stroke_color" : "black",
"fill_color_rgba" : 0x556633FF
},
- {}
+ {
+ "normal_color" : 0x556633FF,
+ "selected_color" : 0x334411FF,
+ }
)
BACKGROUND = (
@@ -142,9 +148,9 @@
def _objectRemoved(self, timeline, element):
w = self.widgets[element]
- self.remove(w)
+ self.remove_child(w)
del self.widgets[element]
- del self.element[w]
+ del self.elements[w]
def ns_to_pixel(self, time):
if time == gst.CLOCK_TIME_NONE:
@@ -176,6 +182,8 @@
rect.props.width = self.ns_to_pixel(element.duration)
# for the moment, not labeling sources
ret = rect
+ make_selectable(self.canvas, ret)
+ # must be called after make_selectable
make_dragable(self.canvas, ret, moved=self._drag_cb)
element.connect("start-duration-changed", self.start_duration_cb, ret)
ret.props.x = self.ns_to_pixel(element.start)
@@ -226,7 +234,10 @@
## ZoomableWidgetInterface overrides
def _selection_changed_cb(self, selected, deselected):
- pass
+ for item in selected:
+ item.props.fill_color_rgba = item.get_data("selected_color")
+ for item in deselected:
+ item.props.fill_color_rgba = item.get_data("normal_color")
def getDuration(self):
return max([layer.composition.duration for layer in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]