mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Merge branch 'master' into plugins
This commit is contained in:
commit
146ba50705
@ -1048,16 +1048,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 muc all|first|none")
|
||||
"/console chat all|first|none",
|
||||
"/console muc all|first|none",
|
||||
"/console private all|first|none")
|
||||
CMD_DESC(
|
||||
"Configure what is displayed in the console window when new chat room messages are received. "
|
||||
"The default is set to 'all'.")
|
||||
"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(
|
||||
{ "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 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
|
||||
},
|
||||
|
||||
@ -2002,7 +2011,7 @@ static Autocomplete tls_certpath_ac;
|
||||
static Autocomplete script_ac;
|
||||
static Autocomplete script_show_ac;
|
||||
static Autocomplete console_ac;
|
||||
static Autocomplete console_muc_ac;
|
||||
static Autocomplete console_msg_ac;
|
||||
static Autocomplete autoping_ac;
|
||||
|
||||
/*
|
||||
@ -2532,12 +2541,14 @@ cmd_init(void)
|
||||
script_show_ac = NULL;
|
||||
|
||||
console_ac = autocomplete_new();
|
||||
autocomplete_add(console_ac, "chat");
|
||||
autocomplete_add(console_ac, "muc");
|
||||
autocomplete_add(console_ac, "private");
|
||||
|
||||
console_muc_ac = autocomplete_new();
|
||||
autocomplete_add(console_muc_ac, "all");
|
||||
autocomplete_add(console_muc_ac, "first");
|
||||
autocomplete_add(console_muc_ac, "none");
|
||||
console_msg_ac = autocomplete_new();
|
||||
autocomplete_add(console_msg_ac, "all");
|
||||
autocomplete_add(console_msg_ac, "first");
|
||||
autocomplete_add(console_msg_ac, "none");
|
||||
|
||||
autoping_ac = autocomplete_new();
|
||||
autocomplete_add(autoping_ac, "set");
|
||||
@ -2626,7 +2637,7 @@ cmd_uninit(void)
|
||||
autocomplete_free(script_ac);
|
||||
autocomplete_free(script_show_ac);
|
||||
autocomplete_free(console_ac);
|
||||
autocomplete_free(console_muc_ac);
|
||||
autocomplete_free(console_msg_ac);
|
||||
autocomplete_free(autoping_ac);
|
||||
}
|
||||
|
||||
@ -2840,7 +2851,7 @@ cmd_reset_autocomplete(ProfWin *window)
|
||||
autocomplete_reset(tls_ac);
|
||||
autocomplete_reset(tls_certpath_ac);
|
||||
autocomplete_reset(console_ac);
|
||||
autocomplete_reset(console_muc_ac);
|
||||
autocomplete_reset(console_msg_ac);
|
||||
autocomplete_reset(autoping_ac);
|
||||
autocomplete_reset(script_ac);
|
||||
if (script_show_ac) {
|
||||
@ -4427,7 +4438,15 @@ _console_autocomplete(ProfWin *window, const char *const input)
|
||||
{
|
||||
char *result = NULL;
|
||||
|
||||
result = autocomplete_param_with_ac(input, "/console muc", console_muc_ac, TRUE);
|
||||
result = autocomplete_param_with_ac(input, "/console chat", console_msg_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = autocomplete_param_with_ac(input, "/console muc", console_msg_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
result = autocomplete_param_with_ac(input, "/console private", console_msg_ac, TRUE);
|
||||
if (result) {
|
||||
return result;
|
||||
}
|
||||
|
@ -4417,7 +4417,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) && (g_strcmp0(args[0], "private") != 0)) {
|
||||
cons_bad_cmd_usage(command);
|
||||
return TRUE;
|
||||
}
|
||||
@ -4428,8 +4428,23 @@ 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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -1170,6 +1170,8 @@ _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:
|
||||
case PREF_OUTTYPE:
|
||||
@ -1394,6 +1396,10 @@ _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:
|
||||
return NULL;
|
||||
}
|
||||
@ -1497,6 +1503,8 @@ _get_default_string(preference_t pref)
|
||||
case PREF_PGP_LOG:
|
||||
return "redact";
|
||||
case PREF_CONSOLE_MUC:
|
||||
case PREF_CONSOLE_PRIVATE:
|
||||
case PREF_CONSOLE_CHAT:
|
||||
return "all";
|
||||
default:
|
||||
return NULL;
|
||||
|
@ -133,6 +133,8 @@ typedef enum {
|
||||
PREF_TLS_SHOW,
|
||||
PREF_LASTACTIVITY,
|
||||
PREF_CONSOLE_MUC,
|
||||
PREF_CONSOLE_PRIVATE,
|
||||
PREF_CONSOLE_CHAT,
|
||||
} preference_t;
|
||||
|
||||
typedef struct prof_alias_t {
|
||||
|
@ -410,6 +410,8 @@ _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);
|
||||
_set_string_preference("roster.unread", PREF_ROSTER_UNREAD);
|
||||
|
@ -254,7 +254,7 @@ chatwin_incoming_msg(ProfChatWin *chatwin, const char *const resource, const cha
|
||||
// not currently viewing chat window with sender
|
||||
} else {
|
||||
status_bar_new(num);
|
||||
cons_show_incoming_message(display_name, num);
|
||||
cons_show_incoming_message(display_name, num, chatwin->unread);
|
||||
|
||||
if (prefs_get_boolean(PREF_FLASH)) {
|
||||
flash();
|
||||
|
266
src/ui/console.c
266
src/ui/console.c
@ -362,7 +362,7 @@ cons_show_incoming_room_message(const char *const nick, const char *const room,
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_incoming_message(const char *const short_from, const int win_index)
|
||||
cons_show_incoming_message(const char *const short_from, const int win_index, int unread)
|
||||
{
|
||||
ProfWin *console = wins_get_console();
|
||||
|
||||
@ -370,13 +370,21 @@ cons_show_incoming_message(const char *const short_from, const int win_index)
|
||||
if (ui_index == 10) {
|
||||
ui_index = 0;
|
||||
}
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
||||
|
||||
cons_alert();
|
||||
char *chat_show = prefs_get_string(PREF_CONSOLE_CHAT);
|
||||
if (g_strcmp0(chat_show, "all") == 0) {
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
||||
cons_alert();
|
||||
} else if ((g_strcmp0(chat_show, "first") == 0) && unread == 0) {
|
||||
win_vprint(console, '-', 0, NULL, 0, THEME_INCOMING, "", "<< chat message: %s (win %d)", short_from, ui_index);
|
||||
cons_alert();
|
||||
}
|
||||
|
||||
prefs_free_string(chat_show);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
@ -384,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
|
||||
@ -1056,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);
|
||||
}
|
||||
@ -1067,76 +1083,84 @@ 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");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_console_setting(void)
|
||||
{
|
||||
char *setting = prefs_get_string(PREF_CONSOLE_MUC);
|
||||
cons_show("Console MUC messages (/console) : %s", setting);
|
||||
prefs_free_string(setting);
|
||||
char *chatsetting = prefs_get_string(PREF_CONSOLE_CHAT);
|
||||
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);
|
||||
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");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1144,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
|
||||
@ -1201,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);
|
||||
}
|
||||
|
||||
@ -1257,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
|
||||
@ -1269,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);
|
||||
@ -1282,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");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1297,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
|
||||
@ -1668,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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -272,8 +272,8 @@ void cons_check_version(gboolean not_available_msg);
|
||||
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);
|
||||
void cons_show_incoming_private_message(const char *const nick, const char *const room, const int win_index);
|
||||
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, int unread);
|
||||
void cons_show_room_invites(GSList *invites);
|
||||
void cons_show_received_subs(void);
|
||||
void cons_show_sent_subs(void);
|
||||
|
@ -405,7 +405,7 @@ void cons_show_room_invite(const char * const invitor, const char * const room,
|
||||
void cons_check_version(gboolean not_available_msg) {}
|
||||
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) {}
|
||||
void cons_show_incoming_message(const char * const short_from, 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) {}
|
||||
|
@ -131,3 +131,5 @@ wins.autotidy=
|
||||
otr.char=
|
||||
pgp.char=
|
||||
console.muc=
|
||||
console.chat=
|
||||
console.private=
|
||||
|
@ -130,3 +130,5 @@ otr.char=@
|
||||
pgp.char=%
|
||||
tls.show=true
|
||||
console.muc=first
|
||||
console.chat=all
|
||||
console.private=all
|
||||
|
@ -126,3 +126,5 @@ otr.char=@
|
||||
pgp.char=%
|
||||
tls.show=true
|
||||
console.muc=first
|
||||
console.chat=all
|
||||
console.private=all
|
||||
|
@ -55,3 +55,5 @@ intype=true
|
||||
enc.warn=true
|
||||
tls.show=true
|
||||
console.muc=all
|
||||
console.chat=all
|
||||
console.private=all
|
||||
|
@ -42,3 +42,5 @@ enc.warn=false
|
||||
wins.autotidy=false
|
||||
tls.show=false
|
||||
console.muc=first
|
||||
console.chat=first
|
||||
console.private=first
|
||||
|
Loading…
Reference in New Issue
Block a user