From b2980d7bd6c052c30d5a279cdc9c577a087ae66e Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 3 Jun 2007 22:12:47 +0200 Subject: [PATCH] Restore get_id/get_service_name, didn't realize they was used by subclasses. --- sugar/activity/activity.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 143fa945..c098dc02 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -209,7 +209,7 @@ class Activity(Window, gtk.Container): logging.debug('Creating a jobject.') self._jobject = datastore.create() self._jobject.metadata['title'] = '%s %s' % (get_bundle_name(), 'Activity') - self._jobject.metadata['activity'] = self._get_service_name() + self._jobject.metadata['activity'] = self.get_service_name() self._jobject.metadata['keep'] = '0' self._jobject.metadata['buddies'] = '' self._jobject.metadata['preview'] = '' @@ -232,6 +232,12 @@ class Activity(Window, gtk.Container): if pspec.name == 'active': return self._active + def get_id(self): + return self._activity_id + + def get_service_name(self): + return os.environ['SUGAR_BUNDLE_SERVICE_NAME'] + def set_canvas(self, canvas): Window.set_canvas(self, canvas) canvas.connect('map', self._canvas_map_cb) @@ -316,11 +322,8 @@ class Activity(Window, gtk.Container): """Execute the given command with args""" return False - def _get_service_name(self): - return os.environ['SUGAR_BUNDLE_SERVICE_NAME'] - def _realize_cb(self, window): - wm.set_bundle_id(window.window, self._get_service_name()) + wm.set_bundle_id(window.window, self.get_service_name()) wm.set_activity_id(window.window, self._activity_id) def _destroy_cb(self, window):