[Sugar-devel] Removing 'share' option from activites that don't know how to share

Tomeu Vizoso tomeu at sugarlabs.org
Fri Jun 25 03:28:54 EDT 2010

On Thu, Jun 24, 2010 at 22:23, Gary Martin <garycmartin at googlemail.com> wrote:
> On 24 Jun 2010, at 16:20, Martin Langhoff <martin.langhoff at gmail.com> wrote:
> Talking with the Perú team a few days ago about F11/S0.84 (both on
> xo-1.5 and xo-1)
> Teachers and testers were very confused with the 'share' option in
> activities where sharing does nothing, or is seriously buggy. To avoid
> confusing users, they are looking into removing the 'share' option
> from most activities.
> This is practical and executive for them short-term; of course the
> right fix is for activities do call up the 'share' option only where
> actual sharing code exists and is known to work...
> What is the right fix? Do we want a list of activities where it should
> be removed, and prod the maintainers, and only file bugs for those
> that don't respond soonish?
> Making a list of the offenders and posting would be a start, but remember to
> state the release you are targeting/testing. Here's a likely large chunk of
> the problem...
> For Sugar 0.86 and above the new toolbars will disable the sharing UI with:
>     self.max_participants = 1
> For Sugar 0.82 the trick was:
>     activity_toolbar = toolbox.get_activity_toolbar()
>     activity_toolbar.share.props.visible = False
> For Sugar 0.84 the trick seems to be:
>     activity_toolbar = toolbox.get_activity_toolbar()
>     activity_toolbar.share.hide()
> I've not noticed an elegant way to detect Sugar versions other than try:
> except: clauses around some newer modules, with fallback to 0.82 code.
> Anyone point to a specific activity doing this type of thing nicely?

In python it's favoured to check if the API you want to use is
available with hasattr().

FWIW, I think this should go upstream as is of obvious interest for
all our users. Has Peru someone who can take care of this or should we
try to find someone else?



> Regards,
> --Gary
> (The above would be an informal copy of the "mass bug filing" protocol
> @ Debian.)
> m
> --
> martin.langhoff at gmail.com
> martin at laptop.org -- School Server Architect
> - ask interesting questions
> - don't get distracted with shiny stuff  - working code first
> - http://wiki.laptop.org/go/User:Martinlanghoff
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel

More information about the Devel mailing list