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:
parent
b9dedbdc15
commit
d6c2bd0c6a
@ -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
|
static void
|
||||||
_cons_splash_logo(void)
|
_cons_splash_logo(void)
|
||||||
{
|
{
|
||||||
|
@ -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
|
void
|
||||||
cons_show_disco_info(const char *jid, GSList *identities, GSList *features)
|
cons_show_disco_info(const char *jid, GSList *identities, GSList *features)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user