aboutsummaryrefslogtreecommitdiff
path: root/src/application.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/application.c')
-rw-r--r--src/application.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/application.c b/src/application.c
index f3b99c5..65bdd81 100644
--- a/src/application.c
+++ b/src/application.c
@@ -25,6 +25,15 @@
25#include "application.h" 25#include "application.h"
26 26
27void 27void
28application_clear(MESSENGER_Application *app)
29{
30 app->accounts.window = NULL;
31 app->chats.window = NULL;
32 app->current.members.window = NULL;
33 app->current.messages.window = NULL;
34}
35
36void
28application_init(MESSENGER_Application *app, 37application_init(MESSENGER_Application *app,
29 int argc, 38 int argc,
30 char **argv) 39 char **argv)
@@ -45,7 +54,7 @@ application_init(MESSENGER_Application *app,
45 noecho(); 54 noecho();
46 55
47 keypad(app->window, TRUE); 56 keypad(app->window, TRUE);
48 timeout(10); 57 wtimeout(app->window, 10);
49} 58}
50 59
51static void 60static void
@@ -82,10 +91,16 @@ application_run(MESSENGER_Application *app)
82 members_clear(&(app->current.members)); 91 members_clear(&(app->current.members));
83 messages_clear(&(app->current.messages)); 92 messages_clear(&(app->current.messages));
84 93
94 application_clear(app);
95
85 if (app->window) 96 if (app->window)
86 delwin(app->window); 97 delwin(app->window);
87 98
88 endwin(); 99 if (ERR == endwin())
100 {
101 app->status = GNUNET_SYSERR;
102 return;
103 }
89} 104}
90 105
91int 106int