/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: 2012-07-09 15:23:26 UTC
  • mto: This revision was merged to the branch mainline in revision 794.
  • Revision ID: jelmer@samba.org-20120709152326-dzxb8zoz0btull7n
Remove bzr-notify.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
from gi.repository import Gtk
18
18
 
19
19
 
20
 
class PluginsPage(Gtk.VPaned):
 
20
class PluginsPage(Gtk.Paned):
21
21
 
22
22
    def __init__(self):
23
 
        Gtk.VPaned.__init__(self)
 
23
        super(PluginsPage, self).__init__()
 
24
        self.set_orientation(Gtk.Orientation.VERTICAL)
24
25
        self.set_border_width(12)
25
26
        self.set_position(216)
26
27
 
41
42
        treeview.set_headers_visible(False)
42
43
        treeview.set_model(self.model)
43
44
        treeview.connect("row-activated", self.row_selected)
 
45
        treeview.connect("cursor-changed", self.row_selected)
44
46
 
45
47
        cell = Gtk.CellRendererText()
46
48
        column = Gtk.TreeViewColumn()
68
70
        self.pack2(scrolledwindow, resize=False, shrink=True)
69
71
        self.show()
70
72
 
71
 
    def row_selected(self, tv, path, tvc):
 
73
    def row_selected(self, tv, path=None, tvc=None):
 
74
        if path is None:
 
75
            (path, focus) = tv.get_cursor()
 
76
        if path is None:
 
77
            # The event was fired as the widget was destroyed.
 
78
            return
72
79
        import bzrlib
73
80
        p = bzrlib.plugin.plugins()[self.model[path][0]].module
74
81
        from inspect import getdoc
117
124
            self.table.attach(align, 0, 2, 1, 2, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
118
125
 
119
126
        self.table.show_all()
120
 
 
121