diff --git a/src/server_events.c b/src/server_events.c index e6d44dbe..3bea8c02 100644 --- a/src/server_events.c +++ b/src/server_events.c @@ -312,7 +312,7 @@ handle_contact_offline(char *barejid, char *resource, char *status) } else if (g_strcmp0(show_console, "online") == 0) { cons_show_contact_offline(contact, resource, status); } - + // show in chat win if "all" if (g_strcmp0(show_chat_win, "all") == 0) { ui_chat_win_contact_offline(contact, resource, status); diff --git a/src/ui/console.c b/src/ui/console.c index 502ce342..e6ab7eab 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -907,9 +907,9 @@ _cons_theme_setting(void) { gchar *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); } } @@ -917,27 +917,27 @@ static 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"); } static 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"); } static 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"); } static void @@ -953,36 +953,44 @@ static 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"); } static void _cons_mouse_setting(void) { if (prefs_get_boolean(PREF_MOUSE)) - cons_show("Mouse handling (/mouse) : ON"); + cons_show("Mouse handling (/mouse) : ON"); else - cons_show("Mouse handling (/mouse) : OFF"); + cons_show("Mouse handling (/mouse) : OFF"); } static void _cons_statuses_setting(void) { - if (prefs_get_boolean(PREF_STATUSES)) - cons_show("Status (/statuses) : ON"); - else - cons_show("Status (/statuses) : OFF"); + char *console = prefs_get_string(PREF_STATUSES_CONSOLE); + char *chat = prefs_get_string(PREF_STATUSES_CHAT); + gboolean muc = prefs_get_boolean(PREF_STATUSES_MUC); + + cons_show("Console statuses (/statuses) : %s", console); + cons_show("Chat win statuses (/statuses) : %s", chat); + + if (muc) { + cons_show("MUC statuses (/statuses) : ON"); + } else { + cons_show("MUC statuses (/statuses) : OFF"); + } } static void _cons_titlebar_setting(void) { if (prefs_get_boolean(PREF_TITLEBARVERSION)) { - cons_show("Titlebar display (/titlebar) : version"); + cons_show("Titlebar display (/titlebar) : version"); } else { - cons_show("Titlebar display (/titlebar) : NONE"); + cons_show("Titlebar display (/titlebar) : NONE"); } } @@ -990,9 +998,9 @@ static void _cons_otrwarn_setting(void) { if (prefs_get_boolean(PREF_OTR_WARN)) { - cons_show("Warn non-OTR (/otr warn) : ON"); + cons_show("Warn non-OTR (/otr warn) : ON"); } else { - cons_show("Warn non-OTR (/otr warn) : OFF"); + cons_show("Warn non-OTR (/otr warn) : OFF"); } } diff --git a/tests/test_server_events.c b/tests/test_server_events.c index a3f6dc02..f800f4dc 100644 --- a/tests/test_server_events.c +++ b/tests/test_server_events.c @@ -20,7 +20,7 @@ void console_doesnt_show_online_presence_when_set_none(void **state) roster_init(); roster_add("test1@server", "bob", NULL, "both", FALSE); Resource *resource = resource_new("resource", RESOURCE_ONLINE, NULL, 10, "caps"); - + handle_contact_online("test1@server", resource, NULL); roster_clear(); @@ -37,9 +37,9 @@ void console_shows_online_presence_when_set_online(void **state) PContact contact = roster_get_contact("test1@server"); expect_cons_show_contact_online(contact, resource, NULL); - + handle_contact_online("test1@server", resource, NULL); - + roster_clear(); } @@ -54,9 +54,9 @@ void console_shows_online_presence_when_set_all(void **state) PContact contact = roster_get_contact("test1@server"); expect_cons_show_contact_online(contact, resource, NULL); - + handle_contact_online("test1@server", resource, NULL); - + roster_clear(); } @@ -68,7 +68,7 @@ void console_doesnt_show_dnd_presence_when_set_none(void **state) roster_init(); roster_add("test1@server", "bob", NULL, "both", FALSE); Resource *resource = resource_new("resource", RESOURCE_DND, NULL, 10, "caps"); - + handle_contact_online("test1@server", resource, NULL); roster_clear(); @@ -82,7 +82,7 @@ void console_doesnt_show_dnd_presence_when_set_online(void **state) roster_init(); roster_add("test1@server", "bob", NULL, "both", FALSE); Resource *resource = resource_new("resource", RESOURCE_DND, NULL, 10, "caps"); - + handle_contact_online("test1@server", resource, NULL); roster_clear(); @@ -99,8 +99,8 @@ void console_shows_dnd_presence_when_set_all(void **state) PContact contact = roster_get_contact("test1@server"); expect_cons_show_contact_online(contact, resource, NULL); - + handle_contact_online("test1@server", resource, NULL); - + roster_clear(); } diff --git a/tests/testsuite.c b/tests/testsuite.c index 8291574d..3a61e9f5 100644 --- a/tests/testsuite.c +++ b/tests/testsuite.c @@ -414,7 +414,7 @@ int main(int argc, char* argv[]) { PROF_RUN_TESTS(cmd_statuses_tests); PROF_RUN_TESTS(preferences_tests); PROF_RUN_TESTS(server_events_tests); - + fflush(stdout); dup2(bak, 1); close(bak);