diff options
-rw-r--r-- | src/command/command.c | 24 | ||||
-rw-r--r-- | src/command/commands.c | 8 | ||||
-rw-r--r-- | src/config/preferences.c | 5 | ||||
-rw-r--r-- | src/config/preferences.h | 1 | ||||
-rw-r--r-- | src/config/theme.c | 1 | ||||
-rw-r--r-- | src/ui/console.c | 246 | ||||
-rw-r--r-- | src/ui/privwin.c | 7 | ||||
-rw-r--r-- | src/ui/ui.h | 2 | ||||
-rw-r--r-- | theme_template | 1 | ||||
-rw-r--r-- | themes/boothj5 | 1 | ||||
-rw-r--r-- | themes/boothj5_slack | 1 | ||||
-rw-r--r-- | themes/complex | 1 | ||||
-rw-r--r-- | themes/simple | 1 |
13 files changed, 169 insertions, 130 deletions
diff --git a/src/command/command.c b/src/command/command.c index ce904ca9..d2d7f4ab 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -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) { diff --git a/src/command/commands.c b/src/command/commands.c index 6a364916..6570f13d 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -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; } diff --git a/src/config/preferences.c b/src/config/preferences.c index 932fe364..36f3df38 100644 --- a/src/config/preferences.c +++ b/src/config/preferences.c @@ -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: diff --git a/src/config/preferences.h b/src/config/preferences.h index 4ca48df4..5bb219b1 100644 --- a/src/config/preferences.h +++ b/src/config/preferences.h @@ -133,6 +133,7 @@ typedef enum { PREF_TLS_SHOW, PREF_LASTACTIVITY, PREF_CONSOLE_MUC, + PREF_CONSOLE_PRIVATE, PREF_CONSOLE_CHAT, } preference_t; diff --git a/src/config/theme.c b/src/config/theme.c index fe6b9f63..1c4a3698 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -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); diff --git a/src/ui/console.c b/src/ui/console.c index c416efde..be6246c8 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -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"); } } diff --git a/src/ui/privwin.c b/src/ui/privwin.c index be84a69c..00c50bb6 100644 --- a/src/ui/privwin.c +++ b/src/ui/privwin.c @@ -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(); diff --git a/src/ui/ui.h b/src/ui/ui.h index 8778e65e..62454e72 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -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); diff --git a/theme_template b/theme_template index 42d76f85..bfcd498d 100644 --- a/theme_template +++ b/theme_template @@ -132,3 +132,4 @@ otr.char= pgp.char= console.muc= console.chat= +console.private= diff --git a/themes/boothj5 b/themes/boothj5 index b54835c4..4d221a77 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -131,3 +131,4 @@ pgp.char=% tls.show=true console.muc=first console.chat=all +console.private=all diff --git a/themes/boothj5_slack b/themes/boothj5_slack index f900f579..7a9fd5aa 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -127,3 +127,4 @@ pgp.char=% tls.show=true console.muc=first console.chat=all +console.private=all diff --git a/themes/complex b/themes/complex index f42530c6..6fc03af2 100644 --- a/themes/complex +++ b/themes/complex @@ -56,3 +56,4 @@ enc.warn=true tls.show=true console.muc=all console.chat=all +console.private=all diff --git a/themes/simple b/themes/simple index 31375df3..7e3a0d8e 100644 --- a/themes/simple +++ b/themes/simple @@ -43,3 +43,4 @@ wins.autotidy=false tls.show=false console.muc=first console.chat=first +console.private=first |