Renamed register_ac->completer_add
This commit is contained in:
@@ -44,4 +44,4 @@ def prof_init(version, status):
|
||||
examples = []
|
||||
|
||||
prof.register_command("/chatterbot", 0, 1, synopsis, description, args, examples, _cmd_chatterbot)
|
||||
prof.register_ac("/chatterbot", [ "enable", "disable" ])
|
||||
prof.completer_add("/chatterbot", [ "enable", "disable" ])
|
||||
|
||||
12
jenkins.py
12
jenkins.py
@@ -222,9 +222,9 @@ def _jenkins_poll():
|
||||
job_ac.append(name)
|
||||
|
||||
if not job_list:
|
||||
prof.register_ac("/jenkins build", job_ac)
|
||||
prof.register_ac("/jenkins open", job_ac)
|
||||
prof.register_ac("/jenkins log", job_ac)
|
||||
prof.completer_add("/jenkins build", job_ac)
|
||||
prof.completer_add("/jenkins open", job_ac)
|
||||
prof.completer_add("/jenkins log", job_ac)
|
||||
|
||||
job_list = new_job_list
|
||||
changes_list = new_changes_list
|
||||
@@ -449,7 +449,7 @@ def prof_init(version, status):
|
||||
prof.register_timed(_prof_callback, prof_cb_interval)
|
||||
prof.register_timed(_remind, prof_remind_interval)
|
||||
|
||||
prof.register_ac(
|
||||
prof.completer_add(
|
||||
"/jenkins", [
|
||||
"help",
|
||||
"jobs",
|
||||
@@ -464,13 +464,13 @@ def prof_init(version, status):
|
||||
"settings"
|
||||
]
|
||||
);
|
||||
prof.register_ac(
|
||||
prof.completer_add(
|
||||
"/jenkins remind", [
|
||||
"on",
|
||||
"off"
|
||||
]
|
||||
);
|
||||
prof.register_ac(
|
||||
prof.completer_add(
|
||||
"/jenkins notify", [
|
||||
"on",
|
||||
"off"
|
||||
|
||||
2
say.py
2
say.py
@@ -64,4 +64,4 @@ def prof_init(version, status):
|
||||
examples = []
|
||||
|
||||
prof.register_command("/say", 1, 2, synopsis, description, args, examples, _cmd_say)
|
||||
prof.register_ac("/say", [ "on", "off", "test" ])
|
||||
prof.completer_add("/say", [ "on", "off", "test" ])
|
||||
|
||||
@@ -71,4 +71,4 @@ def prof_init(version, status):
|
||||
"/system send uname -a"
|
||||
]
|
||||
prof.register_command("/system", 0, 2, synopsis, description, args, examples, _cmd_system)
|
||||
prof.register_ac("/system", [ "exec", "send" ])
|
||||
prof.completer_add("/system", [ "exec", "send" ])
|
||||
|
||||
@@ -342,7 +342,7 @@ def prof_init(version, status):
|
||||
|
||||
prof.register_command("/python-test", 1, 5, synopsis, description, args, examples, _cmd_pythontest)
|
||||
|
||||
prof.register_ac("/python-test",
|
||||
prof.completer_add("/python-test",
|
||||
[
|
||||
"consalert",
|
||||
"consshow",
|
||||
@@ -361,19 +361,19 @@ def prof_init(version, status):
|
||||
"int",
|
||||
"incoming" ]
|
||||
)
|
||||
prof.register_ac("/python-test get",
|
||||
prof.completer_add("/python-test get",
|
||||
[ "recipient", "room" ]
|
||||
)
|
||||
prof.register_ac("/python-test log",
|
||||
prof.completer_add("/python-test log",
|
||||
[ "debug", "info", "warning", "error" ]
|
||||
)
|
||||
prof.register_ac("/python-test boolean",
|
||||
prof.completer_add("/python-test boolean",
|
||||
[ "get", "set" ]
|
||||
)
|
||||
prof.register_ac("/python-test string",
|
||||
prof.completer_add("/python-test string",
|
||||
[ "get", "set" ]
|
||||
)
|
||||
prof.register_ac("/python-test int",
|
||||
prof.completer_add("/python-test int",
|
||||
[ "get", "set" ]
|
||||
)
|
||||
|
||||
|
||||
@@ -513,22 +513,22 @@ prof_init(const char * const version, const char * const status)
|
||||
"incoming",
|
||||
NULL
|
||||
};
|
||||
prof_register_ac("/c-test", cmd_ac);
|
||||
prof_completer_add("/c-test", cmd_ac);
|
||||
|
||||
char *get_ac[] = { "recipient", "room", NULL };
|
||||
prof_register_ac("/c-test get", get_ac);
|
||||
prof_completer_add("/c-test get", get_ac);
|
||||
|
||||
char *log_ac[] = { "debug", "info", "warning", "error", NULL };
|
||||
prof_register_ac("/c-test log", log_ac);
|
||||
prof_completer_add("/c-test log", log_ac);
|
||||
|
||||
char *boolean_ac[] = { "get", "set", NULL };
|
||||
prof_register_ac("/c-test boolean", boolean_ac);
|
||||
prof_completer_add("/c-test boolean", boolean_ac);
|
||||
|
||||
char *string_ac[] = { "get", "set", NULL };
|
||||
prof_register_ac("/c-test string", string_ac);
|
||||
prof_completer_add("/c-test string", string_ac);
|
||||
|
||||
char *int_ac[] = { "get", "set", NULL };
|
||||
prof_register_ac("/c-test int", int_ac);
|
||||
prof_completer_add("/c-test int", int_ac);
|
||||
|
||||
prof_register_timed(timed_callback, 30);
|
||||
}
|
||||
|
||||
@@ -59,11 +59,11 @@ def create_win():
|
||||
prof.win_create(win, _handle_win_input)
|
||||
|
||||
def _update_autocomplete():
|
||||
prof.register_ac("/wikipedia page", page_ac)
|
||||
prof.register_ac("/wikipedia summary", page_ac)
|
||||
prof.register_ac("/wikipedia images", page_ac)
|
||||
prof.register_ac("/wikipedia links", page_ac)
|
||||
prof.register_ac("/wikipedia refs", page_ac)
|
||||
prof.completer_add("/wikipedia page", page_ac)
|
||||
prof.completer_add("/wikipedia summary", page_ac)
|
||||
prof.completer_add("/wikipedia images", page_ac)
|
||||
prof.completer_add("/wikipedia links", page_ac)
|
||||
prof.completer_add("/wikipedia refs", page_ac)
|
||||
|
||||
def _search(search_terms):
|
||||
global page_ac
|
||||
@@ -93,7 +93,7 @@ def _summary(page_str):
|
||||
return
|
||||
|
||||
link_ac.append(page.url.encode("utf-8"))
|
||||
prof.register_ac("/wikipedia open", link_ac)
|
||||
prof.completer_add("/wikipedia open", link_ac)
|
||||
|
||||
prof.win_show_themed(win, "wikipedia", "summary.title", None, page.title.encode("utf-8"))
|
||||
prof.win_show_themed(win, "wikipedia", "summary.url", None, page.url.encode("utf-8"))
|
||||
@@ -132,7 +132,7 @@ def _images(page_str):
|
||||
for image in page.images:
|
||||
prof.win_show_themed(win, "wikipedia", "images.url", None, image.encode("utf-8"))
|
||||
link_ac.append(image.encode("utf-8"))
|
||||
prof.register_ac("/wikipedia open", link_ac)
|
||||
prof.completer_add("/wikipedia open", link_ac)
|
||||
prof.win_show(win, "")
|
||||
prof.win_focus(win)
|
||||
|
||||
@@ -171,7 +171,7 @@ def _refs(page_str):
|
||||
for ref in page.references:
|
||||
prof.win_show_themed(win, "wikipedia", "refs.url", None, ref.encode("utf-8"))
|
||||
link_ac.append(ref.encode("utf-8"))
|
||||
prof.register_ac("/wikipedia open", link_ac)
|
||||
prof.completer_add("/wikipedia open", link_ac)
|
||||
prof.win_show(win, "")
|
||||
prof.win_focus(win)
|
||||
|
||||
@@ -221,6 +221,6 @@ def prof_init(version, status):
|
||||
|
||||
prof.register_command("/wikipedia", 2, 2, synopsis, description, args, examples, cmd_wp)
|
||||
|
||||
prof.register_ac("/wikipedia",
|
||||
prof.completer_add("/wikipedia",
|
||||
[ "search", "summary", "page", "images", "links", "refs", "open" ]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user