From 709ae90e88c72b06927280760c9ea7fcb375b664 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 7 Apr 2016 20:49:46 +0100 Subject: [PATCH] Renamed register_ac->completer_add --- chatterbot/chatterbot.py | 2 +- jenkins.py | 12 ++++++------ say.py | 2 +- syscmd.py | 2 +- tests/python-test.py | 12 ++++++------ tests/test-c-plugin/test-c-plugin.c | 12 ++++++------ wikipedia-prof.py | 18 +++++++++--------- 7 files changed, 30 insertions(+), 30 deletions(-) diff --git a/chatterbot/chatterbot.py b/chatterbot/chatterbot.py index eb4efd3..3b25be5 100644 --- a/chatterbot/chatterbot.py +++ b/chatterbot/chatterbot.py @@ -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" ]) diff --git a/jenkins.py b/jenkins.py index df5f530..04b939c 100644 --- a/jenkins.py +++ b/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" diff --git a/say.py b/say.py index 508415d..44bc953 100644 --- a/say.py +++ b/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" ]) diff --git a/syscmd.py b/syscmd.py index 67727df..2350944 100644 --- a/syscmd.py +++ b/syscmd.py @@ -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" ]) diff --git a/tests/python-test.py b/tests/python-test.py index f2fed0c..cdebcb9 100644 --- a/tests/python-test.py +++ b/tests/python-test.py @@ -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" ] ) diff --git a/tests/test-c-plugin/test-c-plugin.c b/tests/test-c-plugin/test-c-plugin.c index 9182af5..03df91a 100644 --- a/tests/test-c-plugin/test-c-plugin.c +++ b/tests/test-c-plugin/test-c-plugin.c @@ -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); } diff --git a/wikipedia-prof.py b/wikipedia-prof.py index 7cecc68..6e128c9 100644 --- a/wikipedia-prof.py +++ b/wikipedia-prof.py @@ -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" ] )