aboutsummaryrefslogtreecommitdiff
path: root/src/ui/accounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/accounts.c')
-rw-r--r--src/ui/accounts.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ui/accounts.c b/src/ui/accounts.c
index ef44d13..e933d5d 100644
--- a/src/ui/accounts.c
+++ b/src/ui/accounts.c
@@ -23,9 +23,9 @@
23 */ 23 */
24 24
25#include "accounts.h" 25#include "accounts.h"
26#include "../application.h"
27 26
28#include <stdbool.h> 27#include "../application.h"
28#include "../util.h"
29 29
30int 30int
31_accounts_iterate(void *cls, 31_accounts_iterate(void *cls,
@@ -46,7 +46,7 @@ _accounts_iterate(void *cls,
46 46
47void 47void
48accounts_event(UI_ACCOUNTS_Handle *accounts, 48accounts_event(UI_ACCOUNTS_Handle *accounts,
49 struct MESSENGER_Application *app, 49 MESSENGER_Application *app,
50 int key) 50 int key)
51{ 51{
52 accounts->line_index = 0; 52 accounts->line_index = 0;
@@ -60,6 +60,12 @@ accounts_event(UI_ACCOUNTS_Handle *accounts,
60 60
61 switch (key) 61 switch (key)
62 { 62 {
63 case 27:
64 case KEY_EXIT:
65 {
66 app->chat.quit = GNUNET_YES;
67 break;
68 }
63 case KEY_UP: 69 case KEY_UP:
64 { 70 {
65 accounts->line_selected--; 71 accounts->line_selected--;
@@ -140,12 +146,13 @@ _accounts_iterate_print(void *cls,
140 146
141void 147void
142accounts_print(UI_ACCOUNTS_Handle *accounts, 148accounts_print(UI_ACCOUNTS_Handle *accounts,
143 struct MESSENGER_Application *app) 149 MESSENGER_Application *app)
144{ 150{
145 if (!(accounts->window)) 151 if (!(accounts->window))
146 return; 152 return;
147 153
148 accounts->line_index = 0; 154 accounts->line_index = 0;
155 werase(accounts->window);
149 156
150 GNUNET_CHAT_iterate_accounts( 157 GNUNET_CHAT_iterate_accounts(
151 app->chat.handle, 158 app->chat.handle,