Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-15 09:23:46 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-15 09:23:46 (GMT)
commit9fa0790c2be829bcd652a49ed9c6e52989dcbfe7 (patch)
treebd1936b88afdd4ef05da67e42bce549ebe2552aa
parent871828f307cafbd2d320ba5a0228b88a3170a6ef (diff)
Do not assume we are packing an ActivityToolbox inside the activity
-rwxr-xr-xbuild-snapshot.sh2
-rw-r--r--sugar/activity/activity.py24
2 files changed, 10 insertions, 16 deletions
diff --git a/build-snapshot.sh b/build-snapshot.sh
index b31280c..7376c78 100755
--- a/build-snapshot.sh
+++ b/build-snapshot.sh
@@ -1,6 +1,6 @@
VERSION=0.63
DATE=`date +%Y%m%d`
-RELEASE=2.80
+RELEASE=2.82
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
rm sugar-$VERSION.tar.bz2
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index 6f81125..85355f4 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -35,11 +35,6 @@ from sugar.datastore import datastore
from sugar import profile
class ActivityToolbar(gtk.Toolbar):
- __gsignals__ = {
- 'share-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
- 'close-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([]))
- }
-
def __init__(self, activity):
gtk.Toolbar.__init__(self)
@@ -63,6 +58,7 @@ class ActivityToolbar(gtk.Toolbar):
separator.show()
self.share = ToolButton('stock-share-mesh')
+ self.share.connect('clicked', self._share_clicked_cb)
self.insert(self.share, -1)
if activity.get_shared():
self.share.set_sensitive(False)
@@ -74,9 +70,16 @@ class ActivityToolbar(gtk.Toolbar):
separator.show()
self.close = ToolButton('window-close')
+ self.close.connect('clicked', self._close_clicked_cb)
self.insert(self.close, -1)
self.close.show()
+ def _share_clicked_cb(self, button):
+ self._activity.share()
+
+ def _close_clicked_cb(self, button):
+ self._activity.close()
+
def _jobject_updated_cb(self, jobject):
self.title.set_text(jobject['title'])
@@ -294,7 +297,7 @@ class Activity(Window, gtk.Container):
if self._shared_activity:
self._shared_activity.leave()
- def _handle_close_cb(self, toolbar):
+ def close(self):
if self.jobject:
try:
self.save()
@@ -303,15 +306,6 @@ class Activity(Window, gtk.Container):
raise
self.destroy()
- def _handle_share_cb(self, toolbar):
- self.share()
-
- def set_toolbox(self, toolbox):
- Window.set_toolbox(self, toolbox)
- act_toolbar = toolbox.get_activity_toolbar()
- act_toolbar.share.connect('clicked', self._handle_share_cb)
- act_toolbar.close.connect('clicked', self._handle_close_cb)
-
def get_bundle_name():
"""Return the bundle name for the current process' bundle
"""