/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: Adrian Wilkins
  • Date: 2008-04-24 15:26:14 UTC
  • mto: This revision was merged to the branch mainline in revision 470.
  • Revision ID: adrian.wilkins@gmail.com-20080424152614-2rnnljbro6vzqvf7
Detect the reserved null: revision in appropriate places. 

This removes a huge shower of stack traces that get dumped to console when 
you look at the bottom of a log.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
class PluginsPage(gtk.VPaned):
26
26
    def __init__(self):
27
27
        gtk.VPaned.__init__(self)
28
 
        self.set_border_width(12)
29
 
        self.set_position(216)
30
 
 
31
28
        scrolledwindow = gtk.ScrolledWindow()
32
29
        scrolledwindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
33
 
        scrolledwindow.set_shadow_type(gtk.SHADOW_IN)
34
30
        self.model = gtk.ListStore(str, str)
35
31
        treeview = gtk.TreeView()
36
32
        scrolledwindow.add(treeview)
37
33
        self.pack1(scrolledwindow, resize=True, shrink=False)
38
34
 
39
35
        self.table = gtk.Table(columns=2)
40
 
        self.table.set_border_width(12)
41
36
        self.table.set_row_spacings(6)
42
37
        self.table.set_col_spacings(6)
43
38
 
72
67
 
73
68
    def row_selected(self, tv, path, tvc):
74
69
        import bzrlib
75
 
        p = bzrlib.plugin.plugins()[self.model[path][0]].module
 
70
        p = bzrlib.plugin.plugins()[self.model[path][0]]
76
71
        from inspect import getdoc
77
72
 
78
73
        for w in self.table.get_children():
79
74
            self.table.remove(w)
80
75
 
81
76
        if getattr(p, '__author__', None) is not None:
82
 
            align = gtk.Alignment(0.0, 0.5)
 
77
            align = gtk.Alignment(1.0, 0.5)
83
78
            label = gtk.Label()
84
79
            label.set_markup("<b>Author:</b>")
85
80
            align.add(label)
95
90
            self.table.attach(align, 1, 2, 0, 1, gtk.EXPAND | gtk.FILL, gtk.FILL)
96
91
 
97
92
        if getattr(p, '__version__', None) is not None:
98
 
            align = gtk.Alignment(0.0, 0.5)
 
93
            align = gtk.Alignment(1.0, 0.5)
99
94
            label = gtk.Label()
100
95
            label.set_markup("<b>Version:</b>")
101
96
            align.add(label)