diff options
author | erick <erick@sugar-dev-erick.(none)> | 2009-12-02 03:31:36 (GMT) |
---|---|---|
committer | erick <erick@sugar-dev-erick.(none)> | 2009-12-06 05:17:39 (GMT) |
commit | 1d00a7f42f8dc7905490de0d7ccf218db3730f1e (patch) | |
tree | f929d753609888ebe313ebc0455f7dd3ce5d0bbb | |
parent | 9b564472adc3040047783dc0815396090de48266 (diff) |
Reexposed explicitly the activity_name and unique_id used in probes for the dbus session as constructor arguments on probe
-rw-r--r-- | tests/probetests.py | 3 | ||||
-rw-r--r-- | tutorius/TProbe.py | 8 |
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/probetests.py b/tests/probetests.py index 17c6afc..357d223 100644 --- a/tests/probetests.py +++ b/tests/probetests.py @@ -187,7 +187,8 @@ class ProbeTest(unittest.TestCase): #Setup the activity and probe self.activity = MockActivity() - self.probe = TProbe(self.activity, MockServiceProxy()) + self.probe = TProbe(self.activity, self.activity.get_bundle_id(), + self.activity.get_id(), service_proxy=MockServiceProxy()) #Override the eventOccured on the Probe... self.old_eO = self.probe.eventOccured diff --git a/tutorius/TProbe.py b/tutorius/TProbe.py index 2834f0c..0814b13 100644 --- a/tutorius/TProbe.py +++ b/tutorius/TProbe.py @@ -57,11 +57,13 @@ class TProbe(dbus.service.Object): a DBUS Interface. """ - def __init__(self, activity, service_proxy=None): + def __init__(self, activity, activity_name, unique_id, service_proxy=None): """ Create and register a TProbe for an activity. @param activity activity reference, must be a gtk container + @param activity_name generic name for the activity + @param unique_id specific name for this instance @param service_proxy A Service proxy object to do the registering """ # Moving the ObjectStore assignment here, in the meantime @@ -77,8 +79,8 @@ class TProbe(dbus.service.Object): ObjectStore().activity = activity - self._activity_name = activity.get_bundle_id() - self._unique_id = activity.get_id() + self._activity_name = activity_name + self._unique_id = unique_id LOGGER.debug("TProbe :: Creating TProbe for %s (%d)", self._activity_name, os.getpid()) LOGGER.debug("TProbe :: Current gobject context: %s", str(gobject.main_context_default())) |