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.
24
from gettext import gettext as _
30
class AudioFxList(gtk.VBox):
31
""" Widget for listing video effects """
33
def __init__(self, instance):
34
gtk.VBox.__init__(self)
35
self.set_border_width(5)
39
self.storemodel = gtk.ListStore(str, str, object)
41
self.scrollwin = gtk.ScrolledWindow()
42
self.scrollwin.set_policy(gtk.POLICY_NEVER,
44
self.pack_start(self.scrollwin)
46
self.iconview = gtk.IconView(self.storemodel)
47
self.treeview = gtk.TreeView(self.storemodel)
49
namecol = gtk.TreeViewColumn(_("Name"))
50
self.treeview.append_column(namecol)
51
namecell = gtk.CellRendererText()
52
namecol.pack_start(namecell)
53
namecol.add_attribute(namecell, "text", 0)
55
namecol = gtk.TreeViewColumn(_("Description"))
56
self.treeview.append_column(namecol)
57
namecell = gtk.CellRendererText()
58
namecell.set_property("ellipsize", pango.ELLIPSIZE_END)
59
namecol.pack_start(namecell)
60
namecol.add_attribute(namecell, "text", 1)
62
self.scrollwin.add(self.treeview)
66
def _fillUpModel(self):
67
for factory in self.app.effects.simple_audio:
68
self.storemodel.append([factory.get_longname(),
69
factory.get_description(),