[Sugar-devel] Removal of Activity Keep button
James Simmons
nicestep at gmail.com
Wed Aug 17 10:03:55 EDT 2011
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.
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>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110817/41f0b328/attachment-0001.html>
More information about the Sugar-devel
mailing list