draft of bookmarks implementation

'/bookmark add' and '/bookmark remove' ain't finished
This commit is contained in:
Dmitry Podgorny
2013-07-14 23:58:02 +03:00
parent 6e23584575
commit b9d29e9aa5
5 changed files with 292 additions and 34 deletions

View File

@@ -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)
{