Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/frames_list.py
diff options
context:
space:
mode:
authorAgustin Zubiaga <aguz@sugarlabs.org>2012-05-27 00:58:15 (GMT)
committer Agustin Zubiaga <aguz@sugarlabs.org>2012-05-27 00:58:15 (GMT)
commitf4eeb4218e0c3987f003f3cab5ec73b48e9bc275 (patch)
tree92a9d86c0c59d2a2a70f2a6ad5034d0bc5300ef1 /frames_list.py
parentafdcf8cbea2aca30193f83066f951acc0f032746 (diff)
Stupid bug fixed!
Changes: - FIXME 1, fixed - FIXME 2, fixed Signed-off-by: Agustin Zubiaga <aguz@sugarlabs.org>
Diffstat (limited to 'frames_list.py')
-rw-r--r--frames_list.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/frames_list.py b/frames_list.py
index 10b715b..d06f064 100644
--- a/frames_list.py
+++ b/frames_list.py
@@ -29,7 +29,7 @@ class FramesList(gtk.ScrolledWindow):
super(FramesList, self).__init__()
self.set_size_request(225, -1)
self.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
- self.store = gtk.ListStore(int, gtk.gdk.Pixbuf, str)
+ self.store = gtk.ListStore(int, gtk.gdk.Pixbuf)
self.treeview = gtk.TreeView(self.store)
self.set_vadjustment(self.treeview.get_vadjustment())
self.treeview.connect("row-activated", self._row_activated_cb)
@@ -37,28 +37,22 @@ class FramesList(gtk.ScrolledWindow):
self.treeview.append_column(column)
num_cell = gtk.CellRendererText()
preview_cell = gtk.CellRendererPixbuf()
- path_cell = gtk.CellRendererText()
column.pack_start(num_cell)
column.pack_start(preview_cell)
- column.pack_start(path_cell)
column.add_attribute(num_cell, 'text', 0)
column.add_attribute(preview_cell, 'pixbuf', 1)
- column.add_attribute(path_cell, 'text', 2)
- path_cell.set_property('visible', False)
self.treeview.show()
self.add(self.treeview)
self.frames = 0
- def add_frame(self, pixbuf, imagepath):
+ def add_frame(self, pixbuf):
self.frames += 1
width = pixbuf.get_width()
height = pixbuf.get_height()
preview_pixbuf = pixbuf.scale_simple(200,
200 * height / width,
gtk.gdk.INTERP_TILES)
- self.store.append([self.frames, preview_pixbuf, imagepath])
+ self.store.append([self.frames, preview_pixbuf])
def _row_activated_cb(self, treeview, treepath, column):
- #FIXME: I don't show the correct image always
- self._animation.images = [i[-1] for i in self.store]
self._animation.set_pos(treepath[0])