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