Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

browse: use gtklib.get_icon_pixbuf()

Changeset 6ff4ce320c5c

Parent 4e5aab7faa7d

by Yuki KODAMA

Changes to one file · Browse files at 6ff4ce320c5c Showing diff from parent 4e5aab7faa7d Diff from another changeset...

 
112
113
114
115
116
117
118
119
120
 
 
121
122
 
123
124
125
 
112
113
114
 
 
 
 
 
 
115
116
117
 
118
119
120
121
@@ -112,14 +112,10 @@
  col = gtk.TreeViewColumn(_('status'))   self.append_column(col)   - iconw, iconh = gtk.icon_size_lookup(gtk.ICON_SIZE_SMALL_TOOLBAR) - def packpixmap(ico, id): - iconpath = paths.get_tortoise_icon(ico) - if iconpath == None: - raise (_("could not open icon file '%s' (check install)") % ico) - pm = gtk.gdk.pixbuf_new_from_file_at_size(iconpath, iconw, iconh) + def packpixmap(name, id): + pixbuf = gtklib.get_icon_pixbuf(name)   cell = gtk.CellRendererPixbuf() - cell.set_property('pixbuf', pm) + cell.set_property('pixbuf', pixbuf)   col.pack_start(cell, expand=False)   col.add_attribute(cell, 'visible', id)