summaryrefslogtreecommitdiff
path: root/src/plugins/trigger
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-05-08 10:49:20 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-05-08 10:51:30 +0200
commit88bef0b1b127f67149060fe36757940379d7f4a3 (patch)
tree0f71e6a7c1b6c322013d78eb0f48aa753cd246af /src/plugins/trigger
parentb7765ed9606f17e83ccd9e6aa96a1ca88294952e (diff)
downloadweechat-88bef0b1b127f67149060fe36757940379d7f4a3.zip
core: rename functions hook_completion_{get_string|list_add} to completion_{get_string|list_add}
Old functions are kept for compatibility reasons.
Diffstat (limited to 'src/plugins/trigger')
-rw-r--r--src/plugins/trigger/trigger-completion.c86
1 files changed, 41 insertions, 45 deletions
diff --git a/src/plugins/trigger/trigger-completion.c b/src/plugins/trigger/trigger-completion.c
index 536a0a502..358f5d4b0 100644
--- a/src/plugins/trigger/trigger-completion.c
+++ b/src/plugins/trigger/trigger-completion.c
@@ -49,8 +49,8 @@ trigger_completion_triggers_cb (const void *pointer, void *data,
for (ptr_trigger = triggers; ptr_trigger;
ptr_trigger = ptr_trigger->next_trigger)
{
- weechat_hook_completion_list_add (completion, ptr_trigger->name,
- 0, WEECHAT_LIST_POS_SORT);
+ weechat_completion_list_add (completion, ptr_trigger->name,
+ 0, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
@@ -77,9 +77,9 @@ trigger_completion_triggers_default_cb (const void *pointer, void *data,
for (i = 0; trigger_config_default_list[i][0]; i++)
{
- weechat_hook_completion_list_add (completion,
- trigger_config_default_list[i][0],
- 0, WEECHAT_LIST_POS_SORT);
+ weechat_completion_list_add (completion,
+ trigger_config_default_list[i][0],
+ 0, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
@@ -105,9 +105,9 @@ trigger_completion_options_cb (const void *pointer, void *data,
for (i = 0; i < TRIGGER_NUM_OPTIONS; i++)
{
- weechat_hook_completion_list_add (completion,
- trigger_option_string[i],
- 0, WEECHAT_LIST_POS_SORT);
+ weechat_completion_list_add (completion,
+ trigger_option_string[i],
+ 0, WEECHAT_LIST_POS_SORT);
}
return WEECHAT_RC_OK;
@@ -134,7 +134,7 @@ trigger_completion_option_value_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- args = weechat_hook_completion_get_string (completion, "args");
+ args = weechat_completion_get_string (completion, "args");
if (!args)
return WEECHAT_RC_OK;
@@ -153,20 +153,21 @@ trigger_completion_option_value_cb (const void *pointer, void *data,
{
if (weechat_strcasecmp (argv[2], "name") == 0)
{
- weechat_hook_completion_list_add (completion,
- ptr_trigger->name,
- 0,
- WEECHAT_LIST_POS_BEGINNING);
+ weechat_completion_list_add (completion,
+ ptr_trigger->name,
+ 0,
+ WEECHAT_LIST_POS_BEGINNING);
}
else
{
index_option = trigger_search_option (argv[2]);
if (index_option >= 0)
{
- weechat_hook_completion_list_add (completion,
- weechat_config_string (ptr_trigger->options[index_option]),
- 0,
- WEECHAT_LIST_POS_BEGINNING);
+ weechat_completion_list_add (
+ completion,
+ weechat_config_string (ptr_trigger->options[index_option]),
+ 0,
+ WEECHAT_LIST_POS_BEGINNING);
}
}
}
@@ -197,9 +198,9 @@ trigger_completion_hooks_cb (const void *pointer, void *data,
for (i = 0; i < TRIGGER_NUM_HOOK_TYPES; i++)
{
- weechat_hook_completion_list_add (completion,
- trigger_hook_type_string[i],
- 0, WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion,
+ trigger_hook_type_string[i],
+ 0, WEECHAT_LIST_POS_END);
}
return WEECHAT_RC_OK;
@@ -228,8 +229,8 @@ trigger_completion_hooks_filter_cb (const void *pointer, void *data,
{
snprintf (str_hook, sizeof (str_hook),
"@%s", trigger_hook_type_string[i]);
- weechat_hook_completion_list_add (completion, str_hook,
- 0, WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, str_hook,
+ 0, WEECHAT_LIST_POS_END);
}
return WEECHAT_RC_OK;
@@ -252,8 +253,7 @@ trigger_completion_add_quoted_word (struct t_gui_completion *completion,
return;
snprintf (temp, length, "\"%s\"", word);
- weechat_hook_completion_list_add (completion, temp, 0,
- WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, temp, 0, WEECHAT_LIST_POS_END);
free (temp);
}
@@ -273,7 +273,7 @@ trigger_completion_add_default_for_hook (struct t_gui_completion *completion,
char **argv, **items;
int argc, num_items, type, i;
- args = weechat_hook_completion_get_string (completion, "args");
+ args = weechat_completion_get_string (completion, "args");
if (!args)
return;
@@ -341,8 +341,7 @@ trigger_completion_hook_arguments_cb (const void *pointer, void *data,
trigger_completion_add_default_for_hook (completion,
trigger_hook_default_arguments,
NULL);
- weechat_hook_completion_list_add (completion, "\"\"", 0,
- WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, "\"\"", 0, WEECHAT_LIST_POS_END);
return WEECHAT_RC_OK;
}
@@ -363,12 +362,11 @@ trigger_completion_hook_conditions_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- weechat_hook_completion_list_add (completion,
- "\"" TRIGGER_HOOK_DEFAULT_CONDITIONS "\"",
- 0,
- WEECHAT_LIST_POS_END);
- weechat_hook_completion_list_add (completion, "\"\"", 0,
- WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion,
+ "\"" TRIGGER_HOOK_DEFAULT_CONDITIONS "\"",
+ 0,
+ WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, "\"\"", 0, WEECHAT_LIST_POS_END);
return WEECHAT_RC_OK;
}
@@ -389,12 +387,11 @@ trigger_completion_hook_regex_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- weechat_hook_completion_list_add (completion,
- "\"" TRIGGER_HOOK_DEFAULT_REGEX "\"",
- 0,
- WEECHAT_LIST_POS_END);
- weechat_hook_completion_list_add (completion, "\"\"", 0,
- WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion,
+ "\"" TRIGGER_HOOK_DEFAULT_REGEX "\"",
+ 0,
+ WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, "\"\"", 0, WEECHAT_LIST_POS_END);
return WEECHAT_RC_OK;
}
@@ -415,12 +412,11 @@ trigger_completion_hook_command_cb (const void *pointer, void *data,
(void) completion_item;
(void) buffer;
- weechat_hook_completion_list_add (completion,
- "\"" TRIGGER_HOOK_DEFAULT_COMMAND "\"",
- 0,
- WEECHAT_LIST_POS_END);
- weechat_hook_completion_list_add (completion, "\"\"", 0,
- WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion,
+ "\"" TRIGGER_HOOK_DEFAULT_COMMAND "\"",
+ 0,
+ WEECHAT_LIST_POS_END);
+ weechat_completion_list_add (completion, "\"\"", 0, WEECHAT_LIST_POS_END);
return WEECHAT_RC_OK;
}