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-07-20 14:49:11 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-07-20 14:49:11 (GMT)
commit32bb288389e2b598f9dcf59e766d8e3aaad67ec8 (patch)
tree15968d95b200c6ce5d11ccf45a5f1cb00bfe413f /shell
parentd6ec6db8809659e827a2d5f6387451084e99338c (diff)
Some build fixes. pygtk.require at least one time for process.
Diffstat (limited to 'shell')
-rw-r--r--shell/Makefile.am2
-rwxr-xr-xshell/Shell.py14
-rwxr-xr-xshell/sugar-activity-factory2
3 files changed, 13 insertions, 5 deletions
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 05fa2c4..4bdb346 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -11,7 +11,7 @@ sugar_PYTHON = \
__init__.py \
ActivitiesModel.py \
ActivityRegistry.py \
- ConsoleLogger.py \
+ ConsoleWindow.py \
Emulator.py \
Owner.py \
HomeWindow.py \
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()
diff --git a/shell/sugar-activity-factory b/shell/sugar-activity-factory
index b572c12..1b42fbf 100755
--- a/shell/sugar-activity-factory
+++ b/shell/sugar-activity-factory
@@ -2,6 +2,8 @@
import sys
+import pygtk
+pygtk.require('2.0')
import gobject
from sugar.activity import Activity