mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 21:13:02 +01:00
formatting
This commit is contained in:
parent
649233b718
commit
704b787ec2
@ -182,7 +182,7 @@ static void chat_onFileControl(ToxWindow *self, Tox *m, int num, uint8_t receive
|
|||||||
else
|
else
|
||||||
filename = file_senders[filenum].pathname;
|
filename = file_senders[filenum].pathname;
|
||||||
|
|
||||||
switch(control_type) {
|
switch (control_type) {
|
||||||
case TOX_FILECONTROL_ACCEPT:
|
case TOX_FILECONTROL_ACCEPT:
|
||||||
wprintw(ctx->history, "File transfer for '%s' accepted.\n", filename);
|
wprintw(ctx->history, "File transfer for '%s' accepted.\n", filename);
|
||||||
break;
|
break;
|
||||||
@ -384,7 +384,7 @@ static void chat_onDraw(ToxWindow *self, Tox *m)
|
|||||||
|
|
||||||
TOX_USERSTATUS status = statusbar->status;
|
TOX_USERSTATUS status = statusbar->status;
|
||||||
|
|
||||||
switch(status) {
|
switch (status) {
|
||||||
case TOX_USERSTATUS_NONE:
|
case TOX_USERSTATUS_NONE:
|
||||||
status_text = "Online";
|
status_text = "Online";
|
||||||
colour = GREEN;
|
colour = GREEN;
|
||||||
|
@ -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 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. */
|
try specified mode's commands first, then upon failure try global commands. */
|
||||||
switch(mode) {
|
switch (mode) {
|
||||||
case CHAT_COMMAND_MODE:
|
case CHAT_COMMAND_MODE:
|
||||||
if (do_command(w, prompt, m, num_args, CHAT_NUM_COMMANDS, chat_commands, args) == 0)
|
if (do_command(w, prompt, m, num_args, CHAT_NUM_COMMANDS, chat_commands, args) == 0)
|
||||||
return;
|
return;
|
||||||
|
@ -232,7 +232,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
|
|||||||
TOX_USERSTATUS status = friends[f].status;
|
TOX_USERSTATUS status = friends[f].status;
|
||||||
int colour = WHITE;
|
int colour = WHITE;
|
||||||
|
|
||||||
switch(status) {
|
switch (status) {
|
||||||
case TOX_USERSTATUS_NONE:
|
case TOX_USERSTATUS_NONE:
|
||||||
colour = GREEN;
|
colour = GREEN;
|
||||||
break;
|
break;
|
||||||
|
@ -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);
|
int num = tox_addfriend(m, id_bin, msg, strlen(msg) + 1);
|
||||||
|
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case TOX_FAERR_TOOLONG:
|
case TOX_FAERR_TOOLONG:
|
||||||
wprintw(window, "Message is too long.\n");
|
wprintw(window, "Message is too long.\n");
|
||||||
break;
|
break;
|
||||||
|
case TOX_FAERR_NOMESSAGE:
|
||||||
case TOX_FAERR_NOMESSAGE:
|
wprintw(window, "Please add a message to your request.\n");
|
||||||
wprintw(window, "Please add a message to your request.\n");
|
break;
|
||||||
break;
|
case TOX_FAERR_OWNKEY:
|
||||||
|
wprintw(window, "That appears to be your own ID.\n");
|
||||||
case TOX_FAERR_OWNKEY:
|
break;
|
||||||
wprintw(window, "That appears to be your own ID.\n");
|
case TOX_FAERR_ALREADYSENT:
|
||||||
break;
|
wprintw(window, "Friend request has already been sent.\n");
|
||||||
|
break;
|
||||||
case TOX_FAERR_ALREADYSENT:
|
case TOX_FAERR_UNKNOWN:
|
||||||
wprintw(window, "Friend request has already been sent.\n");
|
wprintw(window, "Undefined error when adding friend.\n");
|
||||||
break;
|
break;
|
||||||
|
case TOX_FAERR_BADCHECKSUM:
|
||||||
case TOX_FAERR_UNKNOWN:
|
wprintw(window, "Bad checksum in address.\n");
|
||||||
wprintw(window, "Undefined error when adding friend.\n");
|
break;
|
||||||
break;
|
case TOX_FAERR_SETNEWNOSPAM:
|
||||||
|
wprintw(window, "Nospam was different.\n");
|
||||||
case TOX_FAERR_BADCHECKSUM:
|
break;
|
||||||
wprintw(window, "Bad checksum in address.\n");
|
default:
|
||||||
break;
|
wprintw(window, "Friend request sent.\n");
|
||||||
|
on_friendadded(m, num);
|
||||||
case TOX_FAERR_SETNEWNOSPAM:
|
break;
|
||||||
wprintw(window, "Nospam was different.\n");
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
wprintw(window, "Friend request sent.\n");
|
|
||||||
on_friendadded(m, num);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
|||||||
int colour = WHITE;
|
int colour = WHITE;
|
||||||
char *status_text = "Unknown";
|
char *status_text = "Unknown";
|
||||||
|
|
||||||
switch(statusbar->status) {
|
switch (statusbar->status) {
|
||||||
case TOX_USERSTATUS_NONE:
|
case TOX_USERSTATUS_NONE:
|
||||||
status_text = "Online";
|
status_text = "Online";
|
||||||
colour = GREEN;
|
colour = GREEN;
|
||||||
|
Loading…
Reference in New Issue
Block a user