From d0cd8e27bdd3ef6745f2ec1ff02cc191ffbd2af8 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 06 Oct 2008 14:31:52 +0000 Subject: Fix sugar-ui-check. Load activities from system path. --- (limited to 'bin/sugar-ui-check') diff --git a/bin/sugar-ui-check b/bin/sugar-ui-check index d9230e4..482c952 100644 --- a/bin/sugar-ui-check +++ b/bin/sugar-ui-check @@ -21,6 +21,7 @@ import sys import subprocess import time +import dbus import gobject import gtk import wnck @@ -28,6 +29,7 @@ import wnck from sugar import wm from jarabe.model.shell import get_sugar_window_type +from sugar.bundle.activitybundle import ActivityBundle from jarabe import config checks_queue = [] @@ -98,7 +100,15 @@ class ActivityCheck(Check): def launch_activity(self): from sugar.activity import activityfactory - activityfactory.create(self.name) + bus = dbus.SessionBus() + proxy = bus.get_object('org.laptop.Shell', '/org/laptop/Shell') + iface = dbus.Interface(proxy, 'org.laptop.Shell') + path = iface.GetBundlePath(self.name) + + if path: + activityfactory.create(ActivityBundle(path)) + else: + logging.error('Cannot find activity %s.' % self.name) def _window_opened_cb(self, screen, window): if wm.get_bundle_id(window) == self.name and \ -- cgit v0.9.1