aboutsummaryrefslogtreecommitdiff
path: root/src/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/chat.c')
-rw-r--r--src/chat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/chat.c b/src/chat.c
index 1b4bd48..c4b67b2 100644
--- a/src/chat.c
+++ b/src/chat.c
@@ -25,6 +25,9 @@
25#include "chat.h" 25#include "chat.h"
26 26
27#include "application.h" 27#include "application.h"
28#include "ui/accounts.h"
29
30UI_ACCOUNTS_Handle accounts;
28 31
29int lc = 0; 32int lc = 0;
30 33
@@ -33,7 +36,7 @@ _chat_message(UNUSED void *cls,
33 UNUSED struct GNUNET_CHAT_Context *context, 36 UNUSED struct GNUNET_CHAT_Context *context,
34 UNUSED const struct GNUNET_CHAT_Message *message) 37 UNUSED const struct GNUNET_CHAT_Message *message)
35{ 38{
36 //MESSENGER_Application *app = cls; 39 // MESSENGER_Application *app = cls;
37 40
38 enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind( 41 enum GNUNET_CHAT_MessageKind kind = GNUNET_CHAT_message_get_kind(
39 message 42 message
@@ -46,9 +49,12 @@ _chat_message(UNUSED void *cls,
46} 49}
47 50
48static void 51static void
49_chat_refresh(UNUSED MESSENGER_Application *app) 52_chat_refresh(MESSENGER_Application *app)
50{ 53{
51 // TODO 54 // TODO
55
56 accounts.window = stdscr;
57 accounts_print(&accounts, app);
52} 58}
53 59
54static int 60static int
@@ -64,6 +70,8 @@ _chat_event(MESSENGER_Application *app,
64 move(lc++, 0); 70 move(lc++, 0);
65 printw("KEY %d", key); 71 printw("KEY %d", key);
66 72
73 accounts_event(&accounts, app, key);
74
67refresh: 75refresh:
68 _chat_refresh(app); 76 _chat_refresh(app);
69 return 0; 77 return 0;