diff options
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index c8daa2e2..9a97c39e 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -351,13 +351,10 @@ static void setSource_DocumentWidget_(iDocumentWidget *d, const iString *source) | |||
351 | } | 351 | } |
352 | 352 | ||
353 | static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode code) { | 353 | static void showErrorPage_DocumentWidget_(iDocumentWidget *d, enum iGmStatusCode code) { |
354 | iString *src = collectNew_String(); | 354 | iString *src = collectNewCStr_String("# "); |
355 | const iGmError *msg = get_GmError(code); | 355 | const iGmError *msg = get_GmError(code); |
356 | format_String(src, | 356 | appendChar_String(src, msg->icon ? msg->icon : 0x2327); /* X in a box */ |
357 | "# %lc %s\n%s", | 357 | appendFormat_String(src, " %s\n%s", msg->title, msg->info); |
358 | msg->icon ? msg->icon : 0x2327, /* X in a box */ | ||
359 | msg->title, | ||
360 | msg->info); | ||
361 | switch (code) { | 358 | switch (code) { |
362 | case failedToOpenFile_GmStatusCode: | 359 | case failedToOpenFile_GmStatusCode: |
363 | case certificateNotValid_GmStatusCode: | 360 | case certificateNotValid_GmStatusCode: |
@@ -1179,7 +1176,7 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) { | |||
1179 | init_String(&bannerText); | 1176 | init_String(&bannerText); |
1180 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); | 1177 | iInt2 bpos = add_I2(visPos, init_I2(0, lineHeight_Text(banner_FontId) / 2)); |
1181 | if (icon) { | 1178 | if (icon) { |
1182 | format_String(&bannerText, "%lc", (int) icon); | 1179 | appendChar_String(&bannerText, icon); |
1183 | const iRect iconRect = visualBounds_Text(banner_FontId, range_String(&bannerText)); | 1180 | const iRect iconRect = visualBounds_Text(banner_FontId, range_String(&bannerText)); |
1184 | drawRange_Text(run->font, | 1181 | drawRange_Text(run->font, |
1185 | addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), | 1182 | addY_I2(bpos, -mid_Rect(iconRect).y + lineHeight_Text(run->font) / 2), |