Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/.gitignore1
-rw-r--r--bin/sugar-shell-service.in32
-rw-r--r--bin/sugar-ui-check12
3 files changed, 11 insertions, 34 deletions
diff --git a/bin/.gitignore b/bin/.gitignore
index b86c1c9..9e78b64 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -1,2 +1 @@
-sugar
sugar-shell-service
diff --git a/bin/sugar-shell-service.in b/bin/sugar-shell-service.in
deleted file mode 100644
index 49c2764..0000000
--- a/bin/sugar-shell-service.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2008, Red Hat, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-import sys
-from os import environ
-
-if not environ.has_key('SUGAR_ACTIVITIES'):
- environ['SUGAR_ACTIVITIES'] = '@prefix@/share/sugar/activities:' \
- '@prefix@/lib64/sugar/activities:' \
- '@prefix@/lib/sugar/activities'
-
-sys.path.insert(0, '@prefix@/share/sugar/service')
-
-from main import main
-
-main()
-
-
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 \