Throw NotImplementedError in abstract method.
This commit is contained in:
parent
111da5911a
commit
abff0a8cec
@ -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)
|
||||
|
@ -44,4 +44,4 @@ class PopupContext(gobject.GObject):
|
||||
return self._active_control != None
|
||||
|
||||
def get_position(self, control, popup):
|
||||
return [None, None]
|
||||
raise NotImplementedError
|
||||
|
Loading…
Reference in New Issue
Block a user