diff options
Diffstat (limited to 'tutorius/actions.py')
-rw-r--r-- | tutorius/actions.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tutorius/actions.py b/tutorius/actions.py index 40d9b03..fe64c95 100644 --- a/tutorius/actions.py +++ b/tutorius/actions.py @@ -23,7 +23,6 @@ from gettext import gettext as _ from sugar.graphics import icon from . import addon -from .services import ObjectStore from .properties import * from .constants import * @@ -211,12 +210,16 @@ class Action(TPropContainer): # Empty the diff dict as we just synchronized with the creator self._diff_dict.clear() - def enter_editmode(self, **kwargs): + def enter_editmode(self, overlayer=None, **kwargs): """ Enters edit mode. The action should display itself in some way, without affecting the currently running application. The default is a small box with the action icon. + @param overlayer Overlayer to draw on """ + if overlayer is None: + raise TypeError("No overlayer supplied") + meta = addon.get_addon_meta(type(self).__name__) actionicon = icon.Icon(icon_name=meta['icon'], @@ -232,7 +235,7 @@ class Action(TPropContainer): self.position = 0, 0 x, y = self.position - ObjectStore().activity._overlayer.put(self.__edit_img, x, y) + overlayer.put(self.__edit_img, x, y) self.__edit_img.show_all() self._drag = DragWrapper(self.__edit_img, self.position, update_action_cb=self.update_property, draggable=True) |