Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/Shell.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-17 12:23:52 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-17 12:23:52 (GMT)
commitf65d23c44002fe94477cb3354667e9297e386092 (patch)
treeffa41ac5844b5660288af9f8c80e880e3d5584a7 /shell/Shell.py
parent10f356cb22ffcaddfbbcd0b8332ef65409e5bf5f (diff)
Add icon for activity to the donut.
Add signals in the shell for window open/close and use them in the task view.
Diffstat (limited to 'shell/Shell.py')
-rwxr-xr-xshell/Shell.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/shell/Shell.py b/shell/Shell.py
index 614e1d1..50072fb 100755
--- a/shell/Shell.py
+++ b/shell/Shell.py
@@ -39,7 +39,10 @@ class ShellDbusService(dbus.service.Object):
class Shell(gobject.GObject):
__gsignals__ = {
- 'activity-closed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([str]))
+ 'activity-opened': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT])),
+ 'activity-closed': (gobject.SIGNAL_RUN_FIRST,
+ gobject.TYPE_NONE, ([gobject.TYPE_PYOBJECT]))
}
def __init__(self, registry):
@@ -71,14 +74,16 @@ class Shell(gobject.GObject):
def __window_opened_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
- self._hosts[window.get_xid()] = ActivityHost(self, window)
+ host = ActivityHost(self, window)
+ self._hosts[window.get_xid()] = host
+ self.emit('activity-opened', host)
def __window_closed_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
xid = window.get_xid()
- activity = self._hosts[xid]
- self.emit('activity-closed', activity.get_id())
+ host = self._hosts[xid]
+ self.emit('activity-closed', host)
del self._hosts[xid]