/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-13 02:44:14 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110813024414-2jhxbw4qkt7h3zjf
Updated gpreferences to gtk3.
Lots of gtk_widget_size_allocate() that need future investigation.

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