Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/activity/activity.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2011-07-24 16:42:48 (GMT)
committer Simon Schampijer <simon@schampijer.de>2011-07-24 16:42:48 (GMT)
commit9d21fd7511af184e2ad45f5f63349e3f1c364a75 (patch)
tree646aa727cced8e6ee602973d58bc0eafc1ca709c /src/sugar/activity/activity.py
parente7430faac9735eca60e33a5fb34f2a5a7cbe238e (diff)
Update window title when the activity title changes - OLPC #10978
The patch updates the window title when the user changes the title in the toolbar or in the Journal. Signed-of-by: Gonzalo Odiard <gonzalo@laptop.org> Acked-By: Simon Schampijer <simon@laptop.org>
Diffstat (limited to 'src/sugar/activity/activity.py')
-rw-r--r--src/sugar/activity/activity.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py
index 53e6062..fce1a12 100644
--- a/src/sugar/activity/activity.py
+++ b/src/sugar/activity/activity.py
@@ -340,6 +340,8 @@ class Activity(Window, gtk.Container):
self._jobject.metadata['icon-color'] = \
self.shared_activity.props.color
self.set_title(self._jobject.metadata['title'])
+ self._jobject.metadata.connect('updated',
+ self.__jobject_updated_cb)
def _initialize_journal_object(self):
title = _('%s Activity') % get_bundle_name()
@@ -364,6 +366,11 @@ class Activity(Window, gtk.Container):
return jobject
+ def __jobject_updated_cb(self, jobject):
+ if self.get_title() == jobject['title']:
+ return
+ self.set_title(jobject['title'])
+
def _set_up_sharing(self, mesh_instance, share_scope):
# handle activity share/join
logging.debug('*** Act %s, mesh instance %r, scope %s',