From 4b76983a692e0234b220b1c8fee87edb12673be2 Mon Sep 17 00:00:00 2001 From: Jfreegman Date: Mon, 5 Aug 2013 16:04:06 -0400 Subject: chat window deleting and re-adding - it just werks --- testing/toxic/chat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testing/toxic/chat.c') 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 { } ChatContext; +extern int w_active; extern void del_window(ToxWindow *w, int f_num); -extern int focus_window(int num); extern void fix_name(uint8_t* name); void print_help(ChatContext* self); void execute(ToxWindow* self, ChatContext* ctx, char* cmd); @@ -188,7 +188,7 @@ void execute(ToxWindow* self, ChatContext* ctx, char* cmd) wprintw(ctx->history, "Your ID: %s\n", id); } else if (strcmp(ctx->line, "/close") == 0) { - focus_window(0); // Go to prompt screen + w_active = 0; // Go to prompt screen int f_num = ctx->friendnum; delwin(ctx->linewin); del_window(self, f_num); @@ -236,7 +236,7 @@ void print_help(ChatContext* self) { wprintw(self->history, " /nick : Set your nickname\n"); wprintw(self->history, " /myid : Print your ID\n"); wprintw(self->history, " /clear : Clear the screen\n"); - wprintw(self->history, " /close : Closes the current chat window\n"); + wprintw(self->history, " /close : Close the current chat window\n"); wprintw(self->history, " /quit or /exit : Exit program\n"); wprintw(self->history, " /help : Print this message again\n\n"); -- cgit v1.2.3