From fb8b223876d2397b167ba30f1e225ef364efe1b5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 2 Jul 2015 00:01:37 +0100 Subject: [PATCH] Removed subscribed check when displaying roster panel --- src/ui/rosterwin.c | 54 ++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/ui/rosterwin.c b/src/ui/rosterwin.c index 00bc28a4..db9a4af6 100644 --- a/src/ui/rosterwin.c +++ b/src/ui/rosterwin.c @@ -45,40 +45,38 @@ static void _rosterwin_contact(ProfLayoutSplit *layout, PContact contact) { - if (p_contact_subscribed(contact)) { - const char *name = p_contact_name_or_jid(contact); - const char *presence = p_contact_presence(contact); + const char *name = p_contact_name_or_jid(contact); + const char *presence = p_contact_presence(contact); - if ((g_strcmp0(presence, "offline") != 0) || ((g_strcmp0(presence, "offline") == 0) && - (prefs_get_boolean(PREF_ROSTER_OFFLINE)))) { - theme_item_t presence_colour = theme_main_presence_attrs(presence); + if ((g_strcmp0(presence, "offline") != 0) || ((g_strcmp0(presence, "offline") == 0) && + (prefs_get_boolean(PREF_ROSTER_OFFLINE)))) { + theme_item_t presence_colour = theme_main_presence_attrs(presence); - wattron(layout->subwin, theme_attrs(presence_colour)); - GString *msg = g_string_new(" "); - g_string_append(msg, name); - win_printline_nowrap(layout->subwin, msg->str); - g_string_free(msg, TRUE); - wattroff(layout->subwin, theme_attrs(presence_colour)); + wattron(layout->subwin, theme_attrs(presence_colour)); + GString *msg = g_string_new(" "); + g_string_append(msg, name); + win_printline_nowrap(layout->subwin, msg->str); + g_string_free(msg, TRUE); + wattroff(layout->subwin, theme_attrs(presence_colour)); - if (prefs_get_boolean(PREF_ROSTER_RESOURCE)) { - GList *resources = p_contact_get_available_resources(contact); - GList *curr_resource = resources; - while (curr_resource) { - Resource *resource = curr_resource->data; - const char *resource_presence = string_from_resource_presence(resource->presence); - theme_item_t resource_presence_colour = theme_main_presence_attrs(resource_presence); + if (prefs_get_boolean(PREF_ROSTER_RESOURCE)) { + GList *resources = p_contact_get_available_resources(contact); + GList *curr_resource = resources; + while (curr_resource) { + Resource *resource = curr_resource->data; + const char *resource_presence = string_from_resource_presence(resource->presence); + theme_item_t resource_presence_colour = theme_main_presence_attrs(resource_presence); - wattron(layout->subwin, theme_attrs(resource_presence_colour)); - GString *msg = g_string_new(" "); - g_string_append(msg, resource->name); - win_printline_nowrap(layout->subwin, msg->str); - g_string_free(msg, TRUE); - wattroff(layout->subwin, theme_attrs(resource_presence_colour)); + wattron(layout->subwin, theme_attrs(resource_presence_colour)); + GString *msg = g_string_new(" "); + g_string_append(msg, resource->name); + win_printline_nowrap(layout->subwin, msg->str); + g_string_free(msg, TRUE); + wattroff(layout->subwin, theme_attrs(resource_presence_colour)); - curr_resource = g_list_next(curr_resource); - } - g_list_free(resources); + curr_resource = g_list_next(curr_resource); } + g_list_free(resources); } } }