示例#1
0
文件: main.py 项目: worr/sugar
def main():
    GLib.threads_init()
    Gdk.threads_init()
    dbus.glib.threads_init()
    Gst.init(sys.argv)

    cleanup_temporary_files()

    _start_window_manager()

    setup_locale()
    setup_fonts()
    setup_theme()

    # this must be added early, so that it executes and unfreezes the screen
    # even when we initially get blocked on the intro screen
    GLib.idle_add(unfreeze_dcon_cb)

    GLib.idle_add(setup_cursortracker_cb)
    sound.restore()
    keyboard.setup()

    sys.path.append(config.ext_path)

    if not intro.check_profile():
        _start_intro()
    else:
        _begin_desktop_startup()

    try:
        Gtk.main()
    except KeyboardInterrupt:
        print 'Ctrl+C pressed, exiting...'

    _stop_window_manager()
示例#2
0
文件: main.py 项目: ajaygarg84/sugar
def main():
    GLib.threads_init()
    Gdk.threads_init()
    dbus.glib.threads_init()
    Gst.init(sys.argv)

    cleanup_temporary_files()

    _start_window_manager()

    setup_locale()
    setup_fonts()
    setup_theme()

    # this must be added early, so that it executes and unfreezes the screen
    # even when we initially get blocked on the intro screen
    GObject.idle_add(unfreeze_dcon_cb)

    GObject.idle_add(setup_cursortracker_cb)
    sound.restore()
    keyboard.setup()

    sys.path.append(config.ext_path)

    if not intro.check_profile():
        _start_intro()
    else:
        _begin_desktop_startup()

    try:
        Gtk.main()
    except KeyboardInterrupt:
        print 'Ctrl+C pressed, exiting...'

    _stop_window_manager()
示例#3
0
def main():
    # This can be removed once pygobject-3.10 is a requirement.
    # https://bugzilla.gnome.org/show_bug.cgi?id=686914
    GLib.threads_init()

    Gst.init(sys.argv)

    _migrate_gconf_to_gsettings()

    cleanup_temporary_files()

    _start_window_manager()

    setup_timezone()
    setup_fonts()
    setup_theme()
    setup_proxy()

    # this must be added early, so that it executes and unfreezes the screen
    # even when we initially get blocked on the intro screen
    GLib.idle_add(unfreeze_screen_cb)

    GLib.idle_add(setup_cursortracker_cb)
    sound.restore()
    keyboard.setup()
    brightness.get_instance()

    sys.path.append(config.ext_path)

    if not _check_profile():
        _start_intro()
    elif not _check_group_label():
        _start_intro(start_on_age_page=True)
    else:
        _begin_desktop_startup()

    try:
        Gtk.main()
    except KeyboardInterrupt:
        print 'Ctrl+C pressed, exiting...'

    _stop_window_manager()
示例#4
0
文件: main.py 项目: AbrahmAB/sugar
def main():
    # This can be removed once pygobject-3.10 is a requirement.
    # https://bugzilla.gnome.org/show_bug.cgi?id=686914
    GLib.threads_init()

    Gst.init(sys.argv)

    _migrate_gconf_to_gsettings()

    cleanup_temporary_files()

    _start_window_manager()

    setup_timezone()
    setup_fonts()
    setup_theme()
    setup_proxy()

    # this must be added early, so that it executes and unfreezes the screen
    # even when we initially get blocked on the intro screen
    GLib.idle_add(unfreeze_screen_cb)

    GLib.idle_add(setup_cursortracker_cb)
    sound.restore()
    keyboard.setup()
    brightness.get_instance()

    sys.path.append(config.ext_path)

    if not _check_profile():
        _start_intro()
    elif not _check_group_label():
        _start_intro(start_on_age_page=True)
    else:
        _begin_desktop_startup()

    try:
        Gtk.main()
    except KeyboardInterrupt:
        print 'Ctrl+C pressed, exiting...'

    _stop_window_manager()
示例#5
0
文件: main.py 项目: vish-321/sugar
def main():
    Gst.init(sys.argv)

    cleanup_temporary_files()

    _start_window_manager()

    setup_timezone()
    setup_fonts()
    setup_theme()
    setup_proxy()

    # this must be added early, so that it executes and unfreezes the screen
    # even when we initially get blocked on the intro screen
    GLib.idle_add(unfreeze_screen_cb)

    GLib.idle_add(setup_cursortracker_cb)
    sound.restore()
    keyboard.setup()
    brightness.get_instance()

    sys.path.append(config.ext_path)

    if not _check_profile():
        _start_intro()
    elif not _check_group_label():
        _start_intro(start_on_age_page=True)
    else:
        _begin_desktop_startup()

    try:
        Gtk.main()
    except KeyboardInterrupt:
        print('Ctrl+C pressed, exiting...')

    _stop_window_manager()