pitivi r1132 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- From: blewis svn gnome org
- To: svn-commits-list gnome org
- Subject: pitivi r1132 - in branches/SOC_2008_BLEWIS: . pitivi/ui
- Date: Mon, 2 Jun 2008 05:43:44 +0000 (UTC)
Author: blewis
Date: Mon Jun 2 05:43:44 2008
New Revision: 1132
URL: http://svn.gnome.org/viewvc/pitivi?rev=1132&view=rev
Log:
* pitivi/ui/test.py:
tested dragging code with gtk.EventBox -- it doesn't work, no signals
* pitivi/ui/timelineobjects.py:
changed parent of SimpleSourceWidget to gtk.HBox, then added a
goocanvas.Rect object to serve as a background. Very wierd things
happen when two source widgets overlap.
Modified:
branches/SOC_2008_BLEWIS/ChangeLog
branches/SOC_2008_BLEWIS/pitivi/ui/test.py
branches/SOC_2008_BLEWIS/pitivi/ui/timelineobjects.py
Modified: branches/SOC_2008_BLEWIS/pitivi/ui/test.py
==============================================================================
--- branches/SOC_2008_BLEWIS/pitivi/ui/test.py (original)
+++ branches/SOC_2008_BLEWIS/pitivi/ui/test.py Mon Jun 2 05:43:44 2008
@@ -43,6 +43,12 @@
{}
)
+def null_true(*args):
+ return True
+
+def null_false(*args):
+ return False
+
def make_box(text):
b = make_item(box.next())
t = make_item(label)
@@ -51,14 +57,18 @@
return group(b, t)
def make_widget(text):
- b = gtk.Button(text)
- return goocanvas.Widget(widget=b, width=75,
- height=50)
+ b = gtk.Label(text)
+ d = gtk.EventBox()
+ d.add(b)
+ e = goocanvas.Rect(width=75, height=50, visibility=False)
+ return group(goocanvas.Widget(widget=d, width=75,
+ height=50), e)
+
c = goocanvas.Canvas()
t = HList(c)
c.get_root_item().add_child(t)
for word in LABELS:
- t.add(make_box(word))
+ t.add(make_widget(word))
t.reorderable = True
s = gtk.ScrolledWindow()
s.set_policy(gtk.POLICY_ALWAYS, gtk.POLICY_NEVER)
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 Mon Jun 2 05:43:44 2008
@@ -80,7 +80,7 @@
self.props.automatic_bounds = False
self.root = self.get_root_item()
- self.items = HList(self)
+ self.items = HList(self, spacing=10)
self.items.reorderable = True
self.root.add_child(self.items)
@@ -208,6 +208,11 @@
item = goocanvas.Widget(widget=widget,
width=DEFAULT_SIMPLE_ELEMENT_WIDTH,
height=DEFAULT_SIMPLE_ELEMENT_HEIGHT)
+ background = goocanvas.Rect(fill_color="gray",
+ stroke_color="gray",
+ width=DEFAULT_SIMPLE_ELEMENT_WIDTH,
+ height=DEFAULT_SIMPLE_ELEMENT_HEIGHT)
+ item = group(background, item)
else:
gst.warning("this is not implemented")
self.widgets[element] = item
@@ -843,7 +848,7 @@
self._update = True
self.queue_draw()
-class SimpleSourceWidget(gtk.EventBox):
+class SimpleSourceWidget(gtk.HBox):
"""
Widget for representing a source in simple timeline view
Takes a TimelineFileSource
@@ -862,7 +867,7 @@
def __init__(self, filesource):
"""Represents filesource in the simple timeline."""
- gtk.EventBox.__init__(self)
+ gtk.HBox.__init__(self)
#TODO: create a separate thumbnailer for previewing effects
self.filesource = filesource
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]