Remove /omemo sendfile

This commit is contained in:
William Wennerström
2020-06-28 15:26:13 +02:00
parent f4ab1ca9e7
commit 9d58472c8c
7 changed files with 556 additions and 593 deletions

View File

@@ -193,7 +193,6 @@ static Autocomplete otr_sendfile_ac;
static Autocomplete omemo_ac; static Autocomplete omemo_ac;
static Autocomplete omemo_log_ac; static Autocomplete omemo_log_ac;
static Autocomplete omemo_policy_ac; static Autocomplete omemo_policy_ac;
static Autocomplete omemo_sendfile_ac;
#endif #endif
static Autocomplete connect_property_ac; static Autocomplete connect_property_ac;
static Autocomplete tls_property_ac; static Autocomplete tls_property_ac;
@@ -683,7 +682,6 @@ cmd_ac_init(void)
autocomplete_add(omemo_ac, "clear_device_list"); autocomplete_add(omemo_ac, "clear_device_list");
autocomplete_add(omemo_ac, "policy"); autocomplete_add(omemo_ac, "policy");
autocomplete_add(omemo_ac, "char"); autocomplete_add(omemo_ac, "char");
autocomplete_add(omemo_ac, "sendfile");
omemo_log_ac = autocomplete_new(); omemo_log_ac = autocomplete_new();
autocomplete_add(omemo_log_ac, "on"); autocomplete_add(omemo_log_ac, "on");
@@ -694,10 +692,6 @@ cmd_ac_init(void)
autocomplete_add(omemo_policy_ac, "manual"); autocomplete_add(omemo_policy_ac, "manual");
autocomplete_add(omemo_policy_ac, "automatic"); autocomplete_add(omemo_policy_ac, "automatic");
autocomplete_add(omemo_policy_ac, "always"); autocomplete_add(omemo_policy_ac, "always");
omemo_sendfile_ac = autocomplete_new();
autocomplete_add(omemo_sendfile_ac, "on");
autocomplete_add(omemo_sendfile_ac, "off");
#endif #endif
connect_property_ac = autocomplete_new(); connect_property_ac = autocomplete_new();
@@ -1292,7 +1286,6 @@ cmd_ac_reset(ProfWin* window)
autocomplete_reset(omemo_ac); autocomplete_reset(omemo_ac);
autocomplete_reset(omemo_log_ac); autocomplete_reset(omemo_log_ac);
autocomplete_reset(omemo_policy_ac); autocomplete_reset(omemo_policy_ac);
autocomplete_reset(omemo_sendfile_ac);
#endif #endif
autocomplete_reset(connect_property_ac); autocomplete_reset(connect_property_ac);
autocomplete_reset(tls_property_ac); autocomplete_reset(tls_property_ac);
@@ -1450,7 +1443,6 @@ cmd_ac_uninit(void)
autocomplete_free(omemo_ac); autocomplete_free(omemo_ac);
autocomplete_free(omemo_log_ac); autocomplete_free(omemo_log_ac);
autocomplete_free(omemo_policy_ac); autocomplete_free(omemo_policy_ac);
autocomplete_free(omemo_sendfile_ac);
#endif #endif
autocomplete_free(connect_property_ac); autocomplete_free(connect_property_ac);
autocomplete_free(tls_property_ac); autocomplete_free(tls_property_ac);
@@ -2510,11 +2502,6 @@ _omemo_autocomplete(ProfWin* window, const char* const input, gboolean previous)
return found; return found;
} }
found = autocomplete_param_with_ac(input, "/omemo sendfile", omemo_sendfile_ac, TRUE, previous);
if (found) {
return found;
}
jabber_conn_status_t conn_status = connection_get_status(); jabber_conn_status_t conn_status = connection_get_status();
if (conn_status == JABBER_CONNECTED) { if (conn_status == JABBER_CONNECTED) {

View File

@@ -2274,55 +2274,52 @@ static struct cmd_t command_defs[] = {
}, },
{ "/omemo", { "/omemo",
parse_args, 1, 3, NULL, parse_args, 1, 3, NULL,
CMD_SUBFUNCS( CMD_SUBFUNCS(
{ "gen", cmd_omemo_gen }, { "gen", cmd_omemo_gen },
{ "log", cmd_omemo_log }, { "log", cmd_omemo_log },
{ "start", cmd_omemo_start }, { "start", cmd_omemo_start },
{ "end", cmd_omemo_end }, { "end", cmd_omemo_end },
{ "trust", cmd_omemo_trust }, { "trust", cmd_omemo_trust },
{ "untrust", cmd_omemo_untrust }, { "untrust", cmd_omemo_untrust },
{ "fingerprint", cmd_omemo_fingerprint }, { "fingerprint", cmd_omemo_fingerprint },
{ "char", cmd_omemo_char }, { "char", cmd_omemo_char },
{ "policy", cmd_omemo_policy }, { "policy", cmd_omemo_policy },
{ "clear_device_list", cmd_omemo_clear_device_list }, { "clear_device_list", cmd_omemo_clear_device_list })
{ "sendfile", cmd_omemo_sendfile }) CMD_NOMAINFUNC
CMD_NOMAINFUNC CMD_TAGS(
CMD_TAGS( CMD_TAG_CHAT,
CMD_TAG_CHAT, CMD_TAG_UI)
CMD_TAG_UI) CMD_SYN(
CMD_SYN( "/omemo gen",
"/omemo gen", "/omemo log on|off|redact",
"/omemo log on|off|redact", "/omemo start [<contact>]",
"/omemo start [<contact>]", "/omemo trust [<contact>] <fingerprint>",
"/omemo trust [<contact>] <fingerprint>", "/omemo end",
"/omemo end", "/omemo fingerprint [<contact>]",
"/omemo fingerprint [<contact>]", "/omemo char <char>",
"/omemo char <char>", "/omemo policy manual|automatic|always",
"/omemo policy manual|automatic|always", "/omemo clear_device_list")
"/omemo sendfile on|off", CMD_DESC(
"/omemo clear_device_list") "OMEMO commands to manage keys, and perform encryption during chat sessions.")
CMD_DESC( CMD_ARGS(
"OMEMO commands to manage keys, and perform encryption during chat sessions.") { "gen", "Generate OMEMO crytographic materials for current account." },
CMD_ARGS( { "start [<contact>]", "Start an OMEMO session with contact, or current recipient if omitted." },
{ "gen", "Generate OMEMO crytographic materials for current account." }, { "end", "End the current OMEMO session." },
{ "start [<contact>]", "Start an OMEMO session with contact, or current recipient if omitted." }, { "log on|off", "Enable or disable plaintext logging of OMEMO encrypted messages." },
{ "end", "End the current OMEMO session." }, { "log redact", "Log OMEMO encrypted messages, but replace the contents with [redacted]. This is the default." },
{ "log on|off", "Enable or disable plaintext logging of OMEMO encrypted messages." }, { "fingerprint [<contact>]", "Show contact fingerprints, or current recipient if omitted." },
{ "log redact", "Log OMEMO encrypted messages, but replace the contents with [redacted]. This is the default." }, { "char <char>", "Set the character to be displayed next to OMEMO encrypted messages." },
{ "fingerprint [<contact>]", "Show contact fingerprints, or current recipient if omitted." }, { "policy manual", "Set the global OMEMO policy to manual, OMEMO sessions must be started manually." },
{ "char <char>", "Set the character to be displayed next to OMEMO encrypted messages." }, { "policy automatic", "Set the global OMEMO policy to opportunistic, an OMEMO session will be attempted upon starting a conversation." },
{ "policy manual", "Set the global OMEMO policy to manual, OMEMO sessions must be started manually." }, { "policy always", "Set the global OMEMO policy to always, an error will be displayed if an OMEMO session cannot be initiated upon starting a conversation." },
{ "policy automatic", "Set the global OMEMO policy to opportunistic, an OMEMO session will be attempted upon starting a conversation." }, { "clear_device_list", "Clear your own device list on server side. Each client will reannounce itself when connected back."})
{ "policy always", "Set the global OMEMO policy to always, an error will be displayed if an OMEMO session cannot be initiated upon starting a conversation." }, CMD_EXAMPLES(
{ "sendfile on|off", "Allow /sendfile to send unencrypted files while in an OMEMO session." }, "/omemo gen",
{ "clear_device_list", "Clear your own device list on server side. Each client will reannounce itself when connected back." }) "/omemo start odin@valhalla.edda",
CMD_EXAMPLES( "/omemo trust c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
"/omemo gen", "/omemo untrust loki@valhalla.edda c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
"/omemo start odin@valhalla.edda", "/omemo char *")
"/omemo trust c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
"/omemo untrust loki@valhalla.edda c4f9c875-144d7a3b-0c4a05b6-ca3be51a-a037f329-0bd3ae62-07f99719-55559d2a",
"/omemo char *")
}, },
{ "/save", { "/save",

View File

@@ -4858,7 +4858,7 @@ cmd_sendfile(ProfWin* window, const char* const command, gchar** args)
assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK); assert(chatwin->memcheck == PROFCHATWIN_MEMCHECK);
#ifdef HAVE_OMEMO #ifdef HAVE_OMEMO
if (chatwin->is_omemo && !prefs_get_boolean(PREF_OMEMO_SENDFILE)) { if (chatwin->is_omemo) {
// Create temporary file for writing ciphertext. // Create temporary file for writing ciphertext.
int tmpfd; int tmpfd;
@@ -8832,20 +8832,7 @@ cmd_omemo_policy(ProfWin* window, const char* const command, gchar** args)
} }
gboolean gboolean
cmd_omemo_sendfile(ProfWin* window, const char* const command, gchar** args) cmd_save(ProfWin *window, const char *const command, gchar **args)
{
#ifdef HAVE_OMEMO
_cmd_set_boolean_preference(args[1], command, "Sending unencrypted files in an OMEMO session via /sendfile", PREF_OMEMO_SENDFILE);
return TRUE;
#else
cons_show("This version of Profanity has not been built with OMEMO support enabled");
return TRUE;
#endif
}
gboolean
cmd_save(ProfWin* window, const char* const command, gchar** args)
{ {
log_info("Saving preferences to configuration file"); log_info("Saving preferences to configuration file");
cons_show("Saving preferences."); cons_show("Saving preferences.");

View File

@@ -111,133 +111,133 @@ gboolean cmd_pgp(ProfWin* window, const char* const command, gchar** args);
#ifdef HAVE_LIBGPGME #ifdef HAVE_LIBGPGME
gboolean cmd_ox(ProfWin* window, const char* const command, gchar** args); gboolean cmd_ox(ProfWin* window, const char* const command, gchar** args);
#endif // HAVE_LIBGPGME #endif // HAVE_LIBGPGME
gboolean cmd_outtype(ProfWin* window, const char* const command, gchar** args); gboolean cmd_outtype(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_prefs(ProfWin* window, const char* const command, gchar** args); gboolean cmd_prefs(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_priority(ProfWin* window, const char* const command, gchar** args); gboolean cmd_priority(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_quit(ProfWin* window, const char* const command, gchar** args); gboolean cmd_quit(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_reconnect(ProfWin* window, const char* const command, gchar** args); gboolean cmd_reconnect(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_room(ProfWin* window, const char* const command, gchar** args); gboolean cmd_room(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_rooms(ProfWin* window, const char* const command, gchar** args); gboolean cmd_rooms(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_bookmark(ProfWin* window, const char* const command, gchar** args); gboolean cmd_bookmark(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_bookmark_ignore(ProfWin* window, const char* const command, gchar** args); gboolean cmd_bookmark_ignore(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_roster(ProfWin* window, const char* const command, gchar** args); gboolean cmd_roster(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_software(ProfWin* window, const char* const command, gchar** args); gboolean cmd_software(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_splash(ProfWin* window, const char* const command, gchar** args); gboolean cmd_splash(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_states(ProfWin* window, const char* const command, gchar** args); gboolean cmd_states(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_status_get(ProfWin* window, const char* const command, gchar** args); gboolean cmd_status_get(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_status_set(ProfWin* window, const char* const command, gchar** args); gboolean cmd_status_set(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_sub(ProfWin* window, const char* const command, gchar** args); gboolean cmd_sub(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_theme(ProfWin* window, const char* const command, gchar** args); gboolean cmd_theme(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wintitle(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tiny(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_vercheck(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wintitle(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_who(ProfWin* window, const char* const command, gchar** args); gboolean cmd_vercheck(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_win(ProfWin* window, const char* const command, gchar** args); gboolean cmd_who(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_alias(ProfWin* window, const char* const command, gchar** args); gboolean cmd_win(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_xmlconsole(ProfWin* window, const char* const command, gchar** args); gboolean cmd_alias(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_ping(ProfWin* window, const char* const command, gchar** args); gboolean cmd_xmlconsole(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_form(ProfWin* window, const char* const command, gchar** args); gboolean cmd_ping(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_occupants(ProfWin* window, const char* const command, gchar** args); gboolean cmd_form(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_kick(ProfWin* window, const char* const command, gchar** args); gboolean cmd_occupants(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_ban(ProfWin* window, const char* const command, gchar** args); gboolean cmd_kick(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_subject(ProfWin* window, const char* const command, gchar** args); gboolean cmd_ban(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_affiliation(ProfWin* window, const char* const command, gchar** args); gboolean cmd_subject(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_role(ProfWin* window, const char* const command, gchar** args); gboolean cmd_affiliation(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_privileges(ProfWin* window, const char* const command, gchar** args); gboolean cmd_role(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_presence(ProfWin* window, const char* const command, gchar** args); gboolean cmd_privileges(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wrap(ProfWin* window, const char* const command, gchar** args); gboolean cmd_presence(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_time(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wrap(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_resource(ProfWin* window, const char* const command, gchar** args); gboolean cmd_time(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_inpblock(ProfWin* window, const char* const command, gchar** args); gboolean cmd_resource(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_titlebar(ProfWin* window, const char* const command, gchar** args); gboolean cmd_inpblock(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_titlebar_show_hide(ProfWin* window, const char* const command, gchar** args); gboolean cmd_titlebar(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_mainwin(ProfWin* window, const char* const command, gchar** args); gboolean cmd_titlebar_show_hide(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_statusbar(ProfWin* window, const char* const command, gchar** args); gboolean cmd_mainwin(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_inputwin(ProfWin* window, const char* const command, gchar** args); gboolean cmd_statusbar(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_script(ProfWin* window, const char* const command, gchar** args); gboolean cmd_inputwin(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_export(ProfWin* window, const char* const command, gchar** args); gboolean cmd_script(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_charset(ProfWin* window, const char* const command, gchar** args); gboolean cmd_export(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_console(ProfWin* window, const char* const command, gchar** args); gboolean cmd_charset(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_command_list(ProfWin* window, const char* const command, gchar** args); gboolean cmd_console(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_command_exec(ProfWin* window, const char* const command, gchar** args); gboolean cmd_command_list(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_command_exec(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_sourcepath(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_sourcepath(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_install(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_install(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_update(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_update(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_uninstall(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_uninstall(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_load(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_load(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_unload(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_unload(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_reload(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_reload(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_plugins_python_version(ProfWin* window, const char* const command, gchar** args); gboolean cmd_plugins_python_version(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_blocked(ProfWin* window, const char* const command, gchar** args); gboolean cmd_blocked(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_list(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_list(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_show(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_show(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_add(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_add(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_remove(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_remove(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_enable(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_enable(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_disable(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_disable(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_rename(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_rename(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_default(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_default(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_set(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_set(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_account_clear(ProfWin* window, const char* const command, gchar** args); gboolean cmd_account_clear(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_tls_certpath(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tls_certpath(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_tls_trust(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tls_trust(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_tls_trusted(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tls_trusted(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_tls_revoke(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tls_revoke(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_tls_cert(ProfWin* window, const char* const command, gchar** args); gboolean cmd_tls_cert(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_char(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_char(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_log(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_log(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_libver(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_libver(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_policy(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_policy(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_gen(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_gen(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_myfp(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_myfp(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_theirfp(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_theirfp(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_start(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_start(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_end(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_end(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_trust(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_trust(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_untrust(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_untrust(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_secret(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_secret(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_question(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_question(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_answer(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_answer(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_otr_sendfile(ProfWin* window, const char* const command, gchar** args); gboolean cmd_otr_sendfile(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wins(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wins(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wins_unread(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wins_unread(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wins_prune(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wins_prune(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_wins_swap(ProfWin* window, const char* const command, gchar** args); gboolean cmd_wins_swap(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_form_field(ProfWin* window, char* tag, gchar** args); gboolean cmd_form_field(ProfWin *window, char *tag, gchar **args);
gboolean cmd_omemo_gen(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_gen(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_char(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_char(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_log(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_log(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_start(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_start(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_end(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_end(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_fingerprint(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_fingerprint(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_trust(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_trust(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_untrust(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_untrust(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_policy(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_policy(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_clear_device_list(ProfWin* window, const char* const command, gchar** args); gboolean cmd_omemo_clear_device_list(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_omemo_sendfile(ProfWin* window, const char* const command, gchar** args);
gboolean cmd_save(ProfWin* window, const char* const command, gchar** args); gboolean cmd_save(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_reload(ProfWin* window, const char* const command, gchar** args); gboolean cmd_reload(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_paste(ProfWin* window, const char* const command, gchar** args); gboolean cmd_paste(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_color(ProfWin* window, const char* const command, gchar** args); gboolean cmd_color(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_avatar(ProfWin* window, const char* const command, gchar** args); gboolean cmd_avatar(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_os(ProfWin* window, const char* const command, gchar** args); gboolean cmd_os(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_correction(ProfWin* window, const char* const command, gchar** args); gboolean cmd_correction(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_correct(ProfWin* window, const char* const command, gchar** args); gboolean cmd_correct(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_slashguard(ProfWin* window, const char* const command, gchar** args); gboolean cmd_slashguard(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_serversoftware(ProfWin* window, const char* const command, gchar** args); gboolean cmd_serversoftware(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_url_open(ProfWin* window, const char* const command, gchar** args); gboolean cmd_url_open(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_url_save(ProfWin* window, const char* const command, gchar** args); gboolean cmd_url_save(ProfWin *window, const char *const command, gchar **args);
gboolean cmd_executable(ProfWin* window, const char* const command, gchar** args); gboolean cmd_executable(ProfWin *window, const char *const command, gchar **args);
#endif #endif

View File

@@ -1790,145 +1790,145 @@ _save_prefs(void)
static const char* static const char*
_get_group(preference_t pref) _get_group(preference_t pref)
{ {
switch (pref) { switch (pref)
case PREF_CLEAR_PERSIST_HISTORY: {
case PREF_SPLASH: case PREF_CLEAR_PERSIST_HISTORY:
case PREF_BEEP: case PREF_SPLASH:
case PREF_THEME: case PREF_BEEP:
case PREF_VERCHECK: case PREF_THEME:
case PREF_WINTITLE_SHOW: case PREF_VERCHECK:
case PREF_WINTITLE_GOODBYE: case PREF_WINTITLE_SHOW:
case PREF_FLASH: case PREF_WINTITLE_GOODBYE:
case PREF_INTYPE: case PREF_FLASH:
case PREF_HISTORY: case PREF_INTYPE:
case PREF_OCCUPANTS: case PREF_HISTORY:
case PREF_OCCUPANTS_JID: case PREF_OCCUPANTS:
case PREF_OCCUPANTS_WRAP: case PREF_OCCUPANTS_JID:
case PREF_STATUSES: case PREF_OCCUPANTS_WRAP:
case PREF_STATUSES_CONSOLE: case PREF_STATUSES:
case PREF_STATUSES_CHAT: case PREF_STATUSES_CONSOLE:
case PREF_STATUSES_MUC: case PREF_STATUSES_CHAT:
case PREF_MUC_PRIVILEGES: case PREF_STATUSES_MUC:
case PREF_PRESENCE: case PREF_MUC_PRIVILEGES:
case PREF_WRAP: case PREF_PRESENCE:
case PREF_TIME_CONSOLE: case PREF_WRAP:
case PREF_TIME_CHAT: case PREF_TIME_CONSOLE:
case PREF_TIME_MUC: case PREF_TIME_CHAT:
case PREF_TIME_CONFIG: case PREF_TIME_MUC:
case PREF_TIME_PRIVATE: case PREF_TIME_CONFIG:
case PREF_TIME_XMLCONSOLE: case PREF_TIME_PRIVATE:
case PREF_TIME_STATUSBAR: case PREF_TIME_XMLCONSOLE:
case PREF_TIME_LASTACTIVITY: case PREF_TIME_STATUSBAR:
case PREF_ROSTER: case PREF_TIME_LASTACTIVITY:
case PREF_ROSTER_OFFLINE: case PREF_ROSTER:
case PREF_ROSTER_RESOURCE: case PREF_ROSTER_OFFLINE:
case PREF_ROSTER_PRESENCE: case PREF_ROSTER_RESOURCE:
case PREF_ROSTER_STATUS: case PREF_ROSTER_PRESENCE:
case PREF_ROSTER_EMPTY: case PREF_ROSTER_STATUS:
case PREF_ROSTER_BY: case PREF_ROSTER_EMPTY:
case PREF_ROSTER_ORDER: case PREF_ROSTER_BY:
case PREF_ROSTER_UNREAD: case PREF_ROSTER_ORDER:
case PREF_ROSTER_COUNT: case PREF_ROSTER_UNREAD:
case PREF_ROSTER_COUNT_ZERO: case PREF_ROSTER_COUNT:
case PREF_ROSTER_PRIORITY: case PREF_ROSTER_COUNT_ZERO:
case PREF_ROSTER_WRAP: case PREF_ROSTER_PRIORITY:
case PREF_ROSTER_RESOURCE_JOIN: case PREF_ROSTER_WRAP:
case PREF_ROSTER_CONTACTS: case PREF_ROSTER_RESOURCE_JOIN:
case PREF_ROSTER_UNSUBSCRIBED: case PREF_ROSTER_CONTACTS:
case PREF_ROSTER_ROOMS: case PREF_ROSTER_UNSUBSCRIBED:
case PREF_ROSTER_ROOMS_POS: case PREF_ROSTER_ROOMS:
case PREF_ROSTER_ROOMS_BY: case PREF_ROSTER_ROOMS_POS:
case PREF_ROSTER_ROOMS_ORDER: case PREF_ROSTER_ROOMS_BY:
case PREF_ROSTER_ROOMS_UNREAD: case PREF_ROSTER_ROOMS_ORDER:
case PREF_ROSTER_ROOMS_SERVER: case PREF_ROSTER_ROOMS_UNREAD:
case PREF_ROSTER_ROOMS_USE_AS_NAME: case PREF_ROSTER_ROOMS_SERVER:
case PREF_ROSTER_PRIVATE: case PREF_ROSTER_ROOMS_USE_AS_NAME:
case PREF_RESOURCE_TITLE: case PREF_ROSTER_PRIVATE:
case PREF_RESOURCE_MESSAGE: case PREF_RESOURCE_TITLE:
case PREF_ENC_WARN: case PREF_RESOURCE_MESSAGE:
case PREF_INPBLOCK_DYNAMIC: case PREF_ENC_WARN:
case PREF_TLS_SHOW: case PREF_INPBLOCK_DYNAMIC:
case PREF_CONSOLE_MUC: case PREF_TLS_SHOW:
case PREF_CONSOLE_PRIVATE: case PREF_CONSOLE_MUC:
case PREF_CONSOLE_CHAT: case PREF_CONSOLE_PRIVATE:
case PREF_COLOR_NICK: case PREF_CONSOLE_CHAT:
case PREF_COLOR_NICK_OWN: case PREF_COLOR_NICK:
case PREF_ROSTER_COLOR_NICK: case PREF_COLOR_NICK_OWN:
case PREF_OCCUPANTS_COLOR_NICK: case PREF_ROSTER_COLOR_NICK:
case PREF_STATUSBAR_SHOW_NAME: case PREF_OCCUPANTS_COLOR_NICK:
case PREF_STATUSBAR_SHOW_NUMBER: case PREF_STATUSBAR_SHOW_NAME:
case PREF_STATUSBAR_SHOW_READ: case PREF_STATUSBAR_SHOW_NUMBER:
case PREF_STATUSBAR_SELF: case PREF_STATUSBAR_SHOW_READ:
case PREF_STATUSBAR_CHAT: case PREF_STATUSBAR_SELF:
case PREF_STATUSBAR_ROOM: case PREF_STATUSBAR_CHAT:
case PREF_TITLEBAR_MUC_TITLE_JID: case PREF_STATUSBAR_ROOM:
case PREF_TITLEBAR_MUC_TITLE_NAME: case PREF_TITLEBAR_MUC_TITLE_JID:
case PREF_SLASH_GUARD: case PREF_TITLEBAR_MUC_TITLE_NAME:
return PREF_GROUP_UI; case PREF_SLASH_GUARD:
case PREF_STATES: return PREF_GROUP_UI;
case PREF_OUTTYPE: case PREF_STATES:
return PREF_GROUP_CHATSTATES; case PREF_OUTTYPE:
case PREF_NOTIFY_TYPING: return PREF_GROUP_CHATSTATES;
case PREF_NOTIFY_TYPING_CURRENT: case PREF_NOTIFY_TYPING:
case PREF_NOTIFY_CHAT: case PREF_NOTIFY_TYPING_CURRENT:
case PREF_NOTIFY_CHAT_CURRENT: case PREF_NOTIFY_CHAT:
case PREF_NOTIFY_CHAT_TEXT: case PREF_NOTIFY_CHAT_CURRENT:
case PREF_NOTIFY_ROOM: case PREF_NOTIFY_CHAT_TEXT:
case PREF_NOTIFY_ROOM_MENTION: case PREF_NOTIFY_ROOM:
case PREF_NOTIFY_ROOM_TRIGGER: case PREF_NOTIFY_ROOM_MENTION:
case PREF_NOTIFY_ROOM_CURRENT: case PREF_NOTIFY_ROOM_TRIGGER:
case PREF_NOTIFY_ROOM_TEXT: case PREF_NOTIFY_ROOM_CURRENT:
case PREF_NOTIFY_INVITE: case PREF_NOTIFY_ROOM_TEXT:
case PREF_NOTIFY_SUB: case PREF_NOTIFY_INVITE:
case PREF_NOTIFY_MENTION_CASE_SENSITIVE: case PREF_NOTIFY_SUB:
case PREF_NOTIFY_MENTION_WHOLE_WORD: case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
case PREF_TRAY: case PREF_NOTIFY_MENTION_WHOLE_WORD:
case PREF_TRAY_READ: case PREF_TRAY:
case PREF_ADV_NOTIFY_DISCO_OR_VERSION: case PREF_TRAY_READ:
return PREF_GROUP_NOTIFICATIONS; case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
case PREF_CHLOG: return PREF_GROUP_NOTIFICATIONS;
case PREF_GRLOG: case PREF_CHLOG:
case PREF_LOG_ROTATE: case PREF_GRLOG:
case PREF_LOG_SHARED: case PREF_LOG_ROTATE:
return PREF_GROUP_LOGGING; case PREF_LOG_SHARED:
case PREF_AVATAR_CMD: return PREF_GROUP_LOGGING;
case PREF_URL_OPEN_CMD: case PREF_AVATAR_CMD:
case PREF_URL_SAVE_CMD: case PREF_URL_OPEN_CMD:
return PREF_GROUP_EXECUTABLES; case PREF_URL_SAVE_CMD:
case PREF_AUTOAWAY_CHECK: return PREF_GROUP_EXECUTABLES;
case PREF_AUTOAWAY_MODE: case PREF_AUTOAWAY_CHECK:
case PREF_AUTOAWAY_MESSAGE: case PREF_AUTOAWAY_MODE:
case PREF_AUTOXA_MESSAGE: case PREF_AUTOAWAY_MESSAGE:
case PREF_LASTACTIVITY: case PREF_AUTOXA_MESSAGE:
return PREF_GROUP_PRESENCE; case PREF_LASTACTIVITY:
case PREF_CONNECT_ACCOUNT: return PREF_GROUP_PRESENCE;
case PREF_DEFAULT_ACCOUNT: case PREF_CONNECT_ACCOUNT:
case PREF_CARBONS: case PREF_DEFAULT_ACCOUNT:
case PREF_RECEIPTS_SEND: case PREF_CARBONS:
case PREF_RECEIPTS_REQUEST: case PREF_RECEIPTS_SEND:
case PREF_REVEAL_OS: case PREF_RECEIPTS_REQUEST:
case PREF_TLS_CERTPATH: case PREF_REVEAL_OS:
case PREF_CORRECTION_ALLOW: case PREF_TLS_CERTPATH:
case PREF_MAM: case PREF_CORRECTION_ALLOW:
return PREF_GROUP_CONNECTION; case PREF_MAM:
case PREF_OTR_LOG: return PREF_GROUP_CONNECTION;
case PREF_OTR_POLICY: case PREF_OTR_LOG:
case PREF_OTR_SENDFILE: case PREF_OTR_POLICY:
return PREF_GROUP_OTR; case PREF_OTR_SENDFILE:
case PREF_PGP_LOG: return PREF_GROUP_OTR;
case PREF_PGP_SENDFILE: case PREF_PGP_LOG:
return PREF_GROUP_PGP; case PREF_PGP_SENDFILE:
case PREF_BOOKMARK_INVITE: return PREF_GROUP_PGP;
case PREF_ROOM_LIST_CACHE: case PREF_BOOKMARK_INVITE:
return PREF_GROUP_MUC; case PREF_ROOM_LIST_CACHE:
case PREF_PLUGINS_SOURCEPATH: return PREF_GROUP_MUC;
return PREF_GROUP_PLUGINS; case PREF_PLUGINS_SOURCEPATH:
case PREF_OMEMO_LOG: return PREF_GROUP_PLUGINS;
case PREF_OMEMO_POLICY: case PREF_OMEMO_LOG:
case PREF_OMEMO_SENDFILE: case PREF_OMEMO_POLICY:
return PREF_GROUP_OMEMO; return PREF_GROUP_OMEMO;
default: default:
return NULL; return NULL;
} }
} }
@@ -1937,257 +1937,256 @@ _get_group(preference_t pref)
static const char* static const char*
_get_key(preference_t pref) _get_key(preference_t pref)
{ {
switch (pref) { switch (pref)
case PREF_CLEAR_PERSIST_HISTORY: {
return "clear.persist_history"; case PREF_CLEAR_PERSIST_HISTORY:
case PREF_SPLASH: return "clear.persist_history";
return "splash"; case PREF_SPLASH:
case PREF_BEEP: return "splash";
return "beep"; case PREF_BEEP:
case PREF_THEME: return "beep";
return "theme"; case PREF_THEME:
case PREF_VERCHECK: return "theme";
return "vercheck"; case PREF_VERCHECK:
case PREF_WINTITLE_SHOW: return "vercheck";
return "wintitle.show"; case PREF_WINTITLE_SHOW:
case PREF_WINTITLE_GOODBYE: return "wintitle.show";
return "wintitle.goodbye"; case PREF_WINTITLE_GOODBYE:
case PREF_FLASH: return "wintitle.goodbye";
return "flash"; case PREF_FLASH:
case PREF_TRAY: return "flash";
return "tray"; case PREF_TRAY:
case PREF_TRAY_READ: return "tray";
return "tray.read"; case PREF_TRAY_READ:
case PREF_ADV_NOTIFY_DISCO_OR_VERSION: return "tray.read";
return "adv.notify.discoversion"; case PREF_ADV_NOTIFY_DISCO_OR_VERSION:
case PREF_INTYPE: return "adv.notify.discoversion";
return "intype"; case PREF_INTYPE:
case PREF_HISTORY: return "intype";
return "history"; case PREF_HISTORY:
case PREF_CARBONS: return "history";
return "carbons"; case PREF_CARBONS:
case PREF_RECEIPTS_SEND: return "carbons";
return "receipts.send"; case PREF_RECEIPTS_SEND:
case PREF_RECEIPTS_REQUEST: return "receipts.send";
return "receipts.request"; case PREF_RECEIPTS_REQUEST:
case PREF_REVEAL_OS: return "receipts.request";
return "reveal.os"; case PREF_REVEAL_OS:
case PREF_OCCUPANTS: return "reveal.os";
return "occupants"; case PREF_OCCUPANTS:
case PREF_OCCUPANTS_JID: return "occupants";
return "occupants.jid"; case PREF_OCCUPANTS_JID:
case PREF_OCCUPANTS_WRAP: return "occupants.jid";
return "occupants.wrap"; case PREF_OCCUPANTS_WRAP:
case PREF_MUC_PRIVILEGES: return "occupants.wrap";
return "privileges"; case PREF_MUC_PRIVILEGES:
case PREF_STATUSES: return "privileges";
return "statuses"; case PREF_STATUSES:
case PREF_STATUSES_CONSOLE: return "statuses";
return "statuses.console"; case PREF_STATUSES_CONSOLE:
case PREF_STATUSES_CHAT: return "statuses.console";
return "statuses.chat"; case PREF_STATUSES_CHAT:
case PREF_STATUSES_MUC: return "statuses.chat";
return "statuses.muc"; case PREF_STATUSES_MUC:
case PREF_STATES: return "statuses.muc";
return "enabled"; case PREF_STATES:
case PREF_OUTTYPE: return "enabled";
return "outtype"; case PREF_OUTTYPE:
case PREF_NOTIFY_TYPING: return "outtype";
return "typing"; case PREF_NOTIFY_TYPING:
case PREF_NOTIFY_TYPING_CURRENT: return "typing";
return "typing.current"; case PREF_NOTIFY_TYPING_CURRENT:
case PREF_NOTIFY_CHAT: return "typing.current";
return "message"; case PREF_NOTIFY_CHAT:
case PREF_NOTIFY_CHAT_CURRENT: return "message";
return "message.current"; case PREF_NOTIFY_CHAT_CURRENT:
case PREF_NOTIFY_CHAT_TEXT: return "message.current";
return "message.text"; case PREF_NOTIFY_CHAT_TEXT:
case PREF_NOTIFY_ROOM: return "message.text";
return "room"; case PREF_NOTIFY_ROOM:
case PREF_NOTIFY_ROOM_TRIGGER: return "room";
return "room.trigger"; case PREF_NOTIFY_ROOM_TRIGGER:
case PREF_NOTIFY_ROOM_MENTION: return "room.trigger";
return "room.mention"; case PREF_NOTIFY_ROOM_MENTION:
case PREF_NOTIFY_ROOM_CURRENT: return "room.mention";
return "room.current"; case PREF_NOTIFY_ROOM_CURRENT:
case PREF_NOTIFY_ROOM_TEXT: return "room.current";
return "room.text"; case PREF_NOTIFY_ROOM_TEXT:
case PREF_NOTIFY_INVITE: return "room.text";
return "invite"; case PREF_NOTIFY_INVITE:
case PREF_NOTIFY_SUB: return "invite";
return "sub"; case PREF_NOTIFY_SUB:
case PREF_NOTIFY_MENTION_CASE_SENSITIVE: return "sub";
return "room.mention.casesensitive"; case PREF_NOTIFY_MENTION_CASE_SENSITIVE:
case PREF_NOTIFY_MENTION_WHOLE_WORD: return "room.mention.casesensitive";
return "room.mention.wholeword"; case PREF_NOTIFY_MENTION_WHOLE_WORD:
case PREF_CHLOG: return "room.mention.wholeword";
return "chlog"; case PREF_CHLOG:
case PREF_GRLOG: return "chlog";
return "grlog"; case PREF_GRLOG:
case PREF_AUTOAWAY_CHECK: return "grlog";
return "autoaway.check"; case PREF_AUTOAWAY_CHECK:
case PREF_AUTOAWAY_MODE: return "autoaway.check";
return "autoaway.mode"; case PREF_AUTOAWAY_MODE:
case PREF_AUTOAWAY_MESSAGE: return "autoaway.mode";
return "autoaway.awaymessage"; case PREF_AUTOAWAY_MESSAGE:
case PREF_AUTOXA_MESSAGE: return "autoaway.awaymessage";
return "autoaway.xamessage"; case PREF_AUTOXA_MESSAGE:
case PREF_CONNECT_ACCOUNT: return "autoaway.xamessage";
return "account"; case PREF_CONNECT_ACCOUNT:
case PREF_DEFAULT_ACCOUNT: return "account";
return "defaccount"; case PREF_DEFAULT_ACCOUNT:
case PREF_OTR_LOG: return "defaccount";
return "log"; case PREF_OTR_LOG:
case PREF_OTR_POLICY: return "log";
return "policy"; case PREF_OTR_POLICY:
case PREF_OTR_SENDFILE: return "policy";
return "sendfile"; case PREF_OTR_SENDFILE:
case PREF_LOG_ROTATE: return "sendfile";
return "rotate"; case PREF_LOG_ROTATE:
case PREF_LOG_SHARED: return "rotate";
return "shared"; case PREF_LOG_SHARED:
case PREF_PRESENCE: return "shared";
return "presence"; case PREF_PRESENCE:
case PREF_WRAP: return "presence";
return "wrap"; case PREF_WRAP:
case PREF_TIME_CONSOLE: return "wrap";
return "time.console"; case PREF_TIME_CONSOLE:
case PREF_TIME_CHAT: return "time.console";
return "time.chat"; case PREF_TIME_CHAT:
case PREF_TIME_MUC: return "time.chat";
return "time.muc"; case PREF_TIME_MUC:
case PREF_TIME_CONFIG: return "time.muc";
return "time.config"; case PREF_TIME_CONFIG:
case PREF_TIME_PRIVATE: return "time.config";
return "time.private"; case PREF_TIME_PRIVATE:
case PREF_TIME_XMLCONSOLE: return "time.private";
return "time.xmlconsole"; case PREF_TIME_XMLCONSOLE:
case PREF_TIME_STATUSBAR: return "time.xmlconsole";
return "time.statusbar"; case PREF_TIME_STATUSBAR:
case PREF_TIME_LASTACTIVITY: return "time.statusbar";
return "time.lastactivity"; case PREF_TIME_LASTACTIVITY:
case PREF_ROSTER: return "time.lastactivity";
return "roster"; case PREF_ROSTER:
case PREF_ROSTER_OFFLINE: return "roster";
return "roster.offline"; case PREF_ROSTER_OFFLINE:
case PREF_ROSTER_RESOURCE: return "roster.offline";
return "roster.resource"; case PREF_ROSTER_RESOURCE:
case PREF_ROSTER_PRESENCE: return "roster.resource";
return "roster.presence"; case PREF_ROSTER_PRESENCE:
case PREF_ROSTER_STATUS: return "roster.presence";
return "roster.status"; case PREF_ROSTER_STATUS:
case PREF_ROSTER_EMPTY: return "roster.status";
return "roster.empty"; case PREF_ROSTER_EMPTY:
case PREF_ROSTER_BY: return "roster.empty";
return "roster.by"; case PREF_ROSTER_BY:
case PREF_ROSTER_ORDER: return "roster.by";
return "roster.order"; case PREF_ROSTER_ORDER:
case PREF_ROSTER_UNREAD: return "roster.order";
return "roster.unread"; case PREF_ROSTER_UNREAD:
case PREF_ROSTER_COUNT: return "roster.unread";
return "roster.count"; case PREF_ROSTER_COUNT:
case PREF_ROSTER_COUNT_ZERO: return "roster.count";
return "roster.count.zero"; case PREF_ROSTER_COUNT_ZERO:
case PREF_ROSTER_PRIORITY: return "roster.count.zero";
return "roster.priority"; case PREF_ROSTER_PRIORITY:
case PREF_ROSTER_WRAP: return "roster.priority";
return "roster.wrap"; case PREF_ROSTER_WRAP:
case PREF_ROSTER_RESOURCE_JOIN: return "roster.wrap";
return "roster.resource.join"; case PREF_ROSTER_RESOURCE_JOIN:
case PREF_ROSTER_CONTACTS: return "roster.resource.join";
return "roster.contacts"; case PREF_ROSTER_CONTACTS:
case PREF_ROSTER_UNSUBSCRIBED: return "roster.contacts";
return "roster.unsubscribed"; case PREF_ROSTER_UNSUBSCRIBED:
case PREF_ROSTER_ROOMS: return "roster.unsubscribed";
return "roster.rooms"; case PREF_ROSTER_ROOMS:
case PREF_ROSTER_ROOMS_POS: return "roster.rooms";
return "roster.rooms.pos"; case PREF_ROSTER_ROOMS_POS:
case PREF_ROSTER_ROOMS_BY: return "roster.rooms.pos";
return "roster.rooms.by"; case PREF_ROSTER_ROOMS_BY:
case PREF_ROSTER_ROOMS_ORDER: return "roster.rooms.by";
return "roster.rooms.order"; case PREF_ROSTER_ROOMS_ORDER:
case PREF_ROSTER_ROOMS_UNREAD: return "roster.rooms.order";
return "roster.rooms.unread"; case PREF_ROSTER_ROOMS_UNREAD:
case PREF_ROSTER_ROOMS_SERVER: return "roster.rooms.unread";
return "roster.rooms.server"; case PREF_ROSTER_ROOMS_SERVER:
case PREF_ROSTER_ROOMS_USE_AS_NAME: return "roster.rooms.server";
return "roster.rooms.use.name"; case PREF_ROSTER_ROOMS_USE_AS_NAME:
case PREF_ROSTER_PRIVATE: return "roster.rooms.use.name";
return "roster.private"; case PREF_ROSTER_PRIVATE:
case PREF_RESOURCE_TITLE: return "roster.private";
return "resource.title"; case PREF_RESOURCE_TITLE:
case PREF_RESOURCE_MESSAGE: return "resource.title";
return "resource.message"; case PREF_RESOURCE_MESSAGE:
case PREF_INPBLOCK_DYNAMIC: return "resource.message";
return "inpblock.dynamic"; case PREF_INPBLOCK_DYNAMIC:
case PREF_ENC_WARN: return "inpblock.dynamic";
return "enc.warn"; case PREF_ENC_WARN:
case PREF_TITLEBAR_MUC_TITLE_JID: return "enc.warn";
return "titlebar.muc.title.jid"; case PREF_TITLEBAR_MUC_TITLE_JID:
case PREF_TITLEBAR_MUC_TITLE_NAME: return "titlebar.muc.title.jid";
return "titlebar.muc.title.name"; case PREF_TITLEBAR_MUC_TITLE_NAME:
case PREF_PGP_LOG: return "titlebar.muc.title.name";
return "log"; case PREF_PGP_LOG:
case PREF_PGP_SENDFILE: return "log";
return "sendfile"; case PREF_PGP_SENDFILE:
case PREF_TLS_CERTPATH: return "sendfile";
return "tls.certpath"; case PREF_TLS_CERTPATH:
case PREF_TLS_SHOW: return "tls.certpath";
return "tls.show"; case PREF_TLS_SHOW:
case PREF_LASTACTIVITY: return "tls.show";
return "lastactivity"; case PREF_LASTACTIVITY:
case PREF_CONSOLE_MUC: return "lastactivity";
return "console.muc"; case PREF_CONSOLE_MUC:
case PREF_CONSOLE_PRIVATE: return "console.muc";
return "console.private"; case PREF_CONSOLE_PRIVATE:
case PREF_CONSOLE_CHAT: return "console.private";
return "console.chat"; case PREF_CONSOLE_CHAT:
case PREF_COLOR_NICK: return "console.chat";
return "color.nick"; case PREF_COLOR_NICK:
case PREF_COLOR_NICK_OWN: return "color.nick";
return "color.nick.own"; case PREF_COLOR_NICK_OWN:
case PREF_ROSTER_COLOR_NICK: return "color.nick.own";
return "color.roster.nick"; case PREF_ROSTER_COLOR_NICK:
case PREF_OCCUPANTS_COLOR_NICK: return "color.roster.nick";
return "color.occupants.nick"; case PREF_OCCUPANTS_COLOR_NICK:
case PREF_BOOKMARK_INVITE: return "color.occupants.nick";
return "bookmark.invite"; case PREF_BOOKMARK_INVITE:
case PREF_PLUGINS_SOURCEPATH: return "bookmark.invite";
return "sourcepath"; case PREF_PLUGINS_SOURCEPATH:
case PREF_ROOM_LIST_CACHE: return "sourcepath";
return "rooms.cache"; case PREF_ROOM_LIST_CACHE:
case PREF_STATUSBAR_SHOW_NAME: return "rooms.cache";
return "statusbar.show.name"; case PREF_STATUSBAR_SHOW_NAME:
case PREF_STATUSBAR_SHOW_NUMBER: return "statusbar.show.name";
return "statusbar.show.number"; case PREF_STATUSBAR_SHOW_NUMBER:
case PREF_STATUSBAR_SHOW_READ: return "statusbar.show.number";
return "statusbar.show.read"; case PREF_STATUSBAR_SHOW_READ:
case PREF_STATUSBAR_SELF: return "statusbar.show.read";
return "statusbar.self"; case PREF_STATUSBAR_SELF:
case PREF_STATUSBAR_CHAT: return "statusbar.self";
return "statusbar.chat"; case PREF_STATUSBAR_CHAT:
case PREF_STATUSBAR_ROOM: return "statusbar.chat";
return "statusbar.room"; case PREF_STATUSBAR_ROOM:
case PREF_OMEMO_LOG: return "statusbar.room";
return "log"; case PREF_OMEMO_LOG:
case PREF_OMEMO_POLICY: return "log";
return "policy"; case PREF_OMEMO_POLICY:
case PREF_OMEMO_SENDFILE: return "policy";
return "sendfile"; case PREF_CORRECTION_ALLOW:
case PREF_CORRECTION_ALLOW: return "correction.allow";
return "correction.allow"; case PREF_AVATAR_CMD:
case PREF_AVATAR_CMD: return "avatar.cmd";
return "avatar.cmd"; case PREF_SLASH_GUARD:
case PREF_SLASH_GUARD: return "slashguard";
return "slashguard"; case PREF_MAM:
case PREF_MAM: return "mam";
return "mam"; case PREF_URL_OPEN_CMD:
case PREF_URL_OPEN_CMD: return "url.open.cmd";
return "url.open.cmd"; case PREF_URL_SAVE_CMD:
case PREF_URL_SAVE_CMD: return "url.save.cmd";
return "url.save.cmd"; default:
default: return NULL;
return NULL;
} }
} }

View File

@@ -165,7 +165,6 @@ typedef enum {
PREF_STATUSBAR_ROOM, PREF_STATUSBAR_ROOM,
PREF_OMEMO_LOG, PREF_OMEMO_LOG,
PREF_OMEMO_POLICY, PREF_OMEMO_POLICY,
PREF_OMEMO_SENDFILE,
PREF_OCCUPANTS_WRAP, PREF_OCCUPANTS_WRAP,
PREF_CORRECTION_ALLOW, PREF_CORRECTION_ALLOW,
PREF_AVATAR_CMD, PREF_AVATAR_CMD,

View File

@@ -2192,13 +2192,7 @@ cons_show_omemo_prefs(void)
cons_show("OMEMO char (/omemo char) : %s", ch); cons_show("OMEMO char (/omemo char) : %s", ch);
free(ch); free(ch);
if (prefs_get_boolean(PREF_OMEMO_SENDFILE)) { cons_alert();
cons_show("Allow sending unencrypted files in an OMEMO session via /sendfile (/omemo sendfile): ON");
} else {
cons_show("Allow sending unencrypted files in an OMEMO session via /sendfile (/omemo sendfile): OFF");
}
cons_alert(NULL);
} }
void void