summaryrefslogtreecommitdiff
path: root/testing/toxic/chat.c
diff options
context:
space:
mode:
authorJfreegman <Jfreegman@gmail.com>2013-08-05 16:04:06 -0400
committerJfreegman <Jfreegman@gmail.com>2013-08-05 16:04:06 -0400
commit4b76983a692e0234b220b1c8fee87edb12673be2 (patch)
treefd517f2baa641179c534a745e23c8576f2bc57b5 /testing/toxic/chat.c
parenta91aee0a9f4945ee3124e9e03f535e8ab4a40ce3 (diff)
chat window deleting and re-adding - it just werks
Diffstat (limited to 'testing/toxic/chat.c')
-rw-r--r--testing/toxic/chat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c
index 2c1f1072..5d0e14ad 100644
--- a/testing/toxic/chat.c
+++ b/testing/toxic/chat.c
@@ -25,8 +25,8 @@ typedef struct {
25 25
26} ChatContext; 26} ChatContext;
27 27
28extern int w_active;
28extern void del_window(ToxWindow *w, int f_num); 29extern void del_window(ToxWindow *w, int f_num);
29extern int focus_window(int num);
30extern void fix_name(uint8_t* name); 30extern void fix_name(uint8_t* name);
31void print_help(ChatContext* self); 31void print_help(ChatContext* self);
32void execute(ToxWindow* self, ChatContext* ctx, char* cmd); 32void execute(ToxWindow* self, ChatContext* ctx, char* cmd);
@@ -188,7 +188,7 @@ void execute(ToxWindow* self, ChatContext* ctx, char* cmd)
188 wprintw(ctx->history, "Your ID: %s\n", id); 188 wprintw(ctx->history, "Your ID: %s\n", id);
189 } 189 }
190 else if (strcmp(ctx->line, "/close") == 0) { 190 else if (strcmp(ctx->line, "/close") == 0) {
191 focus_window(0); // Go to prompt screen 191 w_active = 0; // Go to prompt screen
192 int f_num = ctx->friendnum; 192 int f_num = ctx->friendnum;
193 delwin(ctx->linewin); 193 delwin(ctx->linewin);
194 del_window(self, f_num); 194 del_window(self, f_num);
@@ -236,7 +236,7 @@ void print_help(ChatContext* self) {
236 wprintw(self->history, " /nick <nickname> : Set your nickname\n"); 236 wprintw(self->history, " /nick <nickname> : Set your nickname\n");
237 wprintw(self->history, " /myid : Print your ID\n"); 237 wprintw(self->history, " /myid : Print your ID\n");
238 wprintw(self->history, " /clear : Clear the screen\n"); 238 wprintw(self->history, " /clear : Clear the screen\n");
239 wprintw(self->history, " /close : Closes the current chat window\n"); 239 wprintw(self->history, " /close : Close the current chat window\n");
240 wprintw(self->history, " /quit or /exit : Exit program\n"); 240 wprintw(self->history, " /quit or /exit : Exit program\n");
241 wprintw(self->history, " /help : Print this message again\n\n"); 241 wprintw(self->history, " /help : Print this message again\n\n");
242 242