From c2a70df954c76c739d20eb8ef42abccde423e89d Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 1 Mar 2005 14:14:56 +0000 Subject: [PATCH] use gtk.Image.set_from_file to clean the code --- plugins/gtkgui/gtkgui.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 9865fe5b3..7af2ed61a 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -2220,15 +2220,8 @@ class roster_Window: for file in files: if not os.path.exists(file): continue - if file.find('.gif') != -1: - pix = gtk.gdk.PixbufAnimation(file) - image.set_from_animation(pix) - else: - pix = gtk.gdk.pixbuf_new_from_file(file) - image.set_from_pixbuf(pix) + image.set_from_file(file) break -# for state in ('online', 'away', 'xa', 'dnd', 'invisible', 'offline'): -# self.xml.get_widget(state).set_image(self.pixbufs[state]) def sound_is_ok(self, sound): if not os.path.exists(sound):