1
0
Fork 0

Added console.chat preference

This commit is contained in:
James Booth 2016-02-03 23:02:52 +00:00
parent 003cdcf3fb
commit 72c1c49695
9 changed files with 24 additions and 3 deletions

View File

@ -4409,7 +4409,7 @@ cmd_beep(ProfWin *window, const char *const command, gchar **args)
gboolean
cmd_console(ProfWin *window, const char *const command, gchar **args)
{
if (g_strcmp0(args[0], "muc") != 0) {
if ((g_strcmp0(args[0], "chat") != 0) && (g_strcmp0(args[0], "muc") != 0)) {
cons_bad_cmd_usage(command);
return TRUE;
}
@ -4420,8 +4420,17 @@ cmd_console(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
prefs_set_string(PREF_CONSOLE_MUC, setting);
cons_show("Console MUC messages set: %s", setting);
if (g_strcmp0(args[0], "chat") == 0) {
prefs_set_string(PREF_CONSOLE_CHAT, setting);
cons_show("Console chat messages set: %s", setting);
return TRUE;
}
if (g_strcmp0(args[0], "muc") == 0) {
prefs_set_string(PREF_CONSOLE_MUC, setting);
cons_show("Console MUC messages set: %s", setting);
return TRUE;
}
return TRUE;
}

View File

@ -1157,6 +1157,7 @@ _get_group(preference_t pref)
case PREF_INPBLOCK_DYNAMIC:
case PREF_TLS_SHOW:
case PREF_CONSOLE_MUC:
case PREF_CONSOLE_CHAT:
return PREF_GROUP_UI;
case PREF_STATES:
case PREF_OUTTYPE:
@ -1381,6 +1382,8 @@ _get_key(preference_t pref)
return "lastactivity";
case PREF_CONSOLE_MUC:
return "console.muc";
case PREF_CONSOLE_CHAT:
return "console.chat";
default:
return NULL;
}
@ -1485,6 +1488,8 @@ _get_default_string(preference_t pref)
return "redact";
case PREF_CONSOLE_MUC:
return "all";
case PREF_CONSOLE_CHAT:
return "all";
default:
return NULL;
}

View File

@ -133,6 +133,7 @@ typedef enum {
PREF_TLS_SHOW,
PREF_LASTACTIVITY,
PREF_CONSOLE_MUC,
PREF_CONSOLE_CHAT,
} preference_t;
typedef struct prof_alias_t {

View File

@ -410,6 +410,7 @@ _load_preferences(void)
_set_string_preference("statuses.chat", PREF_STATUSES_CHAT);
_set_string_preference("statuses.muc", PREF_STATUSES_MUC);
_set_string_preference("console.muc", PREF_CONSOLE_MUC);
_set_string_preference("console.chat", PREF_CONSOLE_CHAT);
_set_string_preference("roster.by", PREF_ROSTER_BY);
_set_string_preference("roster.order", PREF_ROSTER_ORDER);
_set_string_preference("roster.unread", PREF_ROSTER_UNREAD);

View File

@ -131,3 +131,4 @@ wins.autotidy=
otr.char=
pgp.char=
console.muc=
console.chat=

View File

@ -130,3 +130,4 @@ otr.char=@
pgp.char=%
tls.show=true
console.muc=first
console.chat=all

View File

@ -126,3 +126,4 @@ otr.char=@
pgp.char=%
tls.show=true
console.muc=first
console.chat=all

View File

@ -55,3 +55,4 @@ intype=true
enc.warn=true
tls.show=true
console.muc=all
console.chat=all

View File

@ -42,3 +42,4 @@ enc.warn=false
wins.autotidy=false
tls.show=false
console.muc=first
console.chat=first