summaryrefslogtreecommitdiffstats
path: root/src/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui.c b/src/ui.c
index e741335..725e7cc 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -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;