James,<br><br>I'm willing to try and work around this for Sugar Commander and Get Internet Archive Books, but I'll need a way to test my work.  The only things I've ever used for testing are the installed Sugar for my distribution (Fedora 12) and the very latest sugar-jhbuild.  It sounds like the latest sugar doesn't have this issue.  I don't have a powerful enough computer to run emulation.  Also, I don't know how to go about listening for the clicked signal on the Stop button.  (I don't know the name of the component.  I've listened to any number of other components).  Also, how do I prevent the code that is normally listening to that button from being executed?<br>
<br>James Simmons<br><br><br><div class="gmail_quote">On Thu, Aug 4, 2011 at 6:49 PM, James Cameron <span dir="ltr"><<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Aug 04, 2011 at 09:50:13AM -0500, James Simmons wrote:<br>
> We have a stack trace.  See below.<br>
<br>
</div>I've found the cause of the regresssion.  It did not affect 0.84.12, but<br>
does affect current versions of 0.84.<br>
<br>
It was a patch 0ba47d0 for #1948.<br>
<br>
In ActivityToolbar.__init__() the references to self.title are protected<br>
by a check for activity.metadata.<br>
<br>
In __stop_clicked_cb(), the newly added references to self.title are not<br>
protected in the same way.<br>
<br>
So any activity that uses your documented and published method for<br>
avoiding the creation of a journal entry ... which is also the supported<br>
method in Sugar ... will fail in the way you describe.<br>
<br>
For compatibility with Sugar 0.84.13 and later, the method will need a<br>
workaround.  I suggest connecting a replacement __stop_clicked_cb<br>
function to the 'clicked' signal of the stop button, and in place of the<br>
current toolkit code, just call activity.close().<br>
<br>
The fix to Sugar Toolkit seems straightforward:<br>
<br>
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py<br>
index 6f204b3..09450f7 100644<br>
--- a/src/sugar/activity/activity.py<br>
+++ b/src/sugar/activity/activity.py<br>
@@ -178,9 +178,10 @@ class ActivityToolbar(gtk.Toolbar):<br>
         self._activity.copy()<br>
<br>
     def __stop_clicked_cb(self, button):<br>
-        if self._focus_out_hid is not None:<br>
-            self.title.disconnect(self._focus_out_hid)<br>
-        self._update_title(self.title.get_text())<br>
+        if self._activity.metadata:<br>
+            if self._focus_out_hid is not None:<br>
+                self.title.disconnect(self._focus_out_hid)<br>
+            self._update_title(self.title.get_text())<br>
         self._activity.close()<br>
<br>
     def __jobject_updated_cb(self, jobject):<br>
<br>
... but that won't fix the deployed laptops.<br>
<div><div></div><div class="h5"><br>
--<br>
James Cameron<br>
<a href="http://quozl.linux.org.au/" target="_blank">http://quozl.linux.org.au/</a><br>
</div></div></blockquote></div><br>