diff options
author | sijanec <anton@sijanec.eu> | 2021-05-05 12:56:41 +0200 |
---|---|---|
committer | sijanec <anton@sijanec.eu> | 2021-05-05 12:56:41 +0200 |
commit | 42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879 (patch) | |
tree | eb9f13bfc2962a62d716975f0fd9a43f683612c0 /src/ui.c | |
parent | dodal podporo za direct messages (diff) | |
download | discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar.gz discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar.bz2 discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar.lz discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar.xz discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.tar.zst discord.c-42bdf4a3ee0ad23b4eaf5e1b6a7e61a1f999d879.zip |
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -28,7 +28,9 @@ int dc_ui_print_message (WINDOW * textwin, struct dc_message * msg2do) { 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); + DC_SIMPLEPRINT(textwin, 3, ": %s%s", msg2do->content ? msg2do->content : "", msg2do->attachment ? " " : "\n"); + if (msg2do->attachment) + DC_SIMPLEPRINT(textwin, 8, "[" DC_I18N_ATTACHMENT "]: %s\n", msg2do->attachment); msg2do->status = 1; if (x); /* set but not used */ return 1; @@ -194,6 +196,7 @@ int dc_ui_thread (struct dc_thread_control * t) { init_pair(5, COLOR_CYAN, COLOR_BLACK); init_pair(6, COLOR_BLACK, COLOR_CYAN); init_pair(7, COLOR_MAGENTA, COLOR_BLACK); + init_pair(8, COLOR_BLUE, COLOR_WHITE); keypad(stdscr, TRUE); getmaxyx(stdscr, y, x); /* to je macro, zato y in x nista kazalca (;: */ ui.maxy = y; |