Raise exception for missing icons
This is a regression from 9dc389cc32
previously we used load_icon() which raises an exception for missing icons
now we use lookup_icon() which does not, and iconinfo can be None now
This commit is contained in:
parent
6d9f82d827
commit
6880fba3b4
|
@ -59,6 +59,8 @@ class Color:
|
|||
def get_icon_pixmap(icon_name, size=16, color=None, quiet=False):
|
||||
try:
|
||||
iconinfo = gtk_icon_theme.lookup_icon(icon_name, size, 0)
|
||||
if not iconinfo:
|
||||
raise GLib.GError
|
||||
if color:
|
||||
pixbuf, was_symbolic = iconinfo.load_symbolic(*color)
|
||||
return pixbuf
|
||||
|
|
Loading…
Reference in New Issue