/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to preferences/plugins.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-06 14:53:44 UTC
  • Revision ID: jelmer@samba.org-20110406145344-m6s0i7q7ssjwhmwq
Support use without gtk.Spinner, which is only available in pygtk >= 2.22.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
import gtk
24
24
 
 
25
 
25
26
class PluginsPage(gtk.VPaned):
 
27
 
26
28
    def __init__(self):
27
29
        gtk.VPaned.__init__(self)
28
30
        self.set_border_width(12)
56
58
        column.pack_start(cell, expand=True)
57
59
        column.add_attribute(cell, "text", 1)
58
60
        treeview.append_column(column)
59
 
        
 
61
 
60
62
        import bzrlib.plugin
61
63
        plugins = bzrlib.plugin.plugins()
62
64
        plugin_names = plugins.keys()
63
65
        plugin_names.sort()
64
66
        for name in plugin_names:
65
67
            self.model.append([name, getattr(plugins[name], '__file__', None)])
66
 
                 
 
68
 
67
69
        scrolledwindow = gtk.ScrolledWindow()
68
70
        scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
69
71
        scrolledwindow.add_with_viewport(self.table)