/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: Curtis Hovey
  • Date: 2011-08-12 19:50:45 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110812195045-y86bmaibs3pw5w6d
Updated buffer.getText() calls and ModifierType enums.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
class PluginsPage(Gtk.VPaned):
21
21
 
22
22
    def __init__(self):
23
 
        Gtk.VPaned.__init__(self)
 
23
        GObject.GObject.__init__(self)
24
24
        self.set_border_width(12)
25
25
        self.set_position(216)
26
26
 
27
27
        scrolledwindow = Gtk.ScrolledWindow()
28
 
        scrolledwindow.set_policy(
29
 
            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
 
28
        scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
30
29
        scrolledwindow.set_shadow_type(Gtk.ShadowType.IN)
31
30
        self.model = Gtk.ListStore(str, str)
32
31
        treeview = Gtk.TreeView()
44
43
 
45
44
        cell = Gtk.CellRendererText()
46
45
        column = Gtk.TreeViewColumn()
47
 
        column.pack_start(cell, True)
 
46
        column.pack_start(cell, True, True, 0)
48
47
        column.add_attribute(cell, "text", 0)
49
48
        treeview.append_column(column)
50
49
 
51
50
        cell = Gtk.CellRendererText()
52
51
        column = Gtk.TreeViewColumn()
53
 
        column.pack_start(cell, True)
 
52
        column.pack_start(cell, True, True, 0)
54
53
        column.add_attribute(cell, "text", 1)
55
54
        treeview.append_column(column)
56
55
 
62
61
            self.model.append([name, getattr(plugins[name], '__file__', None)])
63
62
 
64
63
        scrolledwindow = Gtk.ScrolledWindow()
65
 
        scrolledwindow.set_policy(
66
 
            Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
 
64
        scrolledwindow.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
67
65
        scrolledwindow.add_with_viewport(self.table)
68
66
        self.pack2(scrolledwindow, resize=False, shrink=True)
69
67
        self.show()
77
75
            self.table.remove(w)
78
76
 
79
77
        if getattr(p, '__author__', None) is not None:
80
 
            align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
 
78
            align = Gtk.Alignment.new(0.0, 0.5)
81
79
            label = Gtk.Label()
82
80
            label.set_markup("<b>Author:</b>")
83
81
            align.add(label)
85
83
            align.show()
86
84
            label.show()
87
85
 
88
 
            align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
 
86
            align = Gtk.Alignment.new(0.0, 0.5)
89
87
            author = Gtk.Label()
90
88
            author.set_text(p.__author__)
91
89
            author.set_selectable(True)
93
91
            self.table.attach(align, 1, 2, 0, 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
94
92
 
95
93
        if getattr(p, '__version__', None) is not None:
96
 
            align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
 
94
            align = Gtk.Alignment.new(0.0, 0.5)
97
95
            label = Gtk.Label()
98
96
            label.set_markup("<b>Version:</b>")
99
97
            align.add(label)
101
99
            align.show()
102
100
            label.show()
103
101
 
104
 
            align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
 
102
            align = Gtk.Alignment.new(0.0, 0.5)
105
103
            author = Gtk.Label()
106
104
            author.set_text(p.__version__)
107
105
            author.set_selectable(True)
109
107
            self.table.attach(align, 1, 2, 0, 1, Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, Gtk.AttachOptions.FILL)
110
108
 
111
109
        if getdoc(p) is not None:
112
 
            align = Gtk.Alignment.new(0.0, 0.5, 0.0, 0.0)
 
110
            align = Gtk.Alignment.new(0.0, 0.5)
113
111
            description = Gtk.Label()
114
112
            description.set_text(getdoc(p))
115
113
            description.set_selectable(True)