1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-26 22:43:26 +01:00

bit of cleanup

This commit is contained in:
Jfreegman 2013-11-02 20:32:35 -04:00
parent 3907edcdda
commit 706aed533d
2 changed files with 3 additions and 9 deletions

View File

@ -128,7 +128,7 @@ void cmd_add(WINDOW *window, ToxWindow *prompt, Tox *m, int argc, char (*argv)[M
break; break;
case TOX_FAERR_ALREADYSENT: case TOX_FAERR_ALREADYSENT:
wprintw(window, "Friend request already sent.\n"); wprintw(window, "Friend request has already been sent.\n");
break; break;
case TOX_FAERR_UNKNOWN: case TOX_FAERR_UNKNOWN:
@ -144,7 +144,7 @@ void cmd_add(WINDOW *window, ToxWindow *prompt, Tox *m, int argc, char (*argv)[M
break; break;
default: default:
wprintw(window, "Friend added as %d.\n", num); wprintw(window, "Friend request sent.\n");
on_friendadded(m, num); on_friendadded(m, num);
break; break;
} }

View File

@ -133,12 +133,6 @@ static void select_friend(Tox *m, wint_t key)
} }
} }
} else return; /* Bad key input */ } else return; /* Bad key input */
/* If we reach this something is wrong */
endwin();
tox_kill(m);
fprintf(stderr, "select_friend() failed. Aborting...\n");
exit(EXIT_FAILURE);
} }
static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key) static void delete_friend(Tox *m, ToxWindow *self, int f_num, wint_t key)
@ -260,7 +254,7 @@ static void friendlist_onInit(ToxWindow *self, Tox *m)
} }
ToxWindow new_friendlist() ToxWindow new_friendlist(void)
{ {
ToxWindow ret; ToxWindow ret;
memset(&ret, 0, sizeof(ret)); memset(&ret, 0, sizeof(ret));