[Sugar-devel] Removal of Activity Keep button

James Simmons nicestep at gmail.com
Thu Aug 18 10:06:17 EDT 2011


Walter,

Thanks, I'll check it out this weekend.

James Simmons

On Wed, Aug 17, 2011 at 10:02 PM, Walter Bender <walter.bender at gmail.com>wrote:

> On Wed, Aug 17, 2011 at 3:37 PM, James Simmons <nicestep at gmail.com> wrote:
> > 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?
>
> hasattr() maybe what you are looking for...
>
> -walter
>
> > 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
> >>>
> >>> 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
> >>>>
> >>>
> >>
> >
> >
> > _______________________________________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
> >
> >
>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110818/b64bb2b7/attachment.html>


More information about the Sugar-devel mailing list