Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit d527bb778a0b1b1e4fe36e6dc0c2af996f4d3db0

Add support for SUGAR_PROFILE_NAME variable

If this environment variable is set, we skip the intro UI
and just setup the profile using that name.

This is going to be useful to run automated tests of the
html activities.
  
6262from jarabe.model import sound
6363from jarabe import intro
6464from jarabe.intro.window import IntroWindow
65from jarabe.intro.window import create_profile
6566from jarabe import frame
6667from jarabe.view.service import UIService
6768from jarabe import apisocket
258258 window.show_all()
259259
260260
261def _check_profile():
262 if intro.check_profile():
263 return True
264
265 profile_name = os.environ.get("SUGAR_PROFILE_NAME", None)
266 if profile_name is not None:
267 create_profile(profile_name)
268 return True
269
270 return False
271
272
261273def main():
262274 GLib.threads_init()
263275 Gdk.threads_init()
294294
295295 sys.path.append(config.ext_path)
296296
297 if not intro.check_profile():
297 if not _check_profile():
298298 _start_intro()
299299 else:
300300 _begin_desktop_startup()