Delay importing the sugar module
This commit is contained in:
parent
ba23a6ed3a
commit
2910d23716
@ -4,7 +4,6 @@ bin_SCRIPTS = sugar-shell
|
||||
|
||||
sugardir = $(pkgdatadir)/shell
|
||||
sugar_PYTHON = \
|
||||
__init__.py \
|
||||
shellservice.py
|
||||
|
||||
confdir = $(pkgdatadir)/shell
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user