1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Added PGP prefs

This commit is contained in:
James Booth 2015-06-22 21:09:14 +01:00
parent 24ebb51254
commit 86acd4649b
5 changed files with 28 additions and 0 deletions

View File

@ -1299,6 +1299,7 @@ cmd_init(void)
autocomplete_add(prefs_ac, "conn");
autocomplete_add(prefs_ac, "presence");
autocomplete_add(prefs_ac, "otr");
autocomplete_add(prefs_ac, "pgp");
notify_ac = autocomplete_new();
autocomplete_add(notify_ac, "message");

View File

@ -905,6 +905,10 @@ cmd_prefs(ProfWin *window, gchar **args, struct cmd_help_t help)
cons_show("");
cons_show_otr_prefs();
cons_show("");
} else if (strcmp(args[0], "pgp") == 0) {
cons_show("");
cons_show_pgp_prefs();
cons_show("");
} else {
cons_show("Usage: %s", help.usage);
}

View File

@ -1422,6 +1422,25 @@ cons_show_otr_prefs(void)
cons_alert();
}
void
cons_show_pgp_prefs(void)
{
cons_show("PGP preferences:");
cons_show("");
char *log_value = prefs_get_string(PREF_PGP_LOG);
if (strcmp(log_value, "on") == 0) {
cons_show("PGP logging (/pgp log) : ON");
} else if (strcmp(log_value, "off") == 0) {
cons_show("PGP logging (/pgp log) : OFF");
} else {
cons_show("PGP logging (/pgp log) : Redacted");
}
prefs_free_string(log_value);
cons_alert();
}
void
cons_show_themes(GSList *themes)
{
@ -1458,6 +1477,8 @@ cons_prefs(void)
cons_show("");
cons_show_otr_prefs();
cons_show("");
cons_show_pgp_prefs();
cons_show("");
cons_alert();
}

View File

@ -250,6 +250,7 @@ void cons_show_log_prefs(void);
void cons_show_presence_prefs(void);
void cons_show_connection_prefs(void);
void cons_show_otr_prefs(void);
void cons_show_pgp_prefs(void);
void cons_show_account(ProfAccount *account);
void cons_debug(const char * const msg, ...);
void cons_show_time(void);

View File

@ -369,6 +369,7 @@ void cons_show_log_prefs(void) {}
void cons_show_presence_prefs(void) {}
void cons_show_connection_prefs(void) {}
void cons_show_otr_prefs(void) {}
void cons_show_pgp_prefs(void) {}
void cons_show_account(ProfAccount *account)
{