Finally! :)<br><br>Reviewed-by: Gonzalo Odiard <<a href="mailto:gonzalo@laptop.org">gonzalo@laptop.org</a>><br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 3:55 PM, 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">- removed deprecated imports from the activity module, use the<br>
  widgets module instead<br>
- removed the ActivityToolbox class<br>
- removed the Stop button from the ActivityToolbar<br>
- removed set_toolbar/get_toolbar API from the window module<br>
<br>
Signed-off-by: Simon Schampijer <<a href="mailto:simon@laptop.org">simon@laptop.org</a>><br>
---<br>
 src/sugar3/activity/activity.py |    4 ---<br>
 src/sugar3/activity/widgets.py  |   42 +--------------------------------------<br>
 src/sugar3/graphics/window.py   |   12 -----------<br>
 3 files changed, 1 insertions(+), 57 deletions(-)<br>
<br>
diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py<br>
index 3c1a2f3..f772679 100644<br>
--- a/src/sugar3/activity/activity.py<br>
+++ b/src/sugar3/activity/activity.py<br>
@@ -86,10 +86,6 @@ from sugar3.datastore import datastore<br>
 from sugar3.session import XSMPClient<br>
 from sugar3 import wm<br>
<br>
-# support deprecated imports<br>
-from sugar3.activity.widgets import ActivityToolbar, EditToolbar<br>
-from sugar3.activity.widgets import ActivityToolbox<br>
-<br>
<br>
 _ = lambda msg: gettext.dgettext('sugar-toolkit', msg)<br>
<br>
diff --git a/src/sugar3/activity/widgets.py b/src/sugar3/activity/widgets.py<br>
index 999a080..3f67300 100644<br>
--- a/src/sugar3/activity/widgets.py<br>
+++ b/src/sugar3/activity/widgets.py<br>
@@ -68,7 +68,6 @@ class ActivityToolbarButton(ToolbarButton):<br>
<br>
     def __init__(self, activity, **kwargs):<br>
         toolbar = ActivityToolbar(activity, orientation_left=True)<br>
-        toolbar.stop.hide()<br>
<br>
         ToolbarButton.__init__(self, page=toolbar, **kwargs)<br>
<br>
@@ -215,12 +214,7 @@ class TitleEntry(Gtk.ToolItem):<br>
<br>
<br>
 class ActivityToolbar(Gtk.Toolbar):<br>
-    """The Activity toolbar with the Journal entry title, sharing<br>
-       and Stop buttons<br>
-<br>
-    All activities should have this toolbar. It is easiest to add it to your<br>
-    Activity by using the ActivityToolbox.<br>
-    """<br>
+    """The Activity toolbar with the Journal entry title and sharing button"""<br>
<br>
     def __init__(self, activity, orientation_left=False):<br>
         Gtk.Toolbar.__init__(self)<br>
@@ -244,10 +238,6 @@ class ActivityToolbar(Gtk.Toolbar):<br>
         self.share.show()<br>
         self.insert(self.share, -1)<br>
<br>
-        self.stop = StopButton(activity)<br>
-        self.insert(self.stop, -1)<br>
-        self.stop.show()<br>
-<br>
<br>
 class EditToolbar(Gtk.Toolbar):<br>
     """Provides the standard edit toolbar for Activities.<br>
@@ -306,33 +296,3 @@ class EditToolbar(Gtk.Toolbar):<br>
         self.paste = PasteButton()<br>
         self.insert(self.paste, -1)<br>
         self.paste.show()<br>
-<br>
-<br>
-class ActivityToolbox(Toolbox):<br>
-    """Creates the Toolbox for the Activity<br>
-<br>
-    By default, the toolbox contains only the ActivityToolbar. After creating<br>
-    the toolbox, you can add your activity specific toolbars, for example the<br>
-    EditToolbar.<br>
-<br>
-    To add the ActivityToolbox to your Activity in MyActivity.__init__() do:<br>
-<br>
-        # Create the Toolbar with the ActivityToolbar:<br>
-        toolbox = activity.ActivityToolbox(self)<br>
-        ... your code, inserting all other toolbars you need, like EditToolbar<br>
-<br>
-        # Add the toolbox to the activity frame:<br>
-        self.set_toolbar_box(toolbox)<br>
-        # And make it visible:<br>
-        toolbox.show()<br>
-    """<br>
-<br>
-    def __init__(self, activity):<br>
-        Toolbox.__init__(self)<br>
-<br>
-        self._activity_toolbar = ActivityToolbar(activity)<br>
-        self.add_toolbar(_('Activity'), self._activity_toolbar)<br>
-        self._activity_toolbar.show()<br>
-<br>
-    def get_activity_toolbar(self):<br>
-        return self._activity_toolbar<br>
diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py<br>
index 965aecd..d7753e0 100644<br>
--- a/src/sugar3/graphics/window.py<br>
+++ b/src/sugar3/graphics/window.py<br>
@@ -285,15 +285,3 @@ class Window(Gtk.Window):<br>
<br>
     enable_fullscreen_mode = GObject.property(type=object,<br>
         setter=set_enable_fullscreen_mode, getter=get_enable_fullscreen_mode)<br>
-<br>
-    # DEPRECATED<br>
-<br>
-    def set_toolbox(self, toolbar_box):<br>
-        warnings.warn('use toolbar_box instead of toolbox', DeprecationWarning)<br>
-        self.set_toolbar_box(toolbar_box)<br>
-<br>
-    def get_toolbox(self):<br>
-        warnings.warn('use toolbar_box instead of toolbox', DeprecationWarning)<br>
-        return self._toolbar_box<br>
-<br>
-    toolbox = property(get_toolbox, set_toolbox)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.7.5<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</font></span></blockquote></div><br>