Delay importing the sugar module

This commit is contained in:
Marco Pesenti Gritti 2007-04-15 14:49:24 +02:00
parent ba23a6ed3a
commit 2910d23716
2 changed files with 2 additions and 3 deletions

View File

@ -4,7 +4,6 @@ bin_SCRIPTS = sugar-shell
sugardir = $(pkgdatadir)/shell
sugar_PYTHON = \
__init__.py \
shellservice.py
confdir = $(pkgdatadir)/shell

View File

@ -25,8 +25,6 @@ pygtk.require('2.0')
import gtk
import gobject
from sugar import env
def _get_display_number():
"""Find a free display number trying to connect to 6000+ ports"""
retries = 20
@ -90,6 +88,8 @@ else:
_gtk_xft_dpi = float(gtk.settings_get_default().get_property('gtk-xft-dpi'))
_start_xephyr(width, height, _gtk_xft_dpi / 1024)
from sugar import env
os.environ['GTK2_RC_FILES'] = env.get_data_path('gtkrc')
os.execlp('dbus-launch', 'dbus-launch', '--exit-with-session', program)