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

change tab names: prompt = home, friends = contacts

This commit is contained in:
Jfreegman 2014-07-13 15:34:09 -04:00
parent ee67cf0bf1
commit 190e1e73e8
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
5 changed files with 12 additions and 11 deletions

View File

@ -692,8 +692,10 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
} else {
wmove(self->window, y, x + diff);
}
} else beep();
} else beep();
} else
beep();
} else
beep();
} else if (key == '\n') {
rm_trailing_spaces_buf(ctx);
@ -726,8 +728,7 @@ static void chat_onKey(ToxWindow *self, Tox *m, wint_t key, bool ltr)
line_info_add(self, timefrmt, selfname, NULL, line, OUT_MSG, 0, 0);
if (!statusbar->is_online || tox_send_message(m, self->num, (uint8_t *) line, strlen(line)) == 0) {
char *errmsg = " * Failed to send message.";
line_info_add(self, NULL, NULL, NULL, errmsg, SYS_MSG, 0, RED);
line_info_add(self, NULL, NULL, NULL, " * Failed to send message.", SYS_MSG, 0, RED);
} else {
write_to_log(line, selfname, ctx->log, false);
}

View File

@ -57,13 +57,13 @@ void cmd_groupinvite(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*a
}
if (tox_invite_friend(m, self->num, groupnum) == -1) {
errmsg = "Failed to invite friend.";
errmsg = "Failed to invite contact to group.";
line_info_add(self, NULL, NULL, NULL, errmsg, SYS_MSG, 0, 0);
return;
}
char msg[MAX_STR_SIZE];
snprintf(msg, sizeof(msg), "Invited friend to Room #%d.", groupnum);
snprintf(msg, sizeof(msg), "Invited contact to Group %d.", groupnum);
line_info_add(self, NULL, NULL, NULL, msg, SYS_MSG, 0, 0);
}

View File

@ -377,7 +377,7 @@ static void friendlist_onDraw(ToxWindow *self, Tox *m)
wattron(self->window, A_BOLD);
wprintw(self->window, " Enter ");
wattroff(self->window, A_BOLD);
wprintw(self->window, "key. Delete a friend with the");
wprintw(self->window, "key. Delete a contact with the");
wattron(self->window, A_BOLD);
wprintw(self->window, " Delete ");
wattroff(self->window, A_BOLD);
@ -614,6 +614,6 @@ ToxWindow new_friendlist(void)
ret.device_selection[0] = ret.device_selection[1] = -1;
#endif /* _SUPPORT_AUDIO */
strcpy(ret.name, "friends");
strcpy(ret.name, "contacts");
return ret;
}

View File

@ -131,7 +131,7 @@ static void help_draw_global(ToxWindow *self)
wprintw(win, "Global Commands:\n");
wattroff(win, A_BOLD | COLOR_PAIR(RED));
wprintw(win, " /add <id> <msg> : Add friend with optional message\n");
wprintw(win, " /add <id> <msg> : Add contact with optional message\n");
wprintw(win, " /accept <n> : Accept friend request\n");
wprintw(win, " /connect <ip> <port> <key> : Manually connect to a DHT node\n");
wprintw(win, " /status <type> <msg> : Set status with optional note\n");
@ -169,7 +169,7 @@ static void help_draw_chat(ToxWindow *self)
wprintw(win, "Chat Commands:\n");
wattroff(win, A_BOLD | COLOR_PAIR(RED));
wprintw(win, " /invite <n> : Invite friend to a group chat\n");
wprintw(win, " /invite <n> : Invite contact to a group chat\n");
wprintw(win, " /join : Join a pending group chat\n");
wprintw(win, " /sendfile <path> : Send a file\n");
wprintw(win, " /savefile <n> : Receive a file\n");

View File

@ -442,7 +442,7 @@ ToxWindow new_prompt(void)
ret.onConnectionChange = &prompt_onConnectionChange;
ret.onFriendRequest = &prompt_onFriendRequest;
strcpy(ret.name, "prompt");
strcpy(ret.name, "home");
ChatContext *chatwin = calloc(1, sizeof(ChatContext));
StatusBar *stb = calloc(1, sizeof(StatusBar));