1
0
Fork 0

ox: show ox preferences

This commit is contained in:
Michael Vetter 2022-05-05 23:48:43 +02:00
parent d011d6707c
commit b16bdca726
5 changed files with 35 additions and 0 deletions

View File

@ -317,6 +317,7 @@ cmd_ac_init(void)
#endif
#ifdef HAVE_LIBGPGME
autocomplete_add(prefs_ac, "pgp");
autocomplete_add(prefs_ac, "ox");
#endif
#ifdef HAVE_OMEMO
autocomplete_add(prefs_ac, "omemo");

View File

@ -1743,6 +1743,10 @@ cmd_prefs(ProfWin* window, const char* const command, gchar** args)
cons_show("");
cons_show_omemo_prefs();
cons_show("");
} else if (strcmp(args[0], "ox") == 0) {
cons_show("");
cons_show_ox_prefs();
cons_show("");
} else {
cons_bad_cmd_usage(command);
}

View File

@ -2314,6 +2314,29 @@ cons_show_omemo_prefs(void)
cons_alert(NULL);
}
void
cons_show_ox_prefs(void)
{
cons_show("OX preferences:");
cons_show("");
char* log_value = prefs_get_string(PREF_OX_LOG);
if (strcmp(log_value, "on") == 0) {
cons_show("OX logging (/ox log) : ON");
} else if (strcmp(log_value, "off") == 0) {
cons_show("OX logging (/ox log) : OFF");
} else {
cons_show("OX logging (/ox log) : Redacted");
}
g_free(log_value);
char* ch = prefs_get_ox_char();
cons_show("OX char (/ox char) : %s", ch);
free(ch);
cons_alert(NULL);
}
void
cons_show_themes(GSList* themes)
{
@ -2390,6 +2413,8 @@ cons_prefs(void)
cons_show("");
cons_show_omemo_prefs();
cons_show("");
cons_show_ox_prefs();
cons_show("");
cons_alert(NULL);
}

View File

@ -252,6 +252,7 @@ void cons_show_connection_prefs(void);
void cons_show_otr_prefs(void);
void cons_show_pgp_prefs(void);
void cons_show_omemo_prefs(void);
void cons_show_ox_prefs(void);
void cons_show_account(ProfAccount* account);
void cons_debug(const char* const msg, ...);
void cons_show_error(const char* const cmd, ...);

View File

@ -790,6 +790,10 @@ void
cons_show_omemo_prefs(void)
{
}
void
cons_show_ox_prefs(void)
{
}
void
cons_show_account(ProfAccount* account)