[Sugar-devel] Fwd: Fw: Re: #3013 UNSP: toolbar error
kgordon420 at gmail.com
Fri Aug 5 10:29:55 EDT 2011
If you want an XO-1 for testing, shoot me a message and I'll ship you a
machine from my over-crowded test-bed. It's the least I can do. :-)
On Fri, Aug 5, 2011 at 10:22 AM, James Simmons <nicestep at gmail.com> wrote:
> 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
> James Simmons
> On Thu, Aug 4, 2011 at 6:49 PM, James Cameron <quozl at laptop.org> wrote:
>> On Thu, Aug 04, 2011 at 09:50:13AM -0500, James Simmons wrote:
>> > We have a stack trace. See below.
>> I've found the cause of the regresssion. It did not affect 0.84.12, but
>> does affect current versions of 0.84.
>> It was a patch 0ba47d0 for #1948.
>> In ActivityToolbar.__init__() the references to self.title are protected
>> by a check for activity.metadata.
>> In __stop_clicked_cb(), the newly added references to self.title are not
>> protected in the same way.
>> So any activity that uses your documented and published method for
>> avoiding the creation of a journal entry ... which is also the supported
>> method in Sugar ... will fail in the way you describe.
>> For compatibility with Sugar 0.84.13 and later, the method will need a
>> workaround. I suggest connecting a replacement __stop_clicked_cb
>> function to the 'clicked' signal of the stop button, and in place of the
>> current toolkit code, just call activity.close().
>> The fix to Sugar Toolkit seems straightforward:
>> diff --git a/src/sugar/activity/activity.py
>> index 6f204b3..09450f7 100644
>> --- a/src/sugar/activity/activity.py
>> +++ b/src/sugar/activity/activity.py
>> @@ -178,9 +178,10 @@ class ActivityToolbar(gtk.Toolbar):
>> def __stop_clicked_cb(self, button):
>> - if self._focus_out_hid is not None:
>> - self.title.disconnect(self._focus_out_hid)
>> - self._update_title(self.title.get_text())
>> + if self._activity.metadata:
>> + if self._focus_out_hid is not None:
>> + self.title.disconnect(self._focus_out_hid)
>> + self._update_title(self.title.get_text())
>> def __jobject_updated_cb(self, jobject):
>> ... but that won't fix the deployed laptops.
>> James Cameron
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel