Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-05-14 17:56:06 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-05-14 17:56:06 (GMT)
commit141072c9e99ec4517bb40eaeecb39e42cbdc24b5 (patch)
tree854405e652c6170ccbb49430b38105298c88fc7c /sugar
parent8ccb393b55985b7196172e892f2fae1e967558b5 (diff)
Set a default title for the activity
Diffstat (limited to 'sugar')
-rw-r--r--sugar/activity/activity.py7
-rw-r--r--sugar/activity/activityfactoryservice.py1
2 files changed, 7 insertions, 1 deletions
diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py
index 2156594..6f81125 100644
--- a/sugar/activity/activity.py
+++ b/sugar/activity/activity.py
@@ -195,7 +195,7 @@ class Activity(Window, gtk.Container):
elif create_jobject:
logging.debug('Creating a jobject.')
self.jobject = datastore.create()
- self.jobject['title'] = ''
+ self.jobject['title'] = '%s %s' % (get_bundle_name(), 'Activity')
self.jobject['activity'] = self.get_service_name()
self.jobject['date'] = str(time.time())
self.jobject['icon'] = ''
@@ -312,6 +312,11 @@ class Activity(Window, gtk.Container):
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
+ """
+ return os.environ['SUGAR_BUNDLE_NAME']
+
def get_bundle_path():
"""Return the bundle path for the current process' bundle
"""
diff --git a/sugar/activity/activityfactoryservice.py b/sugar/activity/activityfactoryservice.py
index ee98f51..21e7d5b 100644
--- a/sugar/activity/activityfactoryservice.py
+++ b/sugar/activity/activityfactoryservice.py
@@ -152,6 +152,7 @@ def run(bundle_path):
os.environ['SUGAR_BUNDLE_PATH'] = bundle_path
os.environ['SUGAR_BUNDLE_SERVICE_NAME'] = bundle.get_service_name()
+ os.environ['SUGAR_BUNDLE_NAME'] = bundle.get_name()
factory = ActivityFactoryService(bundle.get_service_name(),
bundle.get_class())