mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Tidied form field autocompleters
This commit is contained in:
parent
6f3750c6aa
commit
d52f86ef0f
@ -1653,35 +1653,39 @@ cmd_autocomplete_add(char *value)
|
|||||||
void
|
void
|
||||||
cmd_autocomplete_add_form_fields(DataForm *form)
|
cmd_autocomplete_add_form_fields(DataForm *form)
|
||||||
{
|
{
|
||||||
if (form) {
|
if (form == NULL) {
|
||||||
GSList *fields = autocomplete_create_list(form->tag_ac);
|
return;
|
||||||
GSList *curr_field = fields;
|
|
||||||
while (curr_field) {
|
|
||||||
GString *field_str = g_string_new("/");
|
|
||||||
g_string_append(field_str, curr_field->data);
|
|
||||||
cmd_autocomplete_add(field_str->str);
|
|
||||||
g_string_free(field_str, TRUE);
|
|
||||||
curr_field = g_slist_next(curr_field);
|
|
||||||
}
|
|
||||||
g_slist_free_full(fields, free);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GSList *fields = autocomplete_create_list(form->tag_ac);
|
||||||
|
GSList *curr_field = fields;
|
||||||
|
while (curr_field) {
|
||||||
|
GString *field_str = g_string_new("/");
|
||||||
|
g_string_append(field_str, curr_field->data);
|
||||||
|
cmd_autocomplete_add(field_str->str);
|
||||||
|
g_string_free(field_str, TRUE);
|
||||||
|
curr_field = g_slist_next(curr_field);
|
||||||
|
}
|
||||||
|
g_slist_free_full(fields, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cmd_autocomplete_remove_form_fields(DataForm *form)
|
cmd_autocomplete_remove_form_fields(DataForm *form)
|
||||||
{
|
{
|
||||||
if (form) {
|
if (form == NULL) {
|
||||||
GSList *fields = autocomplete_create_list(form->tag_ac);
|
return;
|
||||||
GSList *curr_field = fields;
|
|
||||||
while (curr_field) {
|
|
||||||
GString *field_str = g_string_new("/");
|
|
||||||
g_string_append(field_str, curr_field->data);
|
|
||||||
cmd_autocomplete_remove(field_str->str);
|
|
||||||
g_string_free(field_str, TRUE);
|
|
||||||
curr_field = g_slist_next(curr_field);
|
|
||||||
}
|
|
||||||
g_slist_free_full(fields, free);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GSList *fields = autocomplete_create_list(form->tag_ac);
|
||||||
|
GSList *curr_field = fields;
|
||||||
|
while (curr_field) {
|
||||||
|
GString *field_str = g_string_new("/");
|
||||||
|
g_string_append(field_str, curr_field->data);
|
||||||
|
cmd_autocomplete_remove(field_str->str);
|
||||||
|
g_string_free(field_str, TRUE);
|
||||||
|
curr_field = g_slist_next(curr_field);
|
||||||
|
}
|
||||||
|
g_slist_free_full(fields, free);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user