Do not log as error empty icon name

issue8584
review257981002
This commit is contained in:
Cédric Krier committed 2019-08-22 22:46:45 +02:00
1 parent e214209e2a
commit efc5beadd7
1 file changed
+5 -2
+5 -2
View File
@@ -113,6 +113,8 @@ class IconFactory:
@classmethod
def get_pixbuf(cls, iconname, size=16, color=None, badge=None):
if not iconname:
return
colors = CONFIG['icon.colors'].split(',')
cls.register_icon(iconname)
if iconname not in cls._pixbufs[(size, badge)]:
@@ -160,9 +162,10 @@ class IconFactory:
@classmethod
def get_image(cls, iconname, size=16, color=None, badge=None):
pixbuf = cls.get_pixbuf(iconname, size, color, badge)
image = Gtk.Image()
image.set_from_pixbuf(pixbuf)
if iconname:
pixbuf = cls.get_pixbuf(iconname, size, color, badge)
image.set_from_pixbuf(pixbuf)
return image