mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-26 19:06:21 +00:00
ox: group online autocompletion together
This commit is contained in:
@@ -876,7 +876,6 @@ cmd_ac_init(void)
|
|||||||
autocomplete_add(pgp_sendfile_ac, "on");
|
autocomplete_add(pgp_sendfile_ac, "on");
|
||||||
autocomplete_add(pgp_sendfile_ac, "off");
|
autocomplete_add(pgp_sendfile_ac, "off");
|
||||||
|
|
||||||
// XEP-0373: OX
|
|
||||||
ox_ac = autocomplete_new();
|
ox_ac = autocomplete_new();
|
||||||
autocomplete_add(ox_ac, "keys");
|
autocomplete_add(ox_ac, "keys");
|
||||||
autocomplete_add(ox_ac, "contacts");
|
autocomplete_add(ox_ac, "contacts");
|
||||||
@@ -2576,13 +2575,16 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
|||||||
if (found) {
|
if (found) {
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (conn_status == JABBER_CONNECTED) {
|
|
||||||
found = autocomplete_param_with_func(input, "/ox discover", roster_contact_autocomplete, previous, NULL);
|
found = autocomplete_param_with_func(input, "/ox discover", roster_contact_autocomplete, previous, NULL);
|
||||||
if (found) {
|
if (found) {
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
found = autocomplete_param_with_func(input, "/ox setkey", roster_barejid_autocomplete, previous, NULL);
|
||||||
|
if (found) {
|
||||||
|
return found;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
found = autocomplete_param_with_ac(input, "/ox log", ox_log_ac, TRUE, previous);
|
found = autocomplete_param_with_ac(input, "/ox log", ox_log_ac, TRUE, previous);
|
||||||
@@ -2599,13 +2601,6 @@ _ox_autocomplete(ProfWin* window, const char* const input, gboolean previous)
|
|||||||
return cmd_ac_complete_filepath(input, "/ox announce", previous);
|
return cmd_ac_complete_filepath(input, "/ox announce", previous);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn_status == JABBER_CONNECTED) {
|
|
||||||
found = autocomplete_param_with_func(input, "/ox setkey", roster_barejid_autocomplete, previous, NULL);
|
|
||||||
if (found) {
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
found = autocomplete_param_with_ac(input, "/ox", ox_ac, TRUE, previous);
|
found = autocomplete_param_with_ac(input, "/ox", ox_ac, TRUE, previous);
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
|||||||
Reference in New Issue
Block a user