diff options
author | James Booth <boothj5@gmail.com> | 2015-06-21 21:07:57 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-06-21 21:07:57 +0100 |
commit | 446027b9505342c09f62f6d7a279c65a0d1db107 (patch) | |
tree | 2dde6c8ded47bb6880265e0b83a8aef25ad3e5ab /src/command | |
parent | e72ddf5488a4cc2a39ed8037181a39d71768eff6 (diff) | |
download | profani-tty-446027b9505342c09f62f6d7a279c65a0d1db107.tar.gz |
Moved setting otr.warn -> enc.warn
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/command.c | 17 | ||||
-rw-r--r-- | src/command/commands.c | 11 | ||||
-rw-r--r-- | src/command/commands.h | 1 |
3 files changed, 16 insertions, 13 deletions
diff --git a/src/command/command.c b/src/command/command.c index af91bf16..05ca9737 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -668,6 +668,14 @@ static struct cmd_t command_defs[] = "If the terminal does not support sounds, it may attempt to flash the screen instead.", NULL } } }, + { "/encwarn", + cmd_encwarn, parse_args, 1, 1, &cons_encwarn_setting, + { "/encwarn on|off", "Titlebar encryption warning.", + { "/encwarn on|off", + "---------------", + "Enabled or disable the unencrypted warning message in the titlebar.", + NULL } } }, + { "/presence", cmd_presence, parse_args, 1, 1, &cons_presence_setting, { "/presence on|off", "Show the contacts presence in the titlebar.", @@ -1483,7 +1491,6 @@ cmd_init(void) autocomplete_add(otr_ac, "untrust"); autocomplete_add(otr_ac, "secret"); autocomplete_add(otr_ac, "log"); - autocomplete_add(otr_ac, "warn"); autocomplete_add(otr_ac, "libver"); autocomplete_add(otr_ac, "policy"); autocomplete_add(otr_ac, "question"); @@ -1957,7 +1964,7 @@ _cmd_complete_parameters(ProfWin *window, const char * const input) // autocomplete boolean settings gchar *boolean_choices[] = { "/beep", "/intype", "/states", "/outtype", "/flash", "/splash", "/chlog", "/grlog", "/mouse", "/history", - "/vercheck", "/privileges", "/presence", "/wrap", "/winstidy", "/carbons" }; + "/vercheck", "/privileges", "/presence", "/wrap", "/winstidy", "/carbons", "/encwarn" }; for (i = 0; i < ARRAY_SIZE(boolean_choices); i++) { result = autocomplete_param_with_func(input, boolean_choices[i], prefs_autocomplete_boolean_choice); @@ -2460,12 +2467,6 @@ _otr_autocomplete(ProfWin *window, const char * const input) return found; } - found = autocomplete_param_with_func(input, "/otr warn", - prefs_autocomplete_boolean_choice); - if (found) { - return found; - } - found = autocomplete_param_with_ac(input, "/otr", otr_ac, TRUE); if (found) { return found; diff --git a/src/command/commands.c b/src/command/commands.c index 2fe4c2f6..03a3f9f6 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -4326,11 +4326,6 @@ cmd_otr(ProfWin *window, gchar **args, struct cmd_help_t help) } return TRUE; - } else if (strcmp(args[0], "warn") == 0) { - gboolean result = _cmd_set_boolean_preference(args[1], help, - "OTR warning message", PREF_OTR_WARN); - return result; - } else if (strcmp(args[0], "libver") == 0) { char *version = otr_libotr_version(); cons_show("Using libotr version %s", version); @@ -4608,6 +4603,12 @@ cmd_otr(ProfWin *window, gchar **args, struct cmd_help_t help) #endif } +gboolean +cmd_encwarn(ProfWin *window, gchar **args, struct cmd_help_t help) +{ + return _cmd_set_boolean_preference(args[0], help, "Encryption warning message", PREF_ENC_WARN); +} + // helper function for status change commands static void _update_presence(const resource_presence_t resource_presence, diff --git a/src/command/commands.h b/src/command/commands.h index d7044ea1..6f2bada2 100644 --- a/src/command/commands.h +++ b/src/command/commands.h @@ -146,6 +146,7 @@ gboolean cmd_wrap(ProfWin *window, gchar **args, struct cmd_help_t help); gboolean cmd_time(ProfWin *window, gchar **args, struct cmd_help_t help); gboolean cmd_resource(ProfWin *window, gchar **args, struct cmd_help_t help); gboolean cmd_inpblock(ProfWin *window, gchar **args, struct cmd_help_t help); +gboolean cmd_encwarn(ProfWin *window, gchar **args, struct cmd_help_t help); gboolean cmd_form_field(ProfWin *window, char *tag, gchar **args); |