draft of bookmarks implementation
'/bookmark add' and '/bookmark remove' ain't finished
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "ui/window.h"
|
||||
#include "ui/ui.h"
|
||||
#include "xmpp/xmpp.h"
|
||||
#include "xmpp/bookmark.h"
|
||||
|
||||
#define CONS_WIN_TITLE "_cons"
|
||||
|
||||
@@ -643,6 +644,34 @@ cons_show_room_list(GSList *rooms, const char * const conference_node)
|
||||
cons_alert();
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_bookmarks(const GList *list)
|
||||
{
|
||||
Bookmark *item;
|
||||
|
||||
cons_show("");
|
||||
cons_show("Bookmarks:");
|
||||
|
||||
/* TODO: show status (connected or not) and window number */
|
||||
while (list != NULL) {
|
||||
item = list->data;
|
||||
|
||||
win_print_time(console, '-');
|
||||
wprintw(console->win, " %s", item->jid);
|
||||
if (item->nick != NULL) {
|
||||
wprintw(console->win, "/%s", item->nick);
|
||||
}
|
||||
if (item->autojoin) {
|
||||
wprintw(console->win, " (autojoin)");
|
||||
}
|
||||
wprintw(console->win, "\n");
|
||||
list = g_list_next(list);
|
||||
}
|
||||
|
||||
ui_console_dirty();
|
||||
cons_alert();
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_disco_info(const char *jid, GSList *identities, GSList *features)
|
||||
{
|
||||
|
||||
@@ -184,6 +184,7 @@ void cons_show_software_version(const char * const jid,
|
||||
const char * const version, const char * const os);
|
||||
void cons_show_account_list(gchar **accounts);
|
||||
void cons_show_room_list(GSList *room, const char * const conference_node);
|
||||
void cons_show_bookmarks(const GList *list);
|
||||
void cons_show_disco_items(GSList *items, const char * const jid);
|
||||
void cons_show_disco_info(const char *from, GSList *identities, GSList *features);
|
||||
void cons_show_room_invite(const char * const invitor, const char * const room,
|
||||
|
||||
Reference in New Issue
Block a user