1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Moved cons_show_room_list() to console module

This commit is contained in:
James Booth 2013-04-21 00:54:23 +01:00
parent b9dedbdc15
commit d6c2bd0c6a
2 changed files with 25 additions and 20 deletions

View File

@ -488,6 +488,31 @@ cons_show_software_version(const char * const jid, const char * const presence,
}
}
void
cons_show_room_list(GSList *rooms, const char * const conference_node)
{
if ((rooms != NULL) && (g_slist_length(rooms) > 0)) {
cons_show("Chat rooms at %s:", conference_node);
while (rooms != NULL) {
DiscoItem *room = rooms->data;
window_show_time(console, '-');
wprintw(console->win, " %s", room->jid);
if (room->name != NULL) {
wprintw(console->win, ", (%s)", room->name);
}
wprintw(console->win, "\n");
rooms = g_slist_next(rooms);
}
} else {
cons_show("No chat rooms at %s", conference_node);
}
dirty = TRUE;
if (!win_current_is_console()) {
status_bar_new(0);
}
}
static void
_cons_splash_logo(void)
{

View File

@ -1106,26 +1106,6 @@ win_show_room_broadcast(const char * const room_jid, const char * const message)
}
}
void
cons_show_room_list(GSList *rooms, const char * const conference_node)
{
if ((rooms != NULL) && (g_slist_length(rooms) > 0)) {
cons_show("Chat rooms at %s:", conference_node);
while (rooms != NULL) {
DiscoItem *room = rooms->data;
window_show_time(console, '-');
wprintw(console->win, " %s", room->jid);
if (room->name != NULL) {
wprintw(console->win, ", (%s)", room->name);
}
wprintw(console->win, "\n");
rooms = g_slist_next(rooms);
}
} else {
cons_show("No chat rooms at %s", conference_node);
}
}
void
cons_show_disco_info(const char *jid, GSList *identities, GSList *features)
{