[Sugar-devel] Removal of Activity Keep button

Aleksey Lim alsroot at activitycentral.org
Wed Aug 17 11:05:58 EDT 2011


On Wed, Aug 17, 2011 at 09:03:55AM -0500, James Simmons wrote:
> Simon,
> 
> All my Activities hide the Keep button.  I would like to be able to have
> fully backward compatible Activities for as long as possible.  Everything I
> wrote should work in anything from .82 to the present.  Hiding the button by
> default would be better than just getting rid of it.

That is exactly my concern for not removing Keep button as long as we do
have sugars that have Keep button and not declared as deprecated. In
other words, we do not need to rehash all activities (it sounds too
useless since sugar is not only fructose and activity development
process is/should-be decentralized). If all sugar <0.94 will be
declared as deprecated, we can just forget (taking into account that
Keep button is declared as deprecated in 0.94) about Keep button w/o
asking activity developers to support several sugar APIs.

The another question is that we don't have such practice, afaik, to state
some sugars unsupported (having only stable sugar development sugar is
not enough in my mind, since it is about 6 months cycle and it is too
short for using sugar in the field).

> James Simmons
> 
> On Wed, Aug 17, 2011 at 7:44 AM, Simon Schampijer <simon at schampijer.de>wrote:
> 
> > On 08/17/2011 02:12 PM, Aleksey Lim wrote:
> >
> >> On Sun, Jul 31, 2011 at 02:43:42PM +0200, Simon Schampijer wrote:
> >>
> >>> On 07/31/2011 05:17 AM, Gonzalo Odiard wrote:
> >>>
> >>>> On Sat, Jul 30, 2011 at 7:30 PM, Rafael Ortiz<rafael at activitycentral.**
> >>>> com <rafael at activitycentral.com>>wrote:
> >>>>
> >>>>  On Fri, Jul 29, 2011 at 6:34 PM, Gonzalo Odiard<gonzalo at laptop.org>**
> >>>>> wrote:
> >>>>>
> >>>>>  Hi James,
> >>>>>> There are no problem, the KeepButton class is not removed, but is not
> >>>>>> added by default in the toolbar.
> >>>>>> The activities will work ok.
> >>>>>>
> >>>>>>
> >>>>>>  James, +1.
> >>>>>
> >>>>> You can remove the code w/o problem, if you don't remove it, the
> >>>>> activity
> >>>>> won't work but only for sugar>=0.94 (as I understand it from Simon) ,
> >>>>> this
> >>>>> is only for activities that have the keepbutton ''hardcoded'' in the
> >>>>> activity toolbar code.
> >>>>>
> >>>>>
> >>>>
> >>>> Rafael:
> >>>> This is not correct.
> >>>> The activity will continue working, because the class KeepButton was not
> >>>> removed (there are two proposed patches, look at the second)
> >>>> In most of the activities, the default Activity Tolbar is used, and in
> >>>> sugar
> >>>> 0.94, the KeepButton will not be displayed.
> >>>> In a few activities, the developer hidden the button, or used a custom
> >>>> toolbar, and we provided patches to resolve them.
> >>>> Of course, we did not checked the hundred of activities in ASLO, but
> >>>> only
> >>>> the activities included by default in OLPC image,
> >>>> then if another activity use the button (or the user is using a old
> >>>> version
> >>>> of the activity) the only difference will be
> >>>> the KeepButton will be present, but the activity will works ok.
> >>>>
> >>>> Gonzalo
> >>>>
> >>>
> >>> Right, so the button is only deprecated for now, and usage is
> >>> discouraged. It will be removed in a later version.
> >>>
> >>
> >> That actually is not right, the patch that was landed to sugar-toolkit
> >> removes keep member from ActivityToolbarButton. Thus, activities like
> >> Terminal stops working.
> >>
> >> Also that commit says that keep button will be removed another cycle.
> >> Does it mean the next one? imho, there is no strong reason to break
> >> backwards compatibility and rehash all activities (not only fructose,
> >> ie, no way to fix all of them at once). The right way for me is
> >> declaring good practices on wiki and having warnings in logs.
> >>
> >
> > Thanks for catching this. When writing the patch description I was not
> > thinking of any activity that does access the keep-button of the toolbar
> > directly (terminal does set the short cut for it).
> >
> > I would suggest the following: I will put the button there without
> > inserting it in the toolbar. So if an activity accesses it like:
> >
> > activity_button.page.keep.**props.accelerator = '<Ctrl><Shift>S'
> > activity_button.page.keep.**hide()
> >
> > it won't fail but will not have any effect neither. The button would then
> > be removed completely in 0.96.
> >
> > diff --git a/src/sugar/activity/widgets.**py b/src/sugar/activity/widgets.
> > **py
> > index 0c34a1f..e5c4063 100644
> > --- a/src/sugar/activity/widgets.**py
> > +++ b/src/sugar/activity/widgets.**py
> > @@ -265,6 +265,9 @@ class ActivityToolbar(gtk.Toolbar):
> >         self.share.show()
> >         self.insert(self.share, -1)
> >
> > +        # DEPRECATED
> > +        self.keep = KeepButton(activity)
> > +
> >         self.stop = StopButton(activity)
> >         self.insert(self.stop, -1)
> >         self.stop.show()
> >
> >
> > And of course I will note this in the release notes.
> >
> > Regards,
> >   Simon
> >
> >
> > ______________________________**_________________
> > Sugar-devel mailing list
> > Sugar-devel at lists.sugarlabs.**org <Sugar-devel at lists.sugarlabs.org>
> > http://lists.sugarlabs.org/**listinfo/sugar-devel<http://lists.sugarlabs.org/listinfo/sugar-devel>
> >

-- 
Aleksey


More information about the Sugar-devel mailing list