Пример #1
0
def _parse_choice(builder, meta, oauth, choice, lets_connect):
    meta.profile_display_name, meta.profile_id, meta.two_factor, two_factor_method = choice
    meta.two_factor_method = two_factor_method.split(",")
    parse_config_step(builder=builder,
                      oauth=oauth,
                      meta=meta,
                      lets_connect=lets_connect)
Пример #2
0
def _parse_choice(builder, meta, oauth, choice, lets_connect):
    # type: (Gtk.builder, Metadata, str, dict, bool) -> None
    meta.profile_display_name, meta.profile_id, meta.two_factor, two_factor_method = choice
    meta.two_factor_method = two_factor_method.split(",")
    parse_config_step(builder=builder,
                      oauth=oauth,
                      meta=meta,
                      lets_connect=lets_connect)
Пример #3
0
def fetch_profile_step(builder, meta, oauth, lets_connect):
    # type : (Gtk.Builder, Metadata, oauth, bool) -> None
    """background action step, fetches profiles and shows 'fetching' screen"""
    logger.info("fetching profile step")

    if meta.profile_id:
        logger.info("we already selected the profile in the past, not presenting user with choice again")
        parse_config_step(builder=builder, oauth=oauth, meta=meta, lets_connect=lets_connect)
        return

    fetching_window(builder=builder, lets_connect=lets_connect)
    dialog = builder.get_object('fetch-dialog')
    thread_helper(lambda: _background(oauth, meta, builder, dialog, lets_connect=lets_connect))
    dialog.run()