From 60c5e564cc5241200bb2c4a9fa6e827949fcdff4 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 27 Aug 2007 00:43:56 +0200 Subject: [PATCH] Fix getting pixbuf size, patch by jennjacobsen --- pylint.sh | 8 ++------ sugar/graphics/icon.py | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pylint.sh b/pylint.sh index 07917423..f055f2ee 100755 --- a/pylint.sh +++ b/pylint.sh @@ -1,13 +1,9 @@ #!/bin/sh -TODO="C0111,C0301,C0322,W0311,C0324,W0331,W0212,W0611,W0613,W0201,W0106,W0622,W0403,W0612,W0102,W0404,W0704,W0402,W0702,W0401,E0602,E1111,W0101,W0105,W0601,W0602,W0703,W0701,W0312,W0231,W0233" +TODO="C0111,C0301,C0322,W0311,C0324,W0331,W0212,W0611,W0613,W0201,W0106,W0622,W0403,W0102,W0404,W0704,W0402,W0702,W0401,E0602,E1102,C0321,E0611,E1103,W1001,E0213,W0107,R0921,R0401,E1111,W0101,W0105,W0601,W0602,W0703,W0701,W0312,W0231,W0233,F0401,W0612" BROKEN="C0103,E1101" DISABLE="W0142,R0913,W0621,R0903,R0201,R0904,W0511,W0232,R0902,W0603,R0914,C0302,C0102,I0011,R0911,R0912,R0901,R0801,R0923,R0915" -PYTHONPATH=.:./shell:$SUGAR_PREFIX/lib/python2.4/site-packages/gtk-2.0:$PYTHONPATH \ - pylint \ - --include-ids=y \ - --disable-msg=$TODO,$BROKEN,$DISABLE \ - shell sugar +pylint --include-ids=y --disable-msg=$TODO,$BROKEN,$DISABLE shell sugar diff --git a/sugar/graphics/icon.py b/sugar/graphics/icon.py index cee7dec2..3ab65fa4 100644 --- a/sugar/graphics/icon.py +++ b/sugar/graphics/icon.py @@ -246,8 +246,8 @@ class _IconBuffer(object): icon_height = int(dimensions[1]) else: pixbuf = gtk.gdk.pixbuf_new_from_file(file_name) - icon_width = surface.get_width() - icon_height = surface.get_height() + icon_width = pixbuf.get_width() + icon_height = pixbuf.get_height() badge_info = self._get_badge_info(icon_info, icon_width, icon_height)