def record_sign_info(my_app, root, sign_dialog): email_input = find_view(root, 'email_input') password_input = find_view(root, 'password_input') url_input = find_view(root, 'url_input') # TODO: set email and password email = email_input.property("text") password = password_input.property("text") url = url_input.property("text") answers = get_answers(url, url_input) answer = next(answers) load_answer(answer.html, my_app.web_view) if answers: sign_dialog.close()
def record_add_info(my_app, add_dialog, error_dialog): root = add_dialog.root_view url_input = find_view(root, 'url_input') feed_num_input = find_view(root, 'feed_num_input') url = url_input.property("text") feed_num = feed_num_input.property("text") add_dialog.close() try: noticer = Noticer(url=url) except UrlError: error_dialog.set_error_info("添加失败。错误:主页url无效!") error_dialog.show() return # progress_dialog = progress.show_progress_dialog(noticer.name, feed_num) add_new_feedslist(my_app, noticer, feed_num)