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-07-20 14:49:11 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-07-20 14:49:11 (GMT)
commit32bb288389e2b598f9dcf59e766d8e3aaad67ec8 (patch)
tree15968d95b200c6ce5d11ccf45a5f1cb00bfe413f /shell/Shell.py
parentd6ec6db8809659e827a2d5f6387451084e99338c (diff)
Some build fixes. pygtk.require at least one time for process.
Diffstat (limited to 'shell/Shell.py')
-rwxr-xr-xshell/Shell.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/shell/Shell.py b/shell/Shell.py
index bc42645..2dc411c 100755
--- a/shell/Shell.py
+++ b/shell/Shell.py
@@ -1,6 +1,8 @@
import os
import dbus
+import pygtk
+pygtk.require('2.0')
import gtk
import wnck
import gobject
@@ -69,10 +71,14 @@ class Shell:
def get_current_activity(self):
window = self._screen.get_active_window()
- if window and window.get_window_type() == wnck.WINDOW_NORMAL:
- return ActivityHost(window.get_xid())
- else:
- return None
+ if window:
+ if window.get_window_type() == wnck.WINDOW_NORMAL:
+ return ActivityHost(window.get_xid())
+ elif window.get_window_type() == wnck.WINDOW_DIALOG:
+ parent = window.get_transient()
+ if not parent is None:
+ return ActivityHost(parent.get_xid())
+ return None
def show_people(self):
activity = self.get_current_activity()