Devs,
Attached to this email are both the original patch, which removes
automated screenshot acquisition from the sugar shell, and a patch to
activity.py in sugar-toolkit which adds screenshot acquisition to the
user-directed 'keep' (save) event, so that the screenshot can appear in
the journal when the user explicitly selects to save their work.
Note that the keep event previously did not acquire a screenshot-- it
was apparently assumed that it would have been acquired previously by a
tabbing event. Additionally, two screenshots were acquired on every
close event (one in the Shell.py code and one in the activity.py code).
The effect of these patches is to retain the benefits of screenshots
without incurring their costs on every window navigation event. Only
user-directed 'close' and 'keep' events now trigger the screenshot.
This means that there will always be screenshots after activities
properly exit, or when the user elects to save data. Other automated
screenshot events are removed so that system responsiveness does not
suffer during window manager navigation.
before, screenshots taken on these events:
- frame visibility
- tabbing start
- activity next tab
- activity previous tab
- zoom into activity view
- activity close (twice)
after, screenshots taken on these events:
- activity close (once)
- activity keep / save
Comments welcome. Please test and report results.
Erik
diff --git a/src/view/Shell.py b/src/view/Shell.py
index a53ee93..b6ffbfe 100644
--- a/src/view/Shell.py
+++ b/src/view/Shell.py
@@ -190,8 +190,6 @@ class Shell(gobject.GObject):
if level == self._model.get_zoom_level():
return
- self.take_activity_screenshot()
-
if level == shellmodel.ShellModel.ZOOM_ACTIVITY:
host = self.get_current_activity()
if host is not None:
@@ -208,7 +206,6 @@ class Shell(gobject.GObject):
home_model = self._model.get_home()
previous_activity = home_model.get_previous_activity()
if previous_activity:
- self.take_activity_screenshot()
previous_activity.get_window().activate(
gtk.get_current_event_time())
@@ -216,7 +213,6 @@ class Shell(gobject.GObject):
home_model = self._model.get_home()
next_activity = home_model.get_next_activity()
if next_activity:
- self.take_activity_screenshot()
next_activity.get_window().activate(gtk.get_current_event_time())
def close_current_activity(self):
@@ -228,7 +224,6 @@ class Shell(gobject.GObject):
if active_activity.is_journal():
return
- self.take_activity_screenshot()
self.get_current_activity().close()
def get_current_activity(self):
diff --git a/src/view/frame/frame.py b/src/view/frame/frame.py
index 6009e7f..c3f0de9 100644
--- a/src/view/frame/frame.py
+++ b/src/view/frame/frame.py
@@ -146,8 +146,6 @@ class Frame(object):
if self._animator:
self._animator.stop()
- view.Shell.get_instance().take_activity_screenshot()
-
self.mode = mode
self._animator = animator.Animator(0.5)
diff --git a/src/view/tabbinghandler.py b/src/view/tabbinghandler.py
index 03ce275..e3153b0 100644
--- a/src/view/tabbinghandler.py
+++ b/src/view/tabbinghandler.py
@@ -58,7 +58,6 @@ class TabbingHandler(object):
self._tabbing = False
else:
shell = view.Shell.get_instance()
- shell.take_activity_screenshot()
self._frame.show(self._frame.MODE_NON_INTERACTIVE)
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 73eeea7..8bdfa9d 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -171,6 +171,7 @@ class ActivityToolbar(gtk.Toolbar):
self._activity.share()
def __keep_clicked_cb(self, button):
+ self._activity.take_screenshot()
self._activity.copy()
def __stop_clicked_cb(self, button):
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar