diff options
Diffstat (limited to '')
-rw-r--r-- | src/ui.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -16,15 +16,21 @@ void dc_null() { return; /* a simple null function */ } int dc_ui_print_message (WINDOW * textwin, struct dc_message * msg2do) { + int y, x; char timestring[64]; struct tm timestruct; localtime_r(&msg2do->time, ×truct); strftime(timestring, 64, DC_I18N_MSGTIMEF, ×truct); /* recimo, da je 23 znakov */ - DC_SIMPLEPRINT(textwin, 1, "#%012.12s ", msg2do->channel->name); - DC_SIMPLEPRINT(textwin, 2, "%018.18s ", timestring); - DC_SIMPLEPRINT(textwin, 4, "%08.8s: ", msg2do->username); - DC_SIMPLEPRINT(textwin, 3, "%s\n", msg2do->content); + DC_SIMPLEPRINT(textwin, 1, "%.35s", msg2do->channel->name); + getyx(textwin, y, x); + wmove(textwin, y, 10); + DC_SIMPLEPRINT(textwin, 2, " %.18s ", timestring); + DC_SIMPLEPRINT(textwin, 4, "%.33s", msg2do->username); + getyx(textwin, y, x); + wmove(textwin, y, 37); /* quick mafs */ + DC_SIMPLEPRINT(textwin, 3, ": %s\n", msg2do->content); msg2do->status = 1; + if (x); /* set but not used */ return 1; } int dc_ui_processline (struct dc_thread_control * t, char * l, WINDOW * textwin) { @@ -84,7 +90,6 @@ int dc_ui_processline (struct dc_thread_control * t, char * l, WINDOW * textwin) for (m = 0; m < c->guilds_sizeof; m++) /* we loop over all channels */ for (n = 0; n < c->guilds[m]->channels_sizeof; n++) c->guilds[m]->channels[n]->focused = 0; /* remove focus from all channels */ - DC_SIMPLEPRINT(textwin, 3, "/join %d %d", j, k); c->guilds[j]->channels[k]->focused = 1; c->guilds[j]->channels[k]->joined = 1; DC_CUE(c, c->guilds_lock); |