Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/activity.py
diff options
context:
space:
mode:
authorSebastian Silva <sebastian@sugarlabs.org>2011-03-16 04:54:26 (GMT)
committer Sebastian Silva <sebastian@sugarlabs.org>2011-03-16 04:54:26 (GMT)
commita406b253ebbe8e139b97d183a82ce4bc6c9ce58f (patch)
treea431dc1c0cb172a391a9d8c06b31a9e6da475305 /activity.py
parenta59cdaff9f92db1ddbec49a5155bec34ff350d7b (diff)
As per design team.
Diffstat (limited to 'activity.py')
-rw-r--r--activity.py26
1 files changed, 16 insertions, 10 deletions
diff --git a/activity.py b/activity.py
index c06db43..f28e976 100644
--- a/activity.py
+++ b/activity.py
@@ -40,17 +40,18 @@ class StopWatchActivity(Activity):
Activity.__init__(self, handle)
self._logger = logging.getLogger('stopwatch-activity')
+ # we do not have collaboration features
+ # make the share option insensitive
+ self.max_participants = 1
gobject.threads_init()
# top toolbar with share and close buttons:
-
OLD_TOOLBAR = False
try:
from sugar.graphics.toolbarbox import ToolbarBox, ToolbarButton
from sugar.activity.widgets import ActivityToolbarButton, StopButton, \
- ShareButton, KeepButton
- from mybutton import MyActivityToolbarButton
+ ShareButton, KeepButton, TitleEntry, ActivityButton
except ImportError:
OLD_TOOLBAR = True
@@ -60,14 +61,13 @@ class StopWatchActivity(Activity):
toolbox.show()
else:
toolbar_box = ToolbarBox()
- self.activity_button = MyActivityToolbarButton(self)
+ self.activity_button = ActivityButton(self)
toolbar_box.toolbar.insert(self.activity_button, 0)
-
- separator = gtk.SeparatorToolItem()
- separator.props.draw = False
- separator.set_expand(True)
- toolbar_box.toolbar.insert(separator, -1)
- separator.show()
+ self.activity_button.show()
+
+ title_entry = TitleEntry(self)
+ toolbar_box.toolbar.insert(title_entry, -1)
+ title_entry.show()
share_button = ShareButton(self)
toolbar_box.toolbar.insert(share_button, -1)
@@ -77,6 +77,12 @@ class StopWatchActivity(Activity):
toolbar_box.toolbar.insert(keep_button, -1)
keep_button.show()
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ separator.set_expand(True)
+ toolbar_box.toolbar.insert(separator, -1)
+ separator.show()
+
stop_button = StopButton(self)
stop_button.props.accelerator = '<Ctrl><Shift>Q'
toolbar_box.toolbar.insert(stop_button, -1)