1
0
Fork 0

Implemented /console private setting

This commit is contained in:
James Booth 2016-02-03 23:39:20 +00:00
parent 19a3066e28
commit bab75cae15
13 changed files with 169 additions and 130 deletions

View File

@ -1047,20 +1047,25 @@ static struct cmd_t command_defs[] =
cmd_console, parse_args, 2, 2, &cons_console_setting,
CMD_TAGS(
CMD_TAG_UI,
CMD_TAG_CHAT,
CMD_TAG_GROUPCHAT)
CMD_SYN(
"/console chat all|first|none",
"/console muc all|first|none")
"/console muc all|first|none",
"/console private all|first|none")
CMD_DESC(
"Configure what is displayed in the console window when messages are received. "
"The default is set to 'all' for all types of messages.")
CMD_ARGS(
{ "chat all", "Indicate all new chat messages in the console." },
{ "chat first", "Indicate only the first new message per chat in the console." },
{ "chat none", "Do not show any new chat messages in the console window." },
{ "muc all", "Indicate all new chat room messages in the console." },
{ "muc first", "Indicate only the first new message in each room in the console." },
{ "muc none", "Do not show any new chat room messages in the console window." })
{ "chat all", "Indicate all new chat messages in the console." },
{ "chat first", "Indicate only the first new message per chat in the console." },
{ "chat none", "Do not show any new chat messages in the console window." },
{ "muc all", "Indicate all new chat room messages in the console." },
{ "muc first", "Indicate only the first new message in each room in the console." },
{ "muc none", "Do not show any new chat room messages in the console window." },
{ "private all", "Indicate all new private room messages in the console." },
{ "private first", "Indicate only the first private room message in the console." },
{ "private none", "Do not show any new private room messages in the console window." })
CMD_NOEXAMPLES
},
@ -2526,6 +2531,7 @@ cmd_init(void)
console_ac = autocomplete_new();
autocomplete_add(console_ac, "chat");
autocomplete_add(console_ac, "muc");
autocomplete_add(console_ac, "private");
console_msg_ac = autocomplete_new();
autocomplete_add(console_msg_ac, "all");
@ -4418,6 +4424,10 @@ _console_autocomplete(ProfWin *window, const char *const input)
if (result) {
return result;
}
result = autocomplete_param_with_ac(input, "/console private", console_msg_ac, TRUE);
if (result) {
return result;
}
result = autocomplete_param_with_ac(input, "/console", console_ac, TRUE);
if (result) {

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], "chat") != 0) && (g_strcmp0(args[0], "muc") != 0)) {
if ((g_strcmp0(args[0], "chat") != 0) && (g_strcmp0(args[0], "muc") != 0) && (g_strcmp0(args[0], "private") != 0)) {
cons_bad_cmd_usage(command);
return TRUE;
}
@ -4432,6 +4432,12 @@ cmd_console(ProfWin *window, const char *const command, gchar **args)
return TRUE;
}
if (g_strcmp0(args[0], "private") == 0) {
prefs_set_string(PREF_CONSOLE_PRIVATE, setting);
cons_show("Console private room 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_PRIVATE:
case PREF_CONSOLE_CHAT:
return PREF_GROUP_UI;
case PREF_STATES:
@ -1382,6 +1383,8 @@ _get_key(preference_t pref)
return "lastactivity";
case PREF_CONSOLE_MUC:
return "console.muc";
case PREF_CONSOLE_PRIVATE:
return "console.private";
case PREF_CONSOLE_CHAT:
return "console.chat";
default:
@ -1487,7 +1490,7 @@ _get_default_string(preference_t pref)
case PREF_PGP_LOG:
return "redact";
case PREF_CONSOLE_MUC:
return "all";
case PREF_CONSOLE_PRIVATE:
case PREF_CONSOLE_CHAT:
return "all";
default:

View File

@ -133,6 +133,7 @@ typedef enum {
PREF_TLS_SHOW,
PREF_LASTACTIVITY,
PREF_CONSOLE_MUC,
PREF_CONSOLE_PRIVATE,
PREF_CONSOLE_CHAT,
} preference_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.private", PREF_CONSOLE_PRIVATE);
_set_string_preference("console.chat", PREF_CONSOLE_CHAT);
_set_string_preference("roster.by", PREF_ROSTER_BY);
_set_string_preference("roster.order", PREF_ROSTER_ORDER);

View File

@ -384,7 +384,7 @@ cons_show_incoming_message(const char *const short_from, const int win_index, in
}
void
cons_show_incoming_private_message(const char *const nick, const char *const room, const int win_index)
cons_show_incoming_private_message(const char *const nick, const char *const room, const int win_index, int unread)
{
ProfWin *console = wins_get_console();
@ -392,9 +392,17 @@ cons_show_incoming_private_message(const char *const nick, const char *const roo
if (ui_index == 10) {
ui_index = 0;
}
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
cons_alert();
char *priv_show = prefs_get_string(PREF_CONSOLE_PRIVATE);
if (g_strcmp0(priv_show, "all") == 0) {
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
cons_alert();
} else if ((g_strcmp0(priv_show, "first") == 0) && unread == 0) {
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< private message: %s in %s (win %d)", nick, room, ui_index);
cons_alert();
}
prefs_free_string(priv_show);
}
void
@ -1064,9 +1072,9 @@ cons_theme_setting(void)
{
char *theme = prefs_get_string(PREF_THEME);
if (theme == NULL) {
cons_show("Theme (/theme) : default");
cons_show("Theme (/theme) : default");
} else {
cons_show("Theme (/theme) : %s", theme);
cons_show("Theme (/theme) : %s", theme);
}
prefs_free_string(theme);
}
@ -1075,58 +1083,58 @@ void
cons_privileges_setting(void)
{
if (prefs_get_boolean(PREF_MUC_PRIVILEGES))
cons_show("MUC privileges (/privileges) : ON");
cons_show("MUC privileges (/privileges) : ON");
else
cons_show("MUC privileges (/privileges) : OFF");
cons_show("MUC privileges (/privileges) : OFF");
}
void
cons_beep_setting(void)
{
if (prefs_get_boolean(PREF_BEEP))
cons_show("Terminal beep (/beep) : ON");
cons_show("Terminal beep (/beep) : ON");
else
cons_show("Terminal beep (/beep) : OFF");
cons_show("Terminal beep (/beep) : OFF");
}
void
cons_resource_setting(void)
{
if (prefs_get_boolean(PREF_RESOURCE_TITLE))
cons_show("Resource title (/resource) : ON");
cons_show("Resource title (/resource) : ON");
else
cons_show("Resource title (/resource) : OFF");
cons_show("Resource title (/resource) : OFF");
if (prefs_get_boolean(PREF_RESOURCE_MESSAGE))
cons_show("Resource message (/resource) : ON");
cons_show("Resource message (/resource) : ON");
else
cons_show("Resource message (/resource) : OFF");
cons_show("Resource message (/resource) : OFF");
}
void
cons_wrap_setting(void)
{
if (prefs_get_boolean(PREF_WRAP))
cons_show("Word wrap (/wrap) : ON");
cons_show("Word wrap (/wrap) : ON");
else
cons_show("Word wrap (/wrap) : OFF");
cons_show("Word wrap (/wrap) : OFF");
}
void
cons_winstidy_setting(void)
{
if (prefs_get_boolean(PREF_WINS_AUTO_TIDY))
cons_show("Window Auto Tidy (/wins) : ON");
cons_show("Window Auto Tidy (/wins) : ON");
else
cons_show("Window Auto Tidy (/wins) : OFF");
cons_show("Window Auto Tidy (/wins) : OFF");
}
void
cons_encwarn_setting(void)
{
if (prefs_get_boolean(PREF_ENC_WARN)) {
cons_show("Warn unencrypted (/encwarn) : ON");
cons_show("Warn unencrypted (/encwarn) : ON");
} else {
cons_show("Warn unencrypted (/encwarn) : OFF");
cons_show("Warn unencrypted (/encwarn) : OFF");
}
}
@ -1134,21 +1142,25 @@ void
cons_console_setting(void)
{
char *chatsetting = prefs_get_string(PREF_CONSOLE_CHAT);
cons_show("Console chat messages (/console) : %s", chatsetting);
cons_show("Console chat messages (/console) : %s", chatsetting);
prefs_free_string(chatsetting);
char *mucsetting = prefs_get_string(PREF_CONSOLE_MUC);
cons_show("Console MUC messages (/console) : %s", mucsetting);
cons_show("Console MUC messages (/console) : %s", mucsetting);
prefs_free_string(mucsetting);
char *privsetting = prefs_get_string(PREF_CONSOLE_PRIVATE);
cons_show("Console private messages (/console) : %s", privsetting);
prefs_free_string(privsetting);
}
void
cons_tlsshow_setting(void)
{
if (prefs_get_boolean(PREF_TLS_SHOW)) {
cons_show("TLS show (/tls) : ON");
cons_show("TLS show (/tls) : ON");
} else {
cons_show("TLS show (/tls) : OFF");
cons_show("TLS show (/tls) : OFF");
}
}
@ -1156,44 +1168,44 @@ void
cons_presence_setting(void)
{
if (prefs_get_boolean(PREF_PRESENCE))
cons_show("Contact presence (/presence) : ON");
cons_show("Contact presence (/presence) : ON");
else
cons_show("Contact presence (/presence) : OFF");
cons_show("Contact presence (/presence) : OFF");
}
void
cons_flash_setting(void)
{
if (prefs_get_boolean(PREF_FLASH))
cons_show("Terminal flash (/flash) : ON");
cons_show("Terminal flash (/flash) : ON");
else
cons_show("Terminal flash (/flash) : OFF");
cons_show("Terminal flash (/flash) : OFF");
}
void
cons_splash_setting(void)
{
if (prefs_get_boolean(PREF_SPLASH))
cons_show("Splash screen (/splash) : ON");
cons_show("Splash screen (/splash) : ON");
else
cons_show("Splash screen (/splash) : OFF");
cons_show("Splash screen (/splash) : OFF");
}
void
cons_occupants_setting(void)
{
if (prefs_get_boolean(PREF_OCCUPANTS))
cons_show("Occupants (/occupants) : show");
cons_show("Occupants (/occupants) : show");
else
cons_show("Occupants (/occupants) : hide");
cons_show("Occupants (/occupants) : hide");
if (prefs_get_boolean(PREF_OCCUPANTS_JID))
cons_show("Occupant jids (/occupants) : show");
cons_show("Occupant jids (/occupants) : show");
else
cons_show("Occupant jids (/occupants) : hide");
cons_show("Occupant jids (/occupants) : hide");
int size = prefs_get_occupants_size();
cons_show("Occupants size (/occupants) : %d", size);
cons_show("Occupants size (/occupants) : %d", size);
}
void
@ -1213,55 +1225,55 @@ cons_time_setting(void)
{
char *pref_time_console = prefs_get_string(PREF_TIME_CONSOLE);
if (g_strcmp0(pref_time_console, "off") == 0)
cons_show("Time console (/time) : OFF");
cons_show("Time console (/time) : OFF");
else
cons_show("Time console (/time) : %s", pref_time_console);
cons_show("Time console (/time) : %s", pref_time_console);
prefs_free_string(pref_time_console);
char *pref_time_chat = prefs_get_string(PREF_TIME_CHAT);
if (g_strcmp0(pref_time_chat, "off") == 0)
cons_show("Time chat (/time) : OFF");
cons_show("Time chat (/time) : OFF");
else
cons_show("Time chat (/time) : %s", pref_time_chat);
cons_show("Time chat (/time) : %s", pref_time_chat);
prefs_free_string(pref_time_chat);
char *pref_time_muc = prefs_get_string(PREF_TIME_MUC);
if (g_strcmp0(pref_time_muc, "off") == 0)
cons_show("Time MUC (/time) : OFF");
cons_show("Time MUC (/time) : OFF");
else
cons_show("Time MUC (/time) : %s", pref_time_muc);
cons_show("Time MUC (/time) : %s", pref_time_muc);
prefs_free_string(pref_time_muc);
char *pref_time_mucconf = prefs_get_string(PREF_TIME_MUCCONFIG);
if (g_strcmp0(pref_time_mucconf, "off") == 0)
cons_show("Time MUC config (/time) : OFF");
cons_show("Time MUC config (/time) : OFF");
else
cons_show("Time MUC config (/time) : %s", pref_time_mucconf);
cons_show("Time MUC config (/time) : %s", pref_time_mucconf);
prefs_free_string(pref_time_mucconf);
char *pref_time_private = prefs_get_string(PREF_TIME_PRIVATE);
if (g_strcmp0(pref_time_private, "off") == 0)
cons_show("Time private (/time) : OFF");
cons_show("Time private (/time) : OFF");
else
cons_show("Time private (/time) : %s", pref_time_private);
cons_show("Time private (/time) : %s", pref_time_private);
prefs_free_string(pref_time_private);
char *pref_time_xml = prefs_get_string(PREF_TIME_XMLCONSOLE);
if (g_strcmp0(pref_time_xml, "off") == 0)
cons_show("Time XML Console (/time) : OFF");
cons_show("Time XML Console (/time) : OFF");
else
cons_show("Time XML Console (/time) : %s", pref_time_xml);
cons_show("Time XML Console (/time) : %s", pref_time_xml);
prefs_free_string(pref_time_xml);
char *pref_time_statusbar = prefs_get_string(PREF_TIME_STATUSBAR);
if (g_strcmp0(pref_time_statusbar, "off") == 0)
cons_show("Time statusbar (/time) : OFF");
cons_show("Time statusbar (/time) : OFF");
else
cons_show("Time statusbar (/time) : %s", pref_time_statusbar);
cons_show("Time statusbar (/time) : %s", pref_time_statusbar);
prefs_free_string(pref_time_statusbar);
char *pref_time_lastactivity = prefs_get_string(PREF_TIME_LASTACTIVITY);
cons_show("Time last activity (/time) : %s", pref_time_lastactivity);
cons_show("Time last activity (/time) : %s", pref_time_lastactivity);
prefs_free_string(pref_time_lastactivity);
}
@ -1269,9 +1281,9 @@ void
cons_vercheck_setting(void)
{
if (prefs_get_boolean(PREF_VERCHECK))
cons_show("Version checking (/vercheck) : ON");
cons_show("Version checking (/vercheck) : ON");
else
cons_show("Version checking (/vercheck) : OFF");
cons_show("Version checking (/vercheck) : OFF");
}
void
@ -1281,9 +1293,9 @@ cons_statuses_setting(void)
char *chat = prefs_get_string(PREF_STATUSES_CHAT);
char *muc = prefs_get_string(PREF_STATUSES_MUC);
cons_show("Console statuses (/statuses) : %s", console);
cons_show("Chat statuses (/statuses) : %s", chat);
cons_show("MUC statuses (/statuses) : %s", muc);
cons_show("Console statuses (/statuses) : %s", console);
cons_show("Chat statuses (/statuses) : %s", chat);
cons_show("MUC statuses (/statuses) : %s", muc);
prefs_free_string(console);
prefs_free_string(chat);
@ -1294,14 +1306,14 @@ void
cons_titlebar_setting(void)
{
if (prefs_get_boolean(PREF_TITLEBAR_SHOW)) {
cons_show("Titlebar show (/titlebar) : ON");
cons_show("Titlebar show (/titlebar) : ON");
} else {
cons_show("Titlebar show (/titlebar) : OFF");
cons_show("Titlebar show (/titlebar) : OFF");
}
if (prefs_get_boolean(PREF_TITLEBAR_GOODBYE)) {
cons_show("Titlebar goodbye (/titlebar) : ON");
cons_show("Titlebar goodbye (/titlebar) : ON");
} else {
cons_show("Titlebar goodbye (/titlebar) : OFF");
cons_show("Titlebar goodbye (/titlebar) : OFF");
}
}
@ -1309,167 +1321,167 @@ void
cons_roster_setting(void)
{
if (prefs_get_boolean(PREF_ROSTER))
cons_show("Roster (/roster) : show");
cons_show("Roster (/roster) : show");
else
cons_show("Roster (/roster) : hide");
cons_show("Roster (/roster) : hide");
if (prefs_get_boolean(PREF_ROSTER_OFFLINE))
cons_show("Roster offline (/roster) : show");
cons_show("Roster offline (/roster) : show");
else
cons_show("Roster offline (/roster) : hide");
cons_show("Roster offline (/roster) : hide");
char header_ch = prefs_get_roster_header_char();
if (header_ch)
cons_show("Roster header char (/roster) : %c", header_ch);
cons_show("Roster header char (/roster) : %c", header_ch);
else
cons_show("Roster header char (/roster) : none");
cons_show("Roster header char (/roster) : none");
char contact_ch = prefs_get_roster_contact_char();
if (contact_ch)
cons_show("Roster contact char (/roster) : %c", contact_ch);
cons_show("Roster contact char (/roster) : %c", contact_ch);
else
cons_show("Roster contact char (/roster) : none");
cons_show("Roster contact char (/roster) : none");
char resource_ch = prefs_get_roster_resource_char();
if (resource_ch)
cons_show("Roster resource char (/roster) : %c", resource_ch);
cons_show("Roster resource char (/roster) : %c", resource_ch);
else
cons_show("Roster resource char (/roster) : none");
cons_show("Roster resource char (/roster) : none");
char room_ch = prefs_get_roster_room_char();
if (room_ch)
cons_show("Roster room char (/roster) : %c", room_ch);
cons_show("Roster room char (/roster) : %c", room_ch);
else
cons_show("Roster room char (/roster) : none");
cons_show("Roster room char (/roster) : none");
char room_priv_ch = prefs_get_roster_room_private_char();
if (room_priv_ch)
cons_show("Roster room private char (/roster) : %c", room_priv_ch);
cons_show("Roster room private char (/roster) : %c", room_priv_ch);
else
cons_show("Roster room private char (/roster) : none");
cons_show("Roster room private char (/roster) : none");
char private_ch = prefs_get_roster_private_char();
if (private_ch)
cons_show("Roster private char (/roster) : %c", private_ch);
cons_show("Roster private char (/roster) : %c", private_ch);
else
cons_show("Roster private char (/roster) : none");
cons_show("Roster private char (/roster) : none");
gint contact_indent = prefs_get_roster_contact_indent();
cons_show("Roster contact indent (/roster) : %d", contact_indent);
cons_show("Roster contact indent (/roster) : %d", contact_indent);
if (prefs_get_boolean(PREF_ROSTER_RESOURCE))
cons_show("Roster resource (/roster) : show");
cons_show("Roster resource (/roster) : show");
else
cons_show("Roster resource (/roster) : hide");
cons_show("Roster resource (/roster) : hide");
gint resource_indent = prefs_get_roster_resource_indent();
cons_show("Roster resource indent (/roster) : %d", resource_indent);
cons_show("Roster resource indent (/roster) : %d", resource_indent);
if (prefs_get_boolean(PREF_ROSTER_RESOURCE_JOIN))
cons_show("Roster resource join (/roster) : on");
cons_show("Roster resource join (/roster) : on");
else
cons_show("Roster resource join (/roster) : off");
cons_show("Roster resource join (/roster) : off");
if (prefs_get_boolean(PREF_ROSTER_PRESENCE))
cons_show("Roster presence (/roster) : show");
cons_show("Roster presence (/roster) : show");
else
cons_show("Roster presence (/roster) : hide");
cons_show("Roster presence (/roster) : hide");
gint presence_indent = prefs_get_roster_presence_indent();
cons_show("Roster presence indent (/roster) : %d", presence_indent);
cons_show("Roster presence indent (/roster) : %d", presence_indent);
if (prefs_get_boolean(PREF_ROSTER_STATUS))
cons_show("Roster status (/roster) : show");
cons_show("Roster status (/roster) : show");
else
cons_show("Roster status (/roster) : hide");
cons_show("Roster status (/roster) : hide");
if (prefs_get_boolean(PREF_ROSTER_EMPTY))
cons_show("Roster empty (/roster) : show");
cons_show("Roster empty (/roster) : show");
else
cons_show("Roster empty (/roster) : hide");
cons_show("Roster empty (/roster) : hide");
if (prefs_get_boolean(PREF_ROSTER_PRIORITY))
cons_show("Roster priority (/roster) : show");
cons_show("Roster priority (/roster) : show");
else
cons_show("Roster priority (/roster) : hide");
cons_show("Roster priority (/roster) : hide");
if (prefs_get_boolean(PREF_ROSTER_CONTACTS))
cons_show("Roster contacts (/roster) : show");
cons_show("Roster contacts (/roster) : show");
else
cons_show("Roster contacts (/roster) : hide");
cons_show("Roster contacts (/roster) : hide");
char *count = prefs_get_string(PREF_ROSTER_COUNT);
if (g_strcmp0(count, "off") == 0) {
cons_show("Roster count (/roster) : OFF");
cons_show("Roster count (/roster) : OFF");
} else {
cons_show("Roster count (/roster) : %s", count);
cons_show("Roster count (/roster) : %s", count);
}
prefs_free_string(count);
if (prefs_get_boolean(PREF_ROSTER_COUNT_ZERO))
cons_show("Roster count zero (/roster) : ON");
cons_show("Roster count zero (/roster) : ON");
else
cons_show("Roster count zero (/roster) : OFF");
cons_show("Roster count zero (/roster) : OFF");
char *by = prefs_get_string(PREF_ROSTER_BY);
cons_show("Roster by (/roster) : %s", by);
cons_show("Roster by (/roster) : %s", by);
prefs_free_string(by);
char *order = prefs_get_string(PREF_ROSTER_ORDER);
cons_show("Roster order (/roster) : %s", order);
cons_show("Roster order (/roster) : %s", order);
prefs_free_string(order);
char *unread = prefs_get_string(PREF_ROSTER_UNREAD);
if (g_strcmp0(unread, "before") == 0) {
cons_show("Roster unread (/roster) : before");
cons_show("Roster unread (/roster) : before");
} else if (g_strcmp0(unread, "after") == 0) {
cons_show("Roster unread (/roster) : after");
cons_show("Roster unread (/roster) : after");
} else {
cons_show("Roster unread (/roster) : OFF");
cons_show("Roster unread (/roster) : OFF");
}
if (prefs_get_boolean(PREF_ROSTER_ROOMS))
cons_show("Roster rooms (/roster) : show");
cons_show("Roster rooms (/roster) : show");
else
cons_show("Roster rooms (/roster) : hide");
cons_show("Roster rooms (/roster) : hide");
char *priv = prefs_get_string(PREF_ROSTER_PRIVATE);
if (g_strcmp0(priv, "room") == 0) {
cons_show("Roster private (/roster) : room");
cons_show("Roster private (/roster) : room");
} else if (g_strcmp0(priv, "group") == 0) {
cons_show("Roster private (/roster) : group");
cons_show("Roster private (/roster) : group");
} else {
cons_show("Roster private (/roster) : OFF");
cons_show("Roster private (/roster) : OFF");
}
char *rooms_pos = prefs_get_string(PREF_ROSTER_ROOMS_POS);
cons_show("Roster rooms position (/roster) : %s", rooms_pos);
cons_show("Roster rooms position (/roster) : %s", rooms_pos);
prefs_free_string(rooms_pos);
char *rooms_by = prefs_get_string(PREF_ROSTER_ROOMS_BY);
cons_show("Roster rooms by (/roster) : %s", rooms_by);
cons_show("Roster rooms by (/roster) : %s", rooms_by);
prefs_free_string(rooms_by);
char *rooms_order = prefs_get_string(PREF_ROSTER_ROOMS_ORDER);
cons_show("Roster rooms order (/roster) : %s", rooms_order);
cons_show("Roster rooms order (/roster) : %s", rooms_order);
prefs_free_string(rooms_order);
char *roomsunread = prefs_get_string(PREF_ROSTER_ROOMS_UNREAD);
if (g_strcmp0(roomsunread, "before") == 0) {
cons_show("Roster rooms unread (/roster) : before");
cons_show("Roster rooms unread (/roster) : before");
} else if (g_strcmp0(roomsunread, "after") == 0) {
cons_show("Roster rooms unread (/roster) : after");
cons_show("Roster rooms unread (/roster) : after");
} else {
cons_show("Roster rooms unread (/roster) : OFF");
cons_show("Roster rooms unread (/roster) : OFF");
}
int size = prefs_get_roster_size();
cons_show("Roster size (/roster) : %d", size);
cons_show("Roster size (/roster) : %d", size);
if (prefs_get_boolean(PREF_ROSTER_WRAP))
cons_show("Roster wrap (/roster) : ON");
cons_show("Roster wrap (/roster) : ON");
else
cons_show("Roster wrap (/roster) : OFF");
cons_show("Roster wrap (/roster) : OFF");
}
void
@ -1680,11 +1692,11 @@ cons_show_chat_prefs(void)
void
cons_inpblock_setting(void)
{
cons_show("Input timeout (/inpblock) : %d milliseconds", prefs_get_inpblock());
cons_show("Input timeout (/inpblock) : %d milliseconds", prefs_get_inpblock());
if (prefs_get_boolean(PREF_INPBLOCK_DYNAMIC)) {
cons_show("Dynamic timeout (/inpblock) : ON");
cons_show("Dynamic timeout (/inpblock) : ON");
} else {
cons_show("Dynamic timeout (/inpblock) : OFF");
cons_show("Dynamic timeout (/inpblock) : OFF");
}
}

View File

@ -67,13 +67,14 @@ privwin_incoming_msg(ProfPrivateWin *privatewin, const char *const message, GDat
// not currently viewing chat window with sender
} else {
status_bar_new(num);
cons_show_incoming_private_message(jidp->resourcepart, jidp->barejid, num, privatewin->unread);
win_print_incoming_message(window, timestamp, jidp->resourcepart, message, PROF_MSG_PLAIN);
privatewin->unread++;
if (notify) {
privatewin->notify = TRUE;
}
status_bar_new(num);
cons_show_incoming_private_message(jidp->resourcepart, jidp->barejid, num);
win_print_incoming_message(window, timestamp, jidp->resourcepart, message, PROF_MSG_PLAIN);
if (prefs_get_boolean(PREF_FLASH)) {
flash();

View File

@ -274,7 +274,7 @@ void cons_show_typing(const char *const barejid);
void cons_show_incoming_room_message(const char *const nick, const char *const room, const int win_index,
gboolean mention, GList *triggers, int unread);
void cons_show_incoming_message(const char *const short_from, const int win_index, int unread);
void cons_show_incoming_private_message(const char *const nick, const char *const room, const int win_index);
void cons_show_incoming_private_message(const char *const nick, const char *const room, const int win_index, int unread);
void cons_show_room_invites(GSList *invites);
void cons_show_received_subs(void);
void cons_show_sent_subs(void);

View File

@ -132,3 +132,4 @@ otr.char=
pgp.char=
console.muc=
console.chat=
console.private=

View File

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

View File

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

View File

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

View File

@ -43,3 +43,4 @@ wins.autotidy=false
tls.show=false
console.muc=first
console.chat=first
console.private=first