mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Added statuses settings to prefs output
This commit is contained in:
parent
a8c356e191
commit
0e2fbeb350
@ -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);
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user