Get running activities to work. Still hacky.

This commit is contained in:
Marco Pesenti Gritti
2006-10-31 12:06:28 +01:00
parent 92f37d31da
commit cb285aba06
11 changed files with 61 additions and 16 deletions
+7 -1
View File
@@ -42,7 +42,7 @@ class ActivityChatWindow(gtk.Window):
self.add(chat_widget)
class ActivityHost:
def __init__(self, window):
def __init__(self, shell_model, window):
self._window = window
self._xid = window.get_xid()
self._pservice = PresenceService.get_instance()
@@ -56,8 +56,14 @@ class ActivityHost:
self._type = self._activity.get_type()
self._gdk_window = gtk.gdk.window_foreign_new(self._xid)
# FIXME Old activity registry support, cleanup
registry = conf.get_activity_registry()
info = registry.get_activity(self._type)
if not info:
registry = shell_model.get_bundle_registry()
info = registry.get_bundle(self._type)
self._icon_name = info.get_icon()
try:
+1 -1
View File
@@ -96,7 +96,7 @@ class Shell(gobject.GObject):
def __window_opened_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
activity_host = ActivityHost(window)
activity_host = ActivityHost(self.get_model(), window)
self._hosts[activity_host.get_xid()] = activity_host
self.emit('activity-opened', activity_host)