1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed 269cb22

history: drop pixmap cell renderers in favor of markup

fixes #30. The markup doesn't suffer from the same problems
the pixmaps did with visibility, so this is more robust.

  • Participants
  • Parent commits 2b7f2f9
  • Branches default

Comments (0)

Files changed (1)

File hggtk/vis/treeview.py

View file
  • Ignore whitespace
         self.treeview.append_column(self.id_column)
 
         cell = gtk.CellRendererText()
-        mcell = gtk.CellRendererPixbuf()
-        pcell = gtk.CellRendererPixbuf()
-        hcell = gtk.CellRendererPixbuf()
         cell.set_property("width-chars", 65)
         cell.set_property("ellipsize", pango.ELLIPSIZE_END)
         self.msg_column = gtk.TreeViewColumn("Summary")
         self.msg_column.set_resizable(True)
         self.msg_column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
         self.msg_column.set_fixed_width(cell.get_size(self.treeview)[2])
-        self.msg_column.pack_start(mcell, expand=False)
-        self.msg_column.pack_start(pcell, expand=False)
-        self.msg_column.pack_start(hcell, expand=False)
         self.msg_column.pack_end(cell, expand=True)
         self.msg_column.add_attribute(cell, "foreground", treemodel.FGCOLOR)
         self.msg_column.add_attribute(cell, "markup", treemodel.MESSAGE)
-        self.msg_column.add_attribute(pcell, "visible", treemodel.WCPARENT)
-        self.msg_column.add_attribute(hcell, "visible", treemodel.HEAD)
-        self.msg_column.add_attribute(mcell, "visible", treemodel.MARKED)
-        mcell.set_property('stock-id', gtk.STOCK_GO_FORWARD)
-        pcell.set_property('stock-id', gtk.STOCK_HOME)
-        hcell.set_property('stock-id', gtk.STOCK_EXECUTE)
+        self.msg_column.add_attribute(cell, "underline", treemodel.WCPARENT)
         self.treeview.append_column(self.msg_column)
 
         cell = gtk.CellRendererText()