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