Some build fixes. pygtk.require at least one time for process.
This commit is contained in:
parent
d6ec6db880
commit
32bb288389
@ -11,7 +11,7 @@ sugar_PYTHON = \
|
||||
__init__.py \
|
||||
ActivitiesModel.py \
|
||||
ActivityRegistry.py \
|
||||
ConsoleLogger.py \
|
||||
ConsoleWindow.py \
|
||||
Emulator.py \
|
||||
Owner.py \
|
||||
HomeWindow.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()
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
import sys
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gobject
|
||||
|
||||
from sugar.activity import Activity
|
||||
|
@ -6,7 +6,6 @@ sugar_PYTHON = \
|
||||
__installed__.py \
|
||||
bots.py \
|
||||
env.py \
|
||||
keybindings.py \
|
||||
theme.py \
|
||||
util.py \
|
||||
LogWriter.py
|
||||
|
Loading…
Reference in New Issue
Block a user