1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Plugins: Renamed register_ac->completer_add

This commit is contained in:
James Booth 2016-04-07 20:49:23 +01:00
parent 2ba121aef3
commit a328367eb4
6 changed files with 10 additions and 9 deletions

View File

@ -155,7 +155,7 @@ api_register_timed(void *callback, int interval_seconds,
} }
void void
api_register_ac(const char *key, char **items) api_completer_add(const char *key, char **items)
{ {
autocompleters_add(key, items); autocompleters_add(key, items);
} }

View File

@ -53,7 +53,8 @@ void api_register_command(const char *command_name, int min_args, int max_args,
void *callback, void(*callback_func)(PluginCommand *command, gchar **args)); void *callback, void(*callback_func)(PluginCommand *command, gchar **args));
void api_register_timed(void *callback, int interval_seconds, void api_register_timed(void *callback, int interval_seconds,
void (*callback_func)(PluginTimedFunction *timed_function)); void (*callback_func)(PluginTimedFunction *timed_function));
void api_register_ac(const char *key, char **items);
void api_completer_add(const char *key, char **items);
void api_log_debug(const char *message); void api_log_debug(const char *message);
void api_log_info(const char *message); void api_log_info(const char *message);

View File

@ -97,9 +97,9 @@ c_api_register_timed(void(*callback)(void), int interval_seconds)
} }
static void static void
c_api_register_ac(const char *key, char **items) c_api_completer_add(const char *key, char **items)
{ {
api_register_ac(key, items); api_completer_add(key, items);
} }
static void static void
@ -269,7 +269,7 @@ c_api_init(void)
prof_cons_bad_cmd_usage = c_api_cons_bad_cmd_usage; prof_cons_bad_cmd_usage = c_api_cons_bad_cmd_usage;
prof_register_command = c_api_register_command; prof_register_command = c_api_register_command;
prof_register_timed = c_api_register_timed; prof_register_timed = c_api_register_timed;
prof_register_ac = c_api_register_ac; prof_completer_add = c_api_completer_add;
prof_notify = c_api_notify; prof_notify = c_api_notify;
prof_send_line = c_api_send_line; prof_send_line = c_api_send_line;
prof_get_current_recipient = c_api_get_current_recipient; prof_get_current_recipient = c_api_get_current_recipient;

View File

@ -48,7 +48,7 @@ void (*prof_register_command)(const char *command_name, int min_args, int max_ar
void (*prof_register_timed)(void(*callback)(void), int interval_seconds) = NULL; void (*prof_register_timed)(void(*callback)(void), int interval_seconds) = NULL;
void (*prof_register_ac)(const char *key, char **items) = NULL; void (*prof_completer_add)(const char *key, char **items) = NULL;
void (*prof_notify)(const char *message, int timeout_ms, const char *category) = NULL; void (*prof_notify)(const char *message, int timeout_ms, const char *category) = NULL;

View File

@ -48,7 +48,7 @@ void (*prof_register_command)(const char *command_name, int min_args, int max_ar
void (*prof_register_timed)(void(*callback)(void), int interval_seconds); void (*prof_register_timed)(void(*callback)(void), int interval_seconds);
void (*prof_register_ac)(const char *key, char **items); void (*prof_completer_add)(const char *key, char **items);
void (*prof_notify)(const char *message, int timeout_ms, const char *category); void (*prof_notify)(const char *message, int timeout_ms, const char *category);

View File

@ -186,7 +186,7 @@ python_api_register_timed(PyObject *self, PyObject *args)
} }
static PyObject * static PyObject *
python_api_register_ac(PyObject *self, PyObject *args) python_api_completer_add(PyObject *self, PyObject *args)
{ {
const char *key = NULL; const char *key = NULL;
PyObject *items = NULL; PyObject *items = NULL;
@ -663,7 +663,7 @@ static PyMethodDef apiMethods[] = {
{ "cons_bad_cmd_usage", python_api_cons_bad_cmd_usage, METH_VARARGS, "Show invalid command message in console" }, { "cons_bad_cmd_usage", python_api_cons_bad_cmd_usage, METH_VARARGS, "Show invalid command message in console" },
{ "register_command", python_api_register_command, METH_VARARGS, "Register a command." }, { "register_command", python_api_register_command, METH_VARARGS, "Register a command." },
{ "register_timed", python_api_register_timed, METH_VARARGS, "Register a timed function." }, { "register_timed", python_api_register_timed, METH_VARARGS, "Register a timed function." },
{ "register_ac", python_api_register_ac, METH_VARARGS, "Register an autocompleter." }, { "completer_add", python_api_completer_add, METH_VARARGS, "Add items to an autocompleter." },
{ "send_line", python_api_send_line, METH_VARARGS, "Send a line of input." }, { "send_line", python_api_send_line, METH_VARARGS, "Send a line of input." },
{ "notify", python_api_notify, METH_VARARGS, "Send desktop notification." }, { "notify", python_api_notify, METH_VARARGS, "Send desktop notification." },
{ "get_current_recipient", python_api_get_current_recipient, METH_VARARGS, "Return the jid of the recipient of the current window." }, { "get_current_recipient", python_api_get_current_recipient, METH_VARARGS, "Return the jid of the recipient of the current window." },