[Sugar-devel] [PATCH sugar-toolkit] Remove the Keep button from the activity toolbar

Simon Schampijer simon at schampijer.de
Wed Jul 27 10:03:55 EDT 2011


The keep button has led to a false assumption: learners
confused it with a traditional save button and not recognising
it as what it is, an option to duplicate an entry.

Eben suggested to remove the button [1] and others have since
then. The functionality of duplicating an entry will be moved
to the entry palette in the Journal and the entry detail view [2].

[1] http://lists.sugarlabs.org/archive/sugar-devel/2010-April/023439.html
[2] http://lists.sugarlabs.org/archive/sugar-devel/2011-May/031316.html
---
 src/sugar/activity/widgets.py |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/src/sugar/activity/widgets.py b/src/sugar/activity/widgets.py
index 9503d36..7b215a5 100644
--- a/src/sugar/activity/widgets.py
+++ b/src/sugar/activity/widgets.py
@@ -161,25 +161,6 @@ class ShareButton(RadioMenuButton):
             self.neighborhood.handler_unblock(self._neighborhood_handle)
 
 
-class KeepButton(ToolButton):
-
-    def __init__(self, activity, **kwargs):
-        ToolButton.__init__(self, **kwargs)
-        self.props.tooltip = _('Keep')
-        self.props.accelerator = '<Ctrl>S'
-
-        client = gconf.client_get_default()
-        color = XoColor(client.get_string('/desktop/sugar/user/color'))
-        keep_icon = Icon(icon_name='document-save', xo_color=color)
-        keep_icon.show()
-
-        self.set_icon_widget(keep_icon)
-        self.connect('clicked', self.__keep_button_clicked_cb, activity)
-
-    def __keep_button_clicked_cb(self, button, activity):
-        activity.copy()
-
-
 class TitleEntry(gtk.ToolItem):
 
     def __init__(self, activity, **kwargs):
@@ -232,8 +213,8 @@ class TitleEntry(gtk.ToolItem):
 
 
 class ActivityToolbar(gtk.Toolbar):
-    """The Activity toolbar with the Journal entry title, sharing,
-       Keep and Stop buttons
+    """The Activity toolbar with the Journal entry title, sharing
+       and Stop buttons
 
     All activities should have this toolbar. It is easiest to add it to your
     Activity by using the ActivityToolbox.
@@ -261,10 +242,6 @@ class ActivityToolbar(gtk.Toolbar):
         self.share.show()
         self.insert(self.share, -1)
 
-        self.keep = KeepButton(activity)
-        self.insert(self.keep, -1)
-        self.keep.show()
-
         self.stop = StopButton(activity)
         self.insert(self.stop, -1)
         self.stop.show()
-- 
1.7.4.4



More information about the Sugar-devel mailing list