From 94e12f52f253c27738f88c053c95169aa199ee51 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sun, 7 Jun 2009 15:23:33 +0200 Subject: [PATCH] Silence warning and reduce debug logging a bit --- src/sugar/graphics/palette.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sugar/graphics/palette.py b/src/sugar/graphics/palette.py index 2cc9130f..f94f4bc9 100644 --- a/src/sugar/graphics/palette.py +++ b/src/sugar/graphics/palette.py @@ -1200,7 +1200,8 @@ class CellRendererInvoker(Invoker): if self._point_in_cell_renderer(event.x, event.y): tree_view = self._tree_view - path, column_, x_, y_ = tree_view.get_path_at_pos(event.x, event.y) + path, column_, x_, y_ = tree_view.get_path_at_pos(int(event.x), + int(event.y)) if path != self.path: if self.palette is not None: self.palette.popdown(immediate=True) @@ -1223,9 +1224,8 @@ class CellRendererInvoker(Invoker): return False def _point_in_cell_renderer(self, event_x, event_y): - pos = self._tree_view.get_path_at_pos(event_x, event_y) + pos = self._tree_view.get_path_at_pos(int(event_x), int(event_y)) if pos is None: - logging.debug('No path at coords %r %r' % (event_x, event_y)) return False path, column, x, y = pos @@ -1237,7 +1237,6 @@ class CellRendererInvoker(Invoker): return True return False - logging.debug('No cell renderer at position %r' % (pos,)) return False def get_toplevel(self):