use gtk.Image.set_from_file to clean the code
This commit is contained in:
parent
e05fde85a2
commit
c2a70df954
|
@ -2220,15 +2220,8 @@ class roster_Window:
|
||||||
for file in files:
|
for file in files:
|
||||||
if not os.path.exists(file):
|
if not os.path.exists(file):
|
||||||
continue
|
continue
|
||||||
if file.find('.gif') != -1:
|
image.set_from_file(file)
|
||||||
pix = gtk.gdk.PixbufAnimation(file)
|
|
||||||
image.set_from_animation(pix)
|
|
||||||
else:
|
|
||||||
pix = gtk.gdk.pixbuf_new_from_file(file)
|
|
||||||
image.set_from_pixbuf(pix)
|
|
||||||
break
|
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):
|
def sound_is_ok(self, sound):
|
||||||
if not os.path.exists(sound):
|
if not os.path.exists(sound):
|
||||||
|
|
Loading…
Reference in New Issue