[Sugar-devel] Fwd: Fw: Re: #3013 UNSP: toolbar error
James Simmons
nicestep at gmail.com
Fri Aug 5 10:36:34 EDT 2011
Kevin,
I own an XO laptop, and while I consider running my Activities on it the
most important test I really need something that can simulate the error in
my development environment. I appreciate the offer, though.
If I can't test any other way I'll use the XO. I could use a pointer to the
install for the version having the issue.
James Simmons
On Fri, Aug 5, 2011 at 9:29 AM, Kevin Gordon <kgordon420 at gmail.com> wrote:
> Mr. Simmons:
>
> 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. :-)
>
> KG
>
> On Fri, Aug 5, 2011 at 10:22 AM, James Simmons <nicestep at gmail.com> wrote:
>
>> James,
>>
>> 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?
>>
>> 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
>>> b/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):
>>> self._activity.copy()
>>>
>>> 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())
>>> self._activity.close()
>>>
>>> def __jobject_updated_cb(self, jobject):
>>>
>>> ... but that won't fix the deployed laptops.
>>>
>>> --
>>> James Cameron
>>> http://quozl.linux.org.au/
>>>
>>
>>
>> _______________________________________________
>> Sugar-devel mailing list
>> Sugar-devel at lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110805/aab5df46/attachment-0001.html>
More information about the Sugar-devel
mailing list