diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2013-07-30 14:06:57 +0200 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2013-08-24 23:38:01 +0200 |
commit | 04a74228e42ecd96c2a4151ab172c958cb652996 (patch) | |
tree | 66e192a8dde09e445d2ee23afa8d976e0eb85a61 /platform | |
parent | a4d8d49ad11b56ce89dea6f74f620192d4198dd9 (diff) | |
download | mupdf-04a74228e42ecd96c2a4151ab172c958cb652996.tar.xz |
Display warnings in statusbar in x11 viewer.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/x11/x11_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/x11/x11_main.c b/platform/x11/x11_main.c index d74e9e15..04195f5c 100644 --- a/platform/x11/x11_main.c +++ b/platform/x11/x11_main.c @@ -141,12 +141,17 @@ void winerror(pdfapp_t *app, char *msg) void winwarn(pdfapp_t *app, char *msg) { - fprintf(stderr, "mupdf: warning: %s\n", msg); + char buf[1024]; + snprintf(buf, sizeof buf, "warning: %s", msg); + showmessage(app, 10, buf); + fprintf(stderr, "mupdf: %s\n", buf); } void winalert(pdfapp_t *app, pdf_alert_event *alert) { - fprintf(stderr, "Alert %s: %s\n", alert->title, alert->message); + char buf[1024]; + snprintf(buf, sizeof buf, "Alert %s: %s", alert->title, alert->message); + fprintf(stderr, "%s\n", buf); switch (alert->button_group_type) { case PDF_ALERT_BUTTON_GROUP_OK: |