Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-06 12:43:03 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-11-06 20:05:45 (GMT)
commit0e854281f1c4e51b6a73129b4c4aaee93f5a0285 (patch)
tree541f8b28b4b3d5030bbead7aaeb5249e48848565
parent0a4864fa06dccd97b0907ff16a80c058b39f34db (diff)
Move IntroWindow creation to sugar-session
It avoids the unexpected side effect (showing the intro UI implicityly when we are just checking the profile existence). It also prepares for listening to an IntroWindow done signal instead of blocking in a mainloop. Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com> Acked-by: Simon Schampijer <simon@laptop.org>
-rwxr-xr-xbin/sugar-session7
-rw-r--r--src/jarabe/intro/__init__.py8
2 files changed, 7 insertions, 8 deletions
diff --git a/bin/sugar-session b/bin/sugar-session
index 23f88a1..5c72ff2 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -278,6 +278,7 @@ def main():
from jarabe.desktop import homewindow
from jarabe.model import sound
from jarabe import intro
+ from jarabe.intro.window import IntroWindow
logger.start('shell')
@@ -301,7 +302,11 @@ def main():
# TODO #3204
if subprocess.call('echo $DISPLAY; xsetroot -cursor_name left_ptr', shell=True):
logging.warning('Can not reset cursor')
- intro.check_profile()
+
+ if not intro.check_profile():
+ win = IntroWindow()
+ win.show_all()
+ Gtk.main()
start_ui_service()
start_session_manager()
diff --git a/src/jarabe/intro/__init__.py b/src/jarabe/intro/__init__.py
index d2e9276..0045c74 100644
--- a/src/jarabe/intro/__init__.py
+++ b/src/jarabe/intro/__init__.py
@@ -1,11 +1,8 @@
import os
-from gi.repository import Gtk
-
from sugar3 import env
from sugar3.profile import get_profile
-from jarabe.intro.window import IntroWindow
from jarabe.intro.window import create_profile
@@ -20,7 +17,4 @@ def check_profile():
if os.path.exists(path):
profile.convert_profile()
- if not profile.is_valid():
- win = IntroWindow()
- win.show_all()
- Gtk.main()
+ return profile.is_valid()