Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-09 16:29:33 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-09 16:29:33 (GMT)
commit0dcaf314f7933a6852bd45ea1d6705bfb5659443 (patch)
tree96cf6753b900524c06146bfede49005206edb76e /shell
parent95d9b7fe8e7cbde413ef5f937cc1dda2b7fa8813 (diff)
Several fixes and cleanups
Diffstat (limited to 'shell')
-rw-r--r--shell/ActivityHost.py13
-rw-r--r--shell/PresenceView.py2
-rwxr-xr-xshell/Shell.py4
3 files changed, 10 insertions, 9 deletions
diff --git a/shell/ActivityHost.py b/shell/ActivityHost.py
index f2287c4..c5c0335 100644
--- a/shell/ActivityHost.py
+++ b/shell/ActivityHost.py
@@ -5,18 +5,19 @@ from sugar.activity import Activity
from PeopleWindow import PeopleWindow
class ActivityHost:
- def __init__(self, shell, xid):
+ def __init__(self, shell, window):
self._shell = shell
- self._xid = xid
-
+
+ xid = window.get_xid()
+
bus = dbus.SessionBus()
- path = Activity.ACTIVITY_SERVICE_PATH + "/%s" % xid
- proxy_obj = bus.get_object(Activity.ACTIVITY_SERVICE_NAME, path)
+ proxy_obj = bus.get_object(Activity.get_service_name(xid),
+ Activity.get_object_path(xid))
self._activity = dbus.Interface(proxy_obj, Activity.ACTIVITY_INTERFACE)
self._id = self._activity.get_id()
self._default_type = self._activity.get_default_type()
- self._window = gtk.gdk.window_foreign_new(xid)
+ self._window = gtk.gdk.window_foreign_new(window.get_xid())
self._people_window = PeopleWindow(shell, self)
def get_id(self):
diff --git a/shell/PresenceView.py b/shell/PresenceView.py
index 4ecb799..692d836 100644
--- a/shell/PresenceView.py
+++ b/shell/PresenceView.py
@@ -111,7 +111,7 @@ class PresenceView(gtk.VBox):
if buddy:
chat_service = buddy.get_service_of_type(BuddyChat.SERVICE_TYPE)
activity = self._shell.start_activity('com.redhat.Sugar.ChatActivity')
- #activity.execute('start', [chat_service.object_path()])
+ activity.execute('start', [chat_service.object_path()])
def __buddy_icon_changed_cb(self, buddy):
it = self._get_iter_for_buddy(buddy)
diff --git a/shell/Shell.py b/shell/Shell.py
index a239809..7b8074a 100755
--- a/shell/Shell.py
+++ b/shell/Shell.py
@@ -17,6 +17,7 @@ from sugar.presence.PresenceService import PresenceService
from ActivityHost import ActivityHost
from ChatController import ChatController
from sugar.activity import ActivityFactory
+from sugar.activity import Activity
class ShellDbusService(dbus.service.Object):
def __init__(self, shell, bus_name):
@@ -73,8 +74,7 @@ class Shell:
def __window_opened_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
- xid = window.get_xid()
- self._hosts[xid] = ActivityHost(self, xid)
+ self._hosts[window.get_xid()] = ActivityHost(self, window)
def __window_closed_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL: