diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-09 16:19:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 16:19:45 +0200 |
commit | 343d970e3da319afe4109ad1c9d664ffe09dedfa (patch) | |
tree | 4bdebbc7cd297460d76603667b90a5993b7ad46b /src/ui/console.c | |
parent | d7adec69cefedce8949ead1309e9a8e56a8c4d8f (diff) | |
parent | 8ef35290bdde58c6a0e7231c1870152f946d78e0 (diff) | |
download | profani-tty-343d970e3da319afe4109ad1c9d664ffe09dedfa.tar.gz |
Merge pull request #1559 from profanity-im/feature/1558-bookmark
Add command to show single bookmark details
Diffstat (limited to 'src/ui/console.c')
-rw-r--r-- | src/ui/console.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ui/console.c b/src/ui/console.c index 74a7740f..4494bce0 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -745,6 +745,34 @@ cons_show_bookmarks(const GList* list) } void +cons_show_bookmark(Bookmark* item) +{ + cons_show(""); + if (!item) { + cons_show("No such bookmark"); + } else { + cons_show("Bookmark details:"); + cons_show("Room jid : %s", item->barejid); + if (item->name) { + cons_show("name : %s", item->name); + } + if (item->nick) { + cons_show("nick : %s", item->nick); + } + if (item->password) { + cons_show("password : %s", item->password); + } + if (item->autojoin) { + cons_show("autojoin : ON"); + } else { + cons_show("autojoin : OFF"); + } + } + + cons_alert(NULL); +} + +void cons_show_disco_info(const char* jid, GSList* identities, GSList* features) { if ((identities && (g_slist_length(identities) > 0)) || (features && (g_slist_length(features) > 0))) { |