Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Adds a new Item to this handler without using the Alfred.Item class!

Keyword arguments:
title -- The title of this item
subtitle -- The subtitle of this item
uid -- The uid of this item (default: None)
arg -- The argument of this item
icon -- The icon of this item (Default: None)

src/a/l/alfred.py-HEAD/example.py   alfred.py(Download)
 
# Add item with add_new_item
handler.add_new_item(title="Sir, you're doing it wrong!", subtitle=handler.query, arg="Hello", uid="cake")
 
# check if the handler has no query
if handler.query_is_empty():
	handler.add_new_item(title="No query :(")

src/a/l/alfred-haxelib-HEAD/haxelib_list_local.py   alfred-haxelib(Download)
			other_lib_count = len(libs[lib]["other"])
			subtitle = "" if not other_lib_count > 0 else "%s other versions installed." % other_lib_count
			handler.add_new_item(title="%s [%s]" % (lib, libs[lib]["actual_version"]), subtitle=subtitle, uid=lib, arg=lib)
else:
	if lib_name in libs.iterkeys():
		for version in libs[lib_name]["other"]:
			if lib_version in version:
				handler.add_new_item(title="%s: version %s" % (lib_name, version), uid=lib_name, arg="%s %s" %(lib_name, lib_version))

src/a/l/alfred-haxelib-HEAD/haxelib_install.py   alfred-haxelib(Download)
		handler.add_item(item)
 
handler.add_new_item(title="%s libraries found" % number_of_libs)
 
handler.push()