1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-12-23 20:13:24 +01:00

colour theme changes

This commit is contained in:
Jfreegman 2013-12-03 18:01:17 -05:00
parent 03ef257fdc
commit 88ebb06ba5
6 changed files with 22 additions and 28 deletions

View File

@ -33,9 +33,9 @@ static void chat_onMessage(ToxWindow *self, Tox *m, int num, uint8_t *msg, uint1
nick[TOXIC_MAX_NAME_LENGTH] = '\0';
print_time(ctx->history);
wattron(ctx->history, COLOR_PAIR(4));
wattron(ctx->history, COLOR_PAIR(CYAN));
wprintw(ctx->history, "%s: ", nick);
wattroff(ctx->history, COLOR_PAIR(4));
wattroff(ctx->history, COLOR_PAIR(CYAN));
if (msg[0] == '>') {
wattron(ctx->history, COLOR_PAIR(GREEN));

View File

@ -24,7 +24,7 @@ void cmd_chat_help(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
{
wattron(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, "Chat commands:\n");
wattroff(window, A_BOLD);
wattroff(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, " /status <type> <msg> : Set your status with optional note\n");
wprintw(window, " /note <msg> : Set a personal note\n");
@ -40,11 +40,9 @@ void cmd_chat_help(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*arg
wprintw(window, " /quit or /exit : Exit Toxic\n");
wprintw(window, " /help : Print this message again\n");
wattron(window, A_BOLD);
wprintw(window, "\n * Argument messages must be enclosed in quotation marks.\n");
wattroff(window, A_BOLD);
wattroff(window, COLOR_PAIR(CYAN));
wattron(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, " * Argument messages must be enclosed in quotation marks.\n\n");
wattroff(window, COLOR_PAIR(CYAN) | A_BOLD);
}
void cmd_groupinvite(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])

View File

@ -278,7 +278,7 @@ void cmd_prompt_help(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*a
wclear(window);
wattron(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, "\n\nGlobal commands:\n");
wattroff(window, A_BOLD);
wattroff(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, " /add <id> <msg> : Add friend with optional message\n");
wprintw(window, " /accept <n> : Accept friend request\n");
@ -292,12 +292,10 @@ void cmd_prompt_help(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*a
wprintw(window, " /help : Print this message again\n");
wprintw(window, " /clear : Clear the window\n");
wattron(window, A_BOLD);
wattron(window, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(window, " * Argument messages must be enclosed in quotation marks.\n");
wprintw(window, " * Use TAB and Shift-TAB to navigate through the tabs.\n");
wattroff(window, A_BOLD);
wattroff(window, COLOR_PAIR(CYAN));
wprintw(window, " * Use TAB and Shift-TAB to navigate through the tabs.\n\n");
wattroff(window, COLOR_PAIR(CYAN) | A_BOLD);
}
void cmd_quit(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MAX_STR_SIZE])

View File

@ -70,11 +70,11 @@ static void print_groupchat_help(ChatContext *ctx)
{
wattron(ctx->history, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(ctx->history, "Group chat commands:\n");
wattroff(ctx->history, A_BOLD);
wattroff(ctx->history, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(ctx->history, " /add <id> <msg> : Add friend with optional message\n");
wprintw(ctx->history, " /status <type> <msg>: Set your status with optional note\n");
wprintw(ctx->history, " /note <msg> : Set a personal note\n");
wprintw(ctx->history, " /note <msg> : Set a personal note\n");
wprintw(ctx->history, " /nick <nick> : Set your nickname\n");
wprintw(ctx->history, " /groupchat : Create a group chat\n");
wprintw(ctx->history, " /myid : Print your ID\n");
@ -83,12 +83,10 @@ static void print_groupchat_help(ChatContext *ctx)
wprintw(ctx->history, " /quit or /exit : Exit Toxic\n");
wprintw(ctx->history, " /help : Print this message again\n");
wattron(ctx->history, A_BOLD);
wprintw(ctx->history, "\n * Argument messages must be enclosed in quotation marks.\n");
wprintw(ctx->history, " * Scroll peer list with the Page Up/Page Down keys.\n");
wattroff(ctx->history, A_BOLD);
wattroff(ctx->history, COLOR_PAIR(CYAN));
wattron(ctx->history, COLOR_PAIR(CYAN) | A_BOLD);
wprintw(ctx->history, " * Argument messages must be enclosed in quotation marks.\n");
wprintw(ctx->history, " * Scroll peer list with the Page Up/Page Down keys.\n\n");
wattroff(ctx->history, COLOR_PAIR(CYAN) | A_BOLD);
}
static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int peernum,
@ -104,9 +102,9 @@ static void groupchat_onGroupMessage(ToxWindow *self, Tox *m, int groupnum, int
nick[TOXIC_MAX_NAME_LENGTH] = '\0'; /* enforce client max name length */
print_time(ctx->history);
wattron(ctx->history, COLOR_PAIR(BLUE));
wattron(ctx->history, COLOR_PAIR(CYAN));
wprintw(ctx->history, "%s: ", nick);
wattroff(ctx->history, COLOR_PAIR(BLUE));
wattroff(ctx->history, COLOR_PAIR(CYAN));
if (msg[0] == '>') {
wattron(ctx->history, COLOR_PAIR(GREEN));

View File

@ -46,9 +46,9 @@ void print_time(WINDOW *window)
{
struct tm *timeinfo = get_time();
wattron(window, COLOR_PAIR(CYAN));
//wattron(window, COLOR_PAIR(CYAN));
wprintw(window, "[%02d:%02d:%02d] ", timeinfo->tm_hour, timeinfo->tm_min, timeinfo->tm_sec);
wattroff(window, COLOR_PAIR(CYAN));
//wattroff(window, COLOR_PAIR(CYAN));
}
/* Returns 1 if the string is empty, 0 otherwise */
@ -197,7 +197,7 @@ void del_char_buf_bck(wchar_t *buf, size_t *pos, size_t *len)
--(*len);
}
/* Deletes the character after pos */
/* Deletes the character at pos */
void del_char_buf_frnt(wchar_t *buf, size_t *pos, size_t *len)
{
if (*pos < 0 || *pos >= *len)

View File

@ -47,7 +47,7 @@ void add_char_to_buf(wchar_t *buf, size_t *pos, size_t *len, wint_t ch);
/* Deletes the character before pos */
void del_char_buf_bck(wchar_t *buf, size_t *pos, size_t *len);
/* Deletes the character after pos */
/* Deletes the character at pos */
void del_char_buf_frnt(wchar_t *buf, size_t *pos, size_t *len);
/* nulls buf and sets pos and len to 0 */