1
# PiTiVi , Non-linear video editor
5
# Copyright (c) 2005, Edward Hervey <bilboed@bilboed.com>
7
# This program is free software; you can redistribute it and/or
8
# modify it under the terms of the GNU Lesser General Public
9
# License as published by the Free Software Foundation; either
10
# version 2.1 of the License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# Lesser General Public License for more details.
17
# You should have received a copy of the GNU Lesser General Public
18
# License along with this program; if not, write to the
19
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
# Boston, MA 02111-1307, USA.
23
Video effects list widget
28
from gettext import gettext as _
32
COL_FACTORY) = range(3)
34
class VideoFxList(gtk.VBox):
35
""" Widget for listing video effects """
37
def __init__(self, instance):
38
gtk.VBox.__init__(self)
39
self.set_border_width(5)
43
self.storemodel = gtk.ListStore(str, str, object)
45
self.scrollwin = gtk.ScrolledWindow()
46
self.scrollwin.set_policy(gtk.POLICY_NEVER,
48
self.pack_start(self.scrollwin)
50
self.iconview = gtk.IconView(self.storemodel)
51
self.treeview = gtk.TreeView(self.storemodel)
53
namecol = gtk.TreeViewColumn(_("Name"))
54
self.treeview.append_column(namecol)
55
namecell = gtk.CellRendererText()
56
namecol.pack_start(namecell)
57
namecol.add_attribute(namecell, "text", COL_NAME)
59
namecol = gtk.TreeViewColumn(_("Description"))
60
self.treeview.append_column(namecol)
61
namecell = gtk.CellRendererText()
62
namecell.set_property("ellipsize", pango.ELLIPSIZE_END)
63
namecol.pack_start(namecell)
64
namecol.add_attribute(namecell, "text", COL_DESCRIPTION)
66
self.scrollwin.add(self.treeview)
70
def _fillUpModel(self):
71
for factory in self.app.effects.simple_video:
72
self.storemodel.append([factory.get_longname(),
73
factory.get_description(),