Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-02-21 20:29:08 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-02-21 20:29:08 (GMT)
commitd4639a1764b0a846b3821366f2c4fb4fa409021d (patch)
treead51329b78dc651255eb4d1a1f82e78ac91af40f /sugar/graphics
parentc9af045e43c9e26622b6a2db93304507064b2af7 (diff)
Use hippo.CanvasContext.translate_to_screen() for positioning popups.
Diffstat (limited to 'sugar/graphics')
-rw-r--r--sugar/graphics/canvasicon.py3
-rw-r--r--sugar/graphics/optionmenu.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/sugar/graphics/canvasicon.py b/sugar/graphics/canvasicon.py
index 020e966..fb4974a 100644
--- a/sugar/graphics/canvasicon.py
+++ b/sugar/graphics/canvasicon.py
@@ -296,8 +296,7 @@ class CanvasIcon(hippo.CanvasBox, hippo.CanvasItem):
if [x, y] == [None, None]:
context = self.get_context()
- #[x, y] = context.translate_to_screen(self)
- [x, y] = context.translate_to_widget(self)
+ [x, y] = context.translate_to_screen(self)
# TODO: Any better place to do this?
popup.props.box_width = max(popup.props.box_width,
diff --git a/sugar/graphics/optionmenu.py b/sugar/graphics/optionmenu.py
index 2e6e456..f2e4603 100644
--- a/sugar/graphics/optionmenu.py
+++ b/sugar/graphics/optionmenu.py
@@ -150,8 +150,7 @@ class OptionMenu(hippo.CanvasBox, hippo.CanvasItem):
self._menu.hide()
else:
context = self._round_box.get_context()
- #[x, y] = context.translate_to_screen(self._round_box)
- [x, y] = context.translate_to_widget(self._round_box)
+ [x, y] = context.translate_to_screen(self._round_box)
# TODO: Any better place to do this?
self._menu.props.box_width = self.get_width_request()