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

changeset: use gtklib.get_icon_pixbuf()

Changeset 73e3ee617c88

Parent 6ff4ce320c5c

by Yuki KODAMA

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

 
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
 
 
 
 
723
724
725
 
707
708
709
 
 
 
 
 
 
 
 
 
 
 
 
 
710
711
712
713
714
715
716
@@ -707,19 +707,10 @@
  column.pack_start(filecell, expand=False)   column.add_attribute(filecell, 'text', 1)   - iconw, iconh = gtk.icon_size_lookup(gtk.ICON_SIZE_SMALL_TOOLBAR) - - def get_pixbuf(iconfilename): - iconpath = paths.get_tortoise_icon(iconfilename) - if iconpath == None: - raise (_("could not open icon file '%s' (check install)") - % iconfilename) - return gtk.gdk.pixbuf_new_from_file_at_size( - iconpath, iconw, iconh) - - addedpixbuf = get_pixbuf('fileadd.ico') - removedpixbuf = get_pixbuf('filedelete.ico') - modifiedpixbuf = get_pixbuf('filemodify.ico') + size = gtk.ICON_SIZE_SMALL_TOOLBAR + addedpixbuf = gtklib.get_icon_pixbuf('fileadd.ico', size) + removedpixbuf = gtklib.get_icon_pixbuf('filedelete.ico', size) + modifiedpixbuf = gtklib.get_icon_pixbuf('filemodify.ico', size)     def cell_seticon(column, cell, model, iter):   state = model.get_value(iter, 0)