1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-07-01 16:27:45 +02:00

formatting

This commit is contained in:
Jfreegman 2013-11-12 01:50:04 -05:00
parent 649233b718
commit 704b787ec2
5 changed files with 30 additions and 37 deletions

View File

@ -182,7 +182,7 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int num, uint8_t receive
else
filename = file_senders[filenum].pathname;
switch(control_type) {
switch (control_type) {
case TOX_FILECONTROL_ACCEPT:
wprintw(ctx->history, "File transfer for '%s' accepted.\n", filename);
break;
@ -384,7 +384,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
TOX_USERSTATUS status = statusbar->status;
switch(status) {
switch (status) {
case TOX_USERSTATUS_NONE:
status_text = "Online";
colour = GREEN;

View File

@ -106,7 +106,7 @@ void execute(WINDOW *w, ToxWindow *prompt, Tox *m, char *cmd, int mode)
/* Try to match input command to command functions. If non-global command mode is specified,
try specified mode's commands first, then upon failure try global commands. */
switch(mode) {
switch (mode) {
case CHAT_COMMAND_MODE:
if (do_command(w, prompt, m, num_args, CHAT_NUM_COMMANDS, chat_commands, args) == 0)
return;

View File

@ -232,7 +232,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
TOX_USERSTATUS status = friends[f].status;
int colour = WHITE;
switch(status) {
switch (status) {
case TOX_USERSTATUS_NONE:
colour = GREEN;
break;

View File

@ -112,38 +112,31 @@ void cmd_add(WINDOW *window, ToxWindow *prompt, Tox *m, int argc, char (*argv)[M
int num = tox_addfriend(m, id_bin, msg, strlen(msg) + 1);
switch (num) {
case TOX_FAERR_TOOLONG:
wprintw(window, "Message is too long.\n");
break;
case TOX_FAERR_NOMESSAGE:
wprintw(window, "Please add a message to your request.\n");
break;
case TOX_FAERR_OWNKEY:
wprintw(window, "That appears to be your own ID.\n");
break;
case TOX_FAERR_ALREADYSENT:
wprintw(window, "Friend request has already been sent.\n");
break;
case TOX_FAERR_UNKNOWN:
wprintw(window, "Undefined error when adding friend.\n");
break;
case TOX_FAERR_BADCHECKSUM:
wprintw(window, "Bad checksum in address.\n");
break;
case TOX_FAERR_SETNEWNOSPAM:
wprintw(window, "Nospam was different.\n");
break;
default:
wprintw(window, "Friend request sent.\n");
on_friendadded(m, num);
break;
case TOX_FAERR_TOOLONG:
wprintw(window, "Message is too long.\n");
break;
case TOX_FAERR_NOMESSAGE:
wprintw(window, "Please add a message to your request.\n");
break;
case TOX_FAERR_OWNKEY:
wprintw(window, "That appears to be your own ID.\n");
break;
case TOX_FAERR_ALREADYSENT:
wprintw(window, "Friend request has already been sent.\n");
break;
case TOX_FAERR_UNKNOWN:
wprintw(window, "Undefined error when adding friend.\n");
break;
case TOX_FAERR_BADCHECKSUM:
wprintw(window, "Bad checksum in address.\n");
break;
case TOX_FAERR_SETNEWNOSPAM:
wprintw(window, "Nospam was different.\n");
break;
default:
wprintw(window, "Friend request sent.\n");
on_friendadded(m, num);
break;
}
}

View File

@ -166,7 +166,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
int colour = WHITE;
char *status_text = "Unknown";
switch(statusbar->status) {
switch (statusbar->status) {
case TOX_USERSTATUS_NONE:
status_text = "Online";
colour = GREEN;