Did I find the right examples for you? yes no

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

        def update_state(view=None, command=None, tag=None, query=None):
	if view is not None:
		put('todo.view.last', view)
	if command is not None:
		put('todo.command.last', command)
	if tag is not None:
		put('todo.tag.recent', tag)
	if query is not None:
		put('todo.user.query', query)
        


src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Todo/itemview.py   AlfredWorkflow.com(Download)
	quick_create = False
	if len(q) > 0 and tag == 'default':
		config.update_state(command='quick_create', tag='#'+tag, query=query)
		quick_create = True
	else:
		config.update_state(command='', tag='', query='')
		add_tag = config.get('todo.tag.recent')
		itemlist.save_todo(add_query,silent=True)
		config.update_state(command='', query='')
 
	info = parser.parse(query)

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Todo/itemlist.py   AlfredWorkflow.com(Download)
def clear_todos():
	todo_db = config.get('todo.db')
	if ( os.path.exists( todo_db ) ):
		os.remove( todo_db )
	config.update_state(command='clear_todos')
		else:
			print "Added '{0}'".format(task)
	config.update_state(command='add_todo', tag='#'+tag)
 
 
		save_todo_list(todos)
		tag = toremove[0]['group']
		config.update_state(command='remove_todo', tag='#'+tag)
		print "Removed '{0}'".format(toremove[0]['title'])
 
def toggle_pinned(_id):
	todo = get_todo(_id)
	toggle = False if feature(todo,'pinned') else True
	update_todo(_id, {'pinned':toggle})
	config.update_state(command='toggle_pinned',tag='#'+todo['group'])
		todos = [t for t in todos if t['group'] != tag]
		save_todo_list(todos)
		config.update_state(command='remove_tag', tag='#'+tag)
		print "Removed all items tagged #{2}".format(len(toremove), 'item' if len(toremove) == 1 else 'items', tag)
 

src/a/l/AlfredWorkflow.com-HEAD/Sources/Workflows/Todo/tagview.py   AlfredWorkflow.com(Download)
	if len(feedback_items) == 0:
		feedback_items.append(default_no_tags())
		config.update_state(tag='#default')	
	config.update_state(view='tag_view',command='display_tags')
	alfred.write(alfred.xml(feedback_items))