diff options
author | Jfreegman <Jfreegman@gmail.com> | 2013-08-05 16:04:06 -0400 |
---|---|---|
committer | Jfreegman <Jfreegman@gmail.com> | 2013-08-05 16:04:06 -0400 |
commit | 4b76983a692e0234b220b1c8fee87edb12673be2 (patch) | |
tree | fd517f2baa641179c534a745e23c8576f2bc57b5 /testing/toxic/chat.c | |
parent | a91aee0a9f4945ee3124e9e03f535e8ab4a40ce3 (diff) |
chat window deleting and re-adding - it just werks
Diffstat (limited to 'testing/toxic/chat.c')
-rw-r--r-- | testing/toxic/chat.c | 6 |
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 | ||
28 | extern int w_active; | ||
28 | extern void del_window(ToxWindow *w, int f_num); | 29 | extern void del_window(ToxWindow *w, int f_num); |
29 | extern int focus_window(int num); | ||
30 | extern void fix_name(uint8_t* name); | 30 | extern void fix_name(uint8_t* name); |
31 | void print_help(ChatContext* self); | 31 | void print_help(ChatContext* self); |
32 | void execute(ToxWindow* self, ChatContext* ctx, char* cmd); | 32 | void 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 | ||