From 6df1018fca8e2bdab0cfcae17ebc6e937f5bc88e Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 13 Oct 2005 19:53:36 +0000 Subject: [PATCH] width and height must be integer --- src/tabbed_chat_window.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index d25b366f8..453d580ca 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -255,13 +255,14 @@ class TabbedChatWindow(chat.Chat): scaled_buf = None else: pixbuf = self.plugin.avatar_pixbufs[jid] + # compute width / height of the avatar without distorting it ratio = float(pixbuf.get_width()) / float(pixbuf.get_height()) if ratio > 1: w = gajim.config.get('avatar_width') - h = w/ratio + h = int(w/ratio) else: h = gajim.config.get('avatar_height') - w = h*ratio + w = int(h*ratio) scaled_buf = pixbuf.scale_simple(w, h, gtk.gdk.INTERP_HYPER) image = xml.get_widget('avatar_image')