[Sugar-devel] Removal of Activity Keep button

James Simmons nicestep at gmail.com
Wed Aug 17 15:37:27 EDT 2011


Simon,

I knew I did something to get rid of it.  I wonder if there is a way to
detect if a keep button is present and get rid of it if there is one.  It
seems to me I've done something similar in python.  Maybe trap an exception
and ignore it?

James Simmons

On Wed, Aug 17, 2011 at 10:05 AM, Simon Schampijer <simon at schampijer.de>wrote:

> On 08/17/2011 04:46 PM, James Simmons wrote:
>
>> Simon,
>>
>> Read Etexts does this:
>>
>> http://activities.sugarlabs.**org/en-US/sugar/addon/4035<http://activities.sugarlabs.org/en-US/sugar/addon/4035>
>>
>> James Simmons
>>
>
> You don't hide the button - you remove it:
>
> /home/erikos/Activities/**ReadETexts.activity/**ReadEtextsActivity.py:353:
>       activity_toolbar.remove(**activity_toolbar.keep)
> /home/erikos/Activities/**ReadETexts.activity/**ReadEtextsActivity.py:354:
>       activity_toolbar.keep = None
>
>
> In any case with the patch your activity does start fine, no traces and the
> keep button is gone.
>
> Regards,
>   Simon
>
>
>  On Wed, Aug 17, 2011 at 9:41 AM, Simon Schampijer<simon at schampijer.de**
>> >wrote:
>>
>>  On 08/17/2011 04:26 PM, James Simmons wrote:
>>>
>>>  Simon,
>>>>
>>>> I haven't been testing with sugar-jhbuild for some time now.  I just use
>>>> the
>>>> version of Sugar that comes with my distro.  I test on both Fedora 12
>>>> and
>>>> Fedora 10 and figure that if it works on both of those it will work
>>>> anywhere.  Lately versions of Sugar are breaking my code (like when I
>>>> write
>>>> an Activity that does not leave behind a Journal entry, and now when I
>>>> hide
>>>> the Keep button).
>>>>
>>>> My book demonstrates how to hide the Keep button and recommends doing
>>>> it.
>>>>
>>>> I understand that Python 3 will break absolutely everything we have.
>>>>  Maybe
>>>> we could maintain backward compatibility until we have to deal with
>>>> Python
>>>> 3, then clean up all the cruft then.
>>>>
>>>> James Simmons
>>>>
>>>>
>>> Can you send me one of your activities that only has the hide button
>>> issue?
>>>
>>> Regards,
>>>   Simon
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110817/5e8e1843/attachment-0001.html>


More information about the Sugar-devel mailing list