Initialize window title with bundle name, OLPC #11037

I had to modify the patch slightly because of
0269f819761cfd803cf4d694298c8ab6a753e242, changes
reviewed by Sascha.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-By: Simon Schampijer <simon@laptop.org>
Reviewed-by: Sascha Silbe <silbe@activitycentral.com>
This commit is contained in:
Simon Schampijer 2011-07-24 19:19:04 +02:00
parent 9d21fd7511
commit d0a493e532

View File

@ -335,13 +335,17 @@ class Activity(Window, gtk.Container):
warn_if_none=False) warn_if_none=False)
self._set_up_sharing(mesh_instance, share_scope) self._set_up_sharing(mesh_instance, share_scope)
if not create_jobject:
self.set_title(get_bundle_name())
return
if self.shared_activity is not None: if self.shared_activity is not None:
self._jobject.metadata['title'] = self.shared_activity.props.name self._jobject.metadata['title'] = self.shared_activity.props.name
self._jobject.metadata['icon-color'] = \ self._jobject.metadata['icon-color'] = \
self.shared_activity.props.color self.shared_activity.props.color
self.set_title(self._jobject.metadata['title']) self.set_title(self._jobject.metadata['title'])
self._jobject.metadata.connect('updated', self._jobject.metadata.connect('updated',
self.__jobject_updated_cb) self.__jobject_updated_cb)
def _initialize_journal_object(self): def _initialize_journal_object(self):
title = _('%s Activity') % get_bundle_name() title = _('%s Activity') % get_bundle_name()