diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-10-23 13:19:17 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-10-23 13:19:17 (GMT) |
commit | f300006b76ed905e52fb5b5848e09bf34a91216e (patch) | |
tree | 7928cacd4b7cbb16a8ac6da43ddf34cf027964d0 /lib/sugar/activity/activity.py | |
parent | 0daccca71f668b3dbf9990cc904e15a21e5cb44b (diff) |
Move window management keybindings inside sugar.
Add a TakeScreenshot dbus method and have the shell
call it when the activity can safely take a screenshot
to use as a preview.
Diffstat (limited to 'lib/sugar/activity/activity.py')
-rw-r--r-- | lib/sugar/activity/activity.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/sugar/activity/activity.py b/lib/sugar/activity/activity.py index a632fb8..3dc5f30 100644 --- a/lib/sugar/activity/activity.py +++ b/lib/sugar/activity/activity.py @@ -128,6 +128,7 @@ class ActivityToolbar(gtk.Toolbar): self._activity.copy() def __stop_clicked_cb(self, button): + self._activity.take_screenshot() self._activity.close() def __jobject_updated_cb(self, jobject): @@ -461,6 +462,9 @@ class Activity(Window, gtk.Container): else: return {} + def take_screenshot(self): + self._preview = self._get_preview() + def save(self): """Request that the activity is saved to the Journal.""" @@ -594,8 +598,6 @@ class Activity(Window, gtk.Container): self._pservice.share_activity(self, private=private) def close(self): - self._preview = self._get_preview() - self.save() if self._shared_activity: |