mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 22:33:02 +01:00
Merge pull request #2 from stqism/master
Adds fixes from master in testing
This commit is contained in:
commit
0ebd87eff7
6
chat.c
6
chat.c
@ -63,8 +63,6 @@ static void chat_onMessage(ToxWindow* self, int num, uint8_t* msg, uint16_t len)
|
|||||||
wprintw(ctx->history,"%s",hour);
|
wprintw(ctx->history,"%s",hour);
|
||||||
wprintw(ctx->history,":%s ",min);
|
wprintw(ctx->history,":%s ",min);
|
||||||
wattron(ctx->history, COLOR_PAIR(4));
|
wattron(ctx->history, COLOR_PAIR(4));
|
||||||
wprintw(ctx->history, "%s: ", now);
|
|
||||||
wattron(ctx->history, COLOR_PAIR(4));
|
|
||||||
wprintw(ctx->history, "%s: ", nick);
|
wprintw(ctx->history, "%s: ", nick);
|
||||||
wattroff(ctx->history, COLOR_PAIR(4));
|
wattroff(ctx->history, COLOR_PAIR(4));
|
||||||
wprintw(ctx->history, "%s\n", msg);
|
wprintw(ctx->history, "%s\n", msg);
|
||||||
@ -109,17 +107,19 @@ static void chat_onKey(ToxWindow* self, int key) {
|
|||||||
}
|
}
|
||||||
else if(key == '\n') {
|
else if(key == '\n') {
|
||||||
|
|
||||||
|
printf("Get times to int");
|
||||||
int inthour = timeinfo->tm_hour; //Pretty bad, but it gets the job done
|
int inthour = timeinfo->tm_hour; //Pretty bad, but it gets the job done
|
||||||
int intmin = timeinfo->tm_min;
|
int intmin = timeinfo->tm_min;
|
||||||
char min[2];
|
char min[2];
|
||||||
char hour[2];
|
char hour[2];
|
||||||
|
printf("Turn to varible");
|
||||||
sprintf(hour,"%d",inthour);
|
sprintf(hour,"%d",inthour);
|
||||||
if (intmin < 10) {
|
if (intmin < 10) {
|
||||||
sprintf(min,"0%d",intmin);
|
sprintf(min,"0%d",intmin);
|
||||||
} else {
|
} else {
|
||||||
sprintf(min,"%d",intmin);
|
sprintf(min,"%d",intmin);
|
||||||
}
|
}
|
||||||
|
printf("Display");
|
||||||
wattron(ctx->history, COLOR_PAIR(2));
|
wattron(ctx->history, COLOR_PAIR(2));
|
||||||
wprintw(ctx->history,"%s",hour);
|
wprintw(ctx->history,"%s",hour);
|
||||||
wprintw(ctx->history,":%s ",min);
|
wprintw(ctx->history,":%s ",min);
|
||||||
|
1
prompt.c
1
prompt.c
@ -140,6 +140,7 @@ static void execute(ToxWindow* self, char* cmd) {
|
|||||||
break;
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
wprintw(self->window, "Please add a message to your request.\n");
|
wprintw(self->window, "Please add a message to your request.\n");
|
||||||
|
break;
|
||||||
case -3:
|
case -3:
|
||||||
break;
|
break;
|
||||||
wprintw(self->window, "That appears to be your own ID.\n");
|
wprintw(self->window, "That appears to be your own ID.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user