Changeset 66d8a834a2da…
Parent 1f0155f13789…
by
Changes to one file · Browse files at 66d8a834a2da Showing diff from parent 1f0155f13789 Diff from another changeset...
@@ -665,24 +665,11 @@ """
icon: stock id or file name bundled in TortoiseHg.
"""
- if icon.startswith('gtk'):
- img = gtk.image_new_from_stock(icon, gtk.ICON_SIZE_MENU)
- else:
- img = gtk.Image()
- filepath = paths.get_tortoise_icon(icon)
- if filepath:
- try:
- size = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU)
- pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(
- filepath, *size)
- img.set_from_pixbuf(pixbuf)
- except:
- pass
if toggle:
button = gtk.ToggleButton()
else:
button = gtk.Button()
- button.set_image(img)
+ button.set_image(get_icon_image(icon))
button.set_relief(gtk.RELIEF_NONE)
button.set_focus_on_click(False)
if self.tooltips and tooltip:
|
Loading...