Throw NotImplementedError in abstract method.

This commit is contained in:
Tomeu Vizoso 2007-02-21 12:02:57 +01:00
parent 111da5911a
commit abff0a8cec
2 changed files with 6 additions and 3 deletions

View File

@ -89,9 +89,12 @@ class Button(hippo.CanvasBox):
[x, y] = [None, None]
if popup_context:
try:
[x, y] = popup_context.get_position(self._icon, popup)
except NotImplementedError:
pass
if (not x) or (not y):
if [x, y] == [None, None]:
context = self._icon.get_context()
#[x, y] = context.translate_to_screen(self._icon)
[x, y] = context.translate_to_widget(self._icon)

View File

@ -44,4 +44,4 @@ class PopupContext(gobject.GObject):
return self._active_control != None
def get_position(self, control, popup):
return [None, None]
raise NotImplementedError