mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Removed subscribed check when displaying roster panel
This commit is contained in:
parent
10eb0bbbf8
commit
fb8b223876
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user