/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 annotate/gannotate.py

  • Committer: Curtis Hovey
  • Date: 2012-09-02 19:29:42 UTC
  • mfrom: (794.1.1 get_style_context)
  • Revision ID: sinzui.is@verizon.net-20120902192942-cwtww9wxvznx0wod
Do not call deprecated get_style(); use get_style_context().

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
        cell.set_property("xalign", 1.0)
280
280
        cell.set_property("ypad", 0)
281
281
        cell.set_property("family", "Monospace")
282
 
        cell.set_property("cell-background-gdk",
283
 
                          tv.get_style().bg[Gtk.StateType.NORMAL])
 
282
        cell.set_property(
 
283
            "cell-background-rgba",
 
284
            tv.get_style_context().get_background_color(Gtk.StateType.NORMAL))
284
285
        col = Gtk.TreeViewColumn()
285
286
        col.set_resizable(False)
286
287
        col.pack_start(cell, True)
287
288
        col.add_attribute(cell, "text", LINE_NUM_COL)
288
289
        tv.append_column(col)
289
290
 
 
291
        style_context = self.get_style_context()
 
292
 
290
293
        cell = Gtk.CellRendererText()
291
294
        cell.set_property("ypad", 0)
292
295
        cell.set_property("ellipsize", Pango.EllipsizeMode.END)
293
 
        cell.set_property("cell-background-gdk",
294
 
                          self.get_style().bg[Gtk.StateType.NORMAL])
 
296
        cell.set_property(
 
297
            "cell-background-rgba",
 
298
            style_context.get_background_color(Gtk.StateType.NORMAL))
295
299
        col = Gtk.TreeViewColumn("Committer")
296
300
        col.set_resizable(True)
297
301
        col.pack_start(cell, True)
301
305
        cell = Gtk.CellRendererText()
302
306
        cell.set_property("xalign", 1.0)
303
307
        cell.set_property("ypad", 0)
304
 
        cell.set_property("cell-background-gdk",
305
 
                          self.get_style().bg[Gtk.StateType.NORMAL])
 
308
        cell.set_property(
 
309
            "cell-background-rgba",
 
310
            style_context.get_background_color(Gtk.StateType.NORMAL))
306
311
        col = Gtk.TreeViewColumn("Revno")
307
312
        col.set_resizable(False)
308
313
        col.pack_start(cell, True)