diff options
Diffstat (limited to 'src/chat.c')
-rw-r--r-- | src/chat.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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 | |||
30 | UI_ACCOUNTS_Handle accounts; | ||
28 | 31 | ||
29 | int lc = 0; | 32 | int 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 | ||
48 | static void | 51 | static 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 | ||
54 | static int | 60 | static 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 | |||
67 | refresh: | 75 | refresh: |
68 | _chat_refresh(app); | 76 | _chat_refresh(app); |
69 | return 0; | 77 | return 0; |