Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2012-06-14 04:05:48 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2012-06-14 04:05:48 (GMT)
commit1311e002005b8ed4489d87cc876d040c0d05cd3c (patch)
tree99a3f1485334928aa6d76b666c680f279fb10c9e
parent378180e0c9b7a8c0a7468af923ca26bd43fa8144 (diff)
erasing old toolbars compatibility
-rw-r--r--activity.py110
1 files changed, 55 insertions, 55 deletions
diff --git a/activity.py b/activity.py
index 8cc8b31..7a5b6e6 100644
--- a/activity.py
+++ b/activity.py
@@ -89,79 +89,79 @@ class AcousticMeasureActivity(activity.Activity):
# top toolbar with share and close buttons:
- try:
- from sugar3.graphics.toolbarbox import ToolbarBox
- from sugar3.graphics.toolbarbox import ToolbarButton
- from sugar3.activity.widgets import ShareButton
- from sugar3.activity.widgets import StopButton
- from sugar3.activity.widgets import ActivityButton
- from sugar3.activity.widgets import TitleEntry
- from sugar3.graphics.toolbutton import ToolButton
-
- toolbar_box = ToolbarBox()
- activity_button = ActivityButton(self)
- toolbar_box.toolbar.insert(activity_button, 0)
- activity_button.show()
-
- title_entry = TitleEntry(self)
- toolbar_box.toolbar.insert(title_entry, -1)
- title_entry.show()
+ # try:
+ from sugar3.graphics.toolbarbox import ToolbarBox
+ from sugar3.graphics.toolbarbox import ToolbarButton
+ from sugar3.activity.widgets import ShareButton
+ from sugar3.activity.widgets import StopButton
+ from sugar3.activity.widgets import ActivityButton
+ from sugar3.activity.widgets import TitleEntry
+ from sugar3.graphics.toolbutton import ToolButton
+
+ toolbar_box = ToolbarBox()
+ activity_button = ActivityButton(self)
+ toolbar_box.toolbar.insert(activity_button, 0)
+ activity_button.show()
+
+ title_entry = TitleEntry(self)
+ toolbar_box.toolbar.insert(title_entry, -1)
+ title_entry.show()
- try:
+ try:
from sugar3.activity.widgets import DescriptionItem
description_item = DescriptionItem(self)
toolbar_box.toolbar.insert(description_item, -1)
description_item.show()
- except:
+ except:
pass
- share_button = ShareButton(self)
- toolbar_box.toolbar.insert(share_button, -1)
- share_button.show()
+ share_button = ShareButton(self)
+ toolbar_box.toolbar.insert(share_button, -1)
+ share_button.show()
- separator = Gtk.SeparatorToolItem()
- toolbar_box.toolbar.insert(separator, -1)
- separator.show()
+ separator = Gtk.SeparatorToolItem()
+ toolbar_box.toolbar.insert(separator, -1)
+ separator.show()
- self._t_h_bar = atm_toolbars.TempToolbar()
- tb = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
- self._t_h_bar.show_all()
- adj_button = ToolbarButton(page=self._t_h_bar,
+ self._t_h_bar = atm_toolbars.TempToolbar()
+ tb = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
+ self._t_h_bar.show_all()
+ adj_button = ToolbarButton(page=self._t_h_bar,
icon_name='preferences-system')
- toolbar_box.toolbar.insert(adj_button, -1)
- adj_button.show()
+ toolbar_box.toolbar.insert(adj_button, -1)
+ adj_button.show()
- self._smoot_bar = smoot_toolbar.SmootToolbar(self)
- self._smoot_bar.show_all()
- custom_button = ToolbarButton(page=self._smoot_bar,
+ self._smoot_bar = smoot_toolbar.SmootToolbar(self)
+ self._smoot_bar.show_all()
+ custom_button = ToolbarButton(page=self._smoot_bar,
icon_name='view-source')
- toolbar_box.toolbar.insert(custom_button, -1)
- custom_button.show()
+ toolbar_box.toolbar.insert(custom_button, -1)
+ custom_button.show()
- separator = Gtk.SeparatorToolItem()
- separator.props.draw = False
- separator.set_expand(True)
- toolbar_box.toolbar.insert(separator, -1)
- separator.show()
+ separator = Gtk.SeparatorToolItem()
+ separator.props.draw = False
+ separator.set_expand(True)
+ toolbar_box.toolbar.insert(separator, -1)
+ separator.show()
- stop_button = StopButton(self)
- toolbar_box.toolbar.insert(stop_button, -1)
- stop_button.show()
+ stop_button = StopButton(self)
+ toolbar_box.toolbar.insert(stop_button, -1)
+ stop_button.show()
- self.set_toolbar_box(toolbar_box)
- toolbar_box.show()
- toolbar = toolbar_box.toolbar
+ self.set_toolbar_box(toolbar_box)
+ toolbar_box.show()
+ toolbar = toolbar_box.toolbar
- except ImportError:
- toolbox = activity.ActivityToolbox(self)
- self.set_toolbox(toolbox)
- toolbox.show()
+ #except ImportError:
+ # toolbox = activity.ActivityToolbox(self)
+ # self.set_toolbox(toolbox)
+ # toolbox.show()
- self._t_h_bar = atm_toolbars.TempToolbar()
- toolbox.add_toolbar(_("Atmosphere"), self._t_h_bar)
+ # self._t_h_bar = atm_toolbars.TempToolbar()
+ # toolbox.add_toolbar(_("Atmosphere"), self._t_h_bar)
- self._smoot_bar = smoot_toolbar.SmootToolbar(self)
- toolbox.add_toolbar(_("Custom metric"), self._smoot_bar)
+ # self._smoot_bar = smoot_toolbar.SmootToolbar(self)
+ # toolbox.add_toolbar(_("Custom metric"), self._smoot_bar)
if not self.powerd_running():
try: