From ae9adff40bda83fafe6e44ac9df7dfe9a981a8a8 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 15 Sep 2006 01:30:37 +0200 Subject: [PATCH] Cleanup --- shell/FriendIcon.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/FriendIcon.py b/shell/FriendIcon.py index 36e702c5..eb2cf9dd 100644 --- a/shell/FriendIcon.py +++ b/shell/FriendIcon.py @@ -56,10 +56,9 @@ class FriendIcon(IconItem): [grid_x1, grid_y1] = grid.convert_from_screen(x1, y1) [grid_x2, grid_y2] = grid.convert_from_screen(x2, y2) - if grid_x2 + self._popup.get_width() + distance > Grid.ROWS: + grid_x = grid_x2 + distance + if grid_x + self._popup.get_width() > Grid.ROWS: grid_x = grid_x1 - self._popup.get_width() - distance - else: - grid_x = grid_x2 + distance grid_y = grid_y1