Changeset 867bd8fc7a68…
Parent f8c3be9f26f0…
by
Changes to one file · Browse files at 867bd8fc7a68 Showing diff from parent f8c3be9f26f0 Diff from another changeset...
@@ -127,14 +127,18 @@ selection.select_iter(selected)
treeview.set_cursor(model.get_path(selected))
+_renderer = gtk.HBox()
def get_icon_pixbuf(name, size=gtk.ICON_SIZE_MENU):
- path = paths.get_tortoise_icon(name)
- if path:
- try:
- w, h = gtk.icon_size_lookup(size)
- return gtk.gdk.pixbuf_new_from_file_at_size(path, w, h)
- except:
- pass
+ if name.startswith('gtk'):
+ return _renderer.render_icon(name, size)
+ else:
+ path = paths.get_tortoise_icon(name)
+ if path:
+ try:
+ w, h = gtk.icon_size_lookup(size)
+ return gtk.gdk.pixbuf_new_from_file_at_size(path, w, h)
+ except:
+ pass
return None
def get_icon_image(name):
|
Loading...