Esempio n. 1
0
def save():
    global body
    if not storyfile.current():
        choice = None
        while not choice in ["y", "n"]:
            choice = menu.menu_save()
        if choice == "y":
            database.commit_queue(storyfile.abs_to_sql())
            body = "Saved."
        elif choice == "n":
            pass
    else:
        body = "Nothing to save."
Esempio n. 2
0
def save():
	global body
	if not storyfile.current():
		choice = None
		while not choice in ["y", "n"]:
			choice = menu.menu_save()
		if choice == "y":
			database.commit_queue(storyfile.abs_to_sql())
			body = "Saved."
		elif choice == "n":
			pass
	else:
		body = "Nothing to save."
Esempio n. 3
0
def close():
    global context
    if not storyfile.current():
        choice = None
        while not choice in ["y", "n", "c"]:
            choice = menu.menu_close()
        if choice == "y":
            database.commit_queue(storyfile.abs_to_sql())
        elif choice == "n":
            pass
        else:
            return False
    database.conn.close()
    context = [VERSION, "INIT", None]
    return True
Esempio n. 4
0
def close():
	global context
	if not storyfile.current():
		choice = None
		while not choice in ["y", "n", "c"]:
			choice = menu.menu_close()
		if choice == "y":
			database.commit_queue(storyfile.abs_to_sql())
		elif choice == "n":
			pass
		else:
			return False
	database.conn.close()
	context = [VERSION, "INIT", None]
	return True