diff options
author | James Booth <boothj5@gmail.com> | 2015-07-02 00:01:37 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2015-07-02 00:01:37 +0100 |
commit | fb8b223876d2397b167ba30f1e225ef364efe1b5 (patch) | |
tree | 2745e860f88aa959c8424dddc681431303c35b5d | |
parent | 10eb0bbbf8b96432305239fe691eab8949423dbb (diff) | |
download | profani-tty-fb8b223876d2397b167ba30f1e225ef364efe1b5.tar.gz |
Removed subscribed check when displaying roster panel
-rw-r--r-- | src/ui/rosterwin.c | 64 |
1 files changed, 31 insertions, 33 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); - - 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)); - - 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)); - - curr_resource = g_list_next(curr_resource); - } - g_list_free(resources); + 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); + + 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); + + 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); } } } |