Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/webtoolbar.py
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2011-10-30 16:36:25 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-11-18 17:18:33 (GMT)
commitb517c69c46be6eaafbf200c8f513b1395f84e694 (patch)
tree527984c35e532518bbf1fca26dc8ef38cd1158bb /webtoolbar.py
parent931f33bd1437dbc50df3b2c88d59a7e23f91dab5 (diff)
Remove old toolbars support
Reviewed-by: Manuel Quinones <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'webtoolbar.py')
-rw-r--r--webtoolbar.py25
1 files changed, 8 insertions, 17 deletions
diff --git a/webtoolbar.py b/webtoolbar.py
index a4623be..97bdcd6 100644
--- a/webtoolbar.py
+++ b/webtoolbar.py
@@ -26,14 +26,9 @@ from xpcom.components import interfaces
from sugar.graphics.toolbutton import ToolButton
from sugar.graphics.menuitem import MenuItem
from sugar.graphics import iconentry
-try:
- from sugar.graphics.toolbarbox import ToolbarBox as ToolbarBase
- from sugar.activity.widgets import ActivityToolbarButton
- from sugar.activity.widgets import StopButton
- NEW_TOOLBARS = True
-except ImportError:
- from gtk import Toolbar as ToolbarBase
- NEW_TOOLBARS = False
+from sugar.graphics.toolbarbox import ToolbarBox as ToolbarBase
+from sugar.activity.widgets import ActivityToolbarButton
+from sugar.activity.widgets import StopButton
import filepicker
import places
@@ -242,12 +237,9 @@ class PrimaryToolbar(ToolbarBase):
self._loading = False
- if NEW_TOOLBARS:
- toolbar = self.toolbar
- activity_button = ActivityToolbarButton(self._activity)
- toolbar.insert(activity_button, 0)
- else:
- toolbar = self
+ toolbar = self.toolbar
+ activity_button = ActivityToolbarButton(self._activity)
+ toolbar.insert(activity_button, 0)
self._go_home = ToolButton('go-home')
self._go_home.set_tooltip(_('Home page'))
@@ -289,9 +281,8 @@ class PrimaryToolbar(ToolbarBase):
toolbar.insert(self._link_add, -1)
self._link_add.show()
- if NEW_TOOLBARS:
- stop_button = StopButton(self._activity)
- toolbar.insert(stop_button, -1)
+ stop_button = StopButton(self._activity)
+ toolbar.insert(stop_button, -1)
self._progress_listener = None
self._history = None