From 9efa1a9cb4220d54112308ae4f29069e2ca6c9e3 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sun, 16 Apr 2006 12:43:14 +0000 Subject: [PATCH] use the correct size of the icon when computing transparent lock icon --- src/roster_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 732bcbeee..c638f8f6c 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -178,7 +178,9 @@ class RosterWindow: rowstride = tls_pixbuf.get_rowstride() pixels = tls_pixbuf.get_pixels() new_pixels = '' - for i in range(0, 16*16): + width = tls_pixbuf.get_width() + height = tls_pixbuf.get_height() + for i in range(0, width*height): rgb = pixels[4*i:4*i+3] new_pixels += rgb if rgb == chr(0)*3: @@ -186,7 +188,7 @@ class RosterWindow: else: new_pixels += chr(128) tls_pixbuf = gtk.gdk.pixbuf_new_from_data(new_pixels, colorspace, - True, bps, 16, 16, rowstride) + True, bps, width, height, rowstride) model[iter][C_SECPIXBUF] = tls_pixbuf else: model[iter][C_SECPIXBUF] = None