Fix missing icon check
This commit is contained in:
parent
8e7fe5dd65
commit
a09dc48669
@ -1,4 +1,4 @@
|
|||||||
import gtk
|
import gtk, gobject
|
||||||
|
|
||||||
from sugar.chat.Emoticons import Emoticons
|
from sugar.chat.Emoticons import Emoticons
|
||||||
from sugar.chat.sketchpad.Toolbox import Toolbox
|
from sugar.chat.sketchpad.Toolbox import Toolbox
|
||||||
@ -82,9 +82,11 @@ class ChatToolbar(gtk.HBox):
|
|||||||
|
|
||||||
for name in Emoticons.get_instance().get_all():
|
for name in Emoticons.get_instance().get_all():
|
||||||
icon_theme = gtk.icon_theme_get_default()
|
icon_theme = gtk.icon_theme_get_default()
|
||||||
|
try:
|
||||||
pixbuf = icon_theme.load_icon(name, 16, 0)
|
pixbuf = icon_theme.load_icon(name, 16, 0)
|
||||||
if pixbuf:
|
|
||||||
model.append([pixbuf, name])
|
model.append([pixbuf, name])
|
||||||
|
except gobject.GError:
|
||||||
|
pass
|
||||||
|
|
||||||
icon_view = gtk.IconView(model)
|
icon_view = gtk.IconView(model)
|
||||||
icon_view.connect('selection-changed', self.__emoticon_selection_changed_cb)
|
icon_view.connect('selection-changed', self.__emoticon_selection_changed_cb)
|
||||||
|
Loading…
Reference in New Issue
Block a user