From a09dc486692844a4c4e2bce74f3650da4fadd52d Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 28 Sep 2006 17:03:24 -0400 Subject: [PATCH] Fix missing icon check --- sugar/chat/ChatToolbar.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sugar/chat/ChatToolbar.py b/sugar/chat/ChatToolbar.py index 70f0c2c7..5d49e1f3 100644 --- a/sugar/chat/ChatToolbar.py +++ b/sugar/chat/ChatToolbar.py @@ -1,4 +1,4 @@ -import gtk +import gtk, gobject from sugar.chat.Emoticons import Emoticons from sugar.chat.sketchpad.Toolbox import Toolbox @@ -82,9 +82,11 @@ class ChatToolbar(gtk.HBox): for name in Emoticons.get_instance().get_all(): icon_theme = gtk.icon_theme_get_default() - pixbuf = icon_theme.load_icon(name, 16, 0) - if pixbuf: + try: + pixbuf = icon_theme.load_icon(name, 16, 0) model.append([pixbuf, name]) + except gobject.GError: + pass icon_view = gtk.IconView(model) icon_view.connect('selection-changed', self.__emoticon_selection_changed_cb)