diff options
Diffstat (limited to 'src/gmdocument.c')
-rw-r--r-- | src/gmdocument.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gmdocument.c b/src/gmdocument.c index b8de304f..50733252 100644 --- a/src/gmdocument.c +++ b/src/gmdocument.c | |||
@@ -63,6 +63,7 @@ struct Impl_GmDocument { | |||
63 | iString url; /* for resolving relative links */ | 63 | iString url; /* for resolving relative links */ |
64 | iString localHost; | 64 | iString localHost; |
65 | int forceBreakWidth; /* force breaks on very long preformatted lines */ | 65 | int forceBreakWidth; /* force breaks on very long preformatted lines */ |
66 | iBool siteBannerEnabled; | ||
66 | iInt2 size; | 67 | iInt2 size; |
67 | iArray layout; /* contents of source, laid out in document space */ | 68 | iArray layout; /* contents of source, laid out in document space */ |
68 | iPtrArray links; | 69 | iPtrArray links; |
@@ -295,7 +296,7 @@ static void doLayout_GmDocument_(iGmDocument *d) { | |||
295 | iRangecc preAltText = iNullRange; | 296 | iRangecc preAltText = iNullRange; |
296 | int preFont = preformatted_FontId; | 297 | int preFont = preformatted_FontId; |
297 | iBool enableIndents = iFalse; | 298 | iBool enableIndents = iFalse; |
298 | iBool addSiteBanner = iTrue; | 299 | iBool addSiteBanner = d->siteBannerEnabled; |
299 | enum iGmLineType prevType = text_GmLineType; | 300 | enum iGmLineType prevType = text_GmLineType; |
300 | if (d->format == plainText_GmDocumentFormat) { | 301 | if (d->format == plainText_GmDocumentFormat) { |
301 | isPreformat = iTrue; | 302 | isPreformat = iTrue; |
@@ -592,6 +593,7 @@ void init_GmDocument(iGmDocument *d) { | |||
592 | init_String(&d->source); | 593 | init_String(&d->source); |
593 | init_String(&d->url); | 594 | init_String(&d->url); |
594 | init_String(&d->localHost); | 595 | init_String(&d->localHost); |
596 | d->siteBannerEnabled = iTrue; | ||
595 | d->size = zero_I2(); | 597 | d->size = zero_I2(); |
596 | init_Array(&d->layout, sizeof(iGmRun)); | 598 | init_Array(&d->layout, sizeof(iGmRun)); |
597 | init_PtrArray(&d->links); | 599 | init_PtrArray(&d->links); |
@@ -632,6 +634,7 @@ void reset_GmDocument(iGmDocument *d) { | |||
632 | clear_String(&d->url); | 634 | clear_String(&d->url); |
633 | clear_String(&d->localHost); | 635 | clear_String(&d->localHost); |
634 | d->themeSeed = 0; | 636 | d->themeSeed = 0; |
637 | d->siteBannerEnabled = iTrue; | ||
635 | } | 638 | } |
636 | 639 | ||
637 | static void setDerivedThemeColors_(enum iGmDocumentTheme theme) { | 640 | static void setDerivedThemeColors_(enum iGmDocumentTheme theme) { |
@@ -1055,6 +1058,10 @@ void setFormat_GmDocument(iGmDocument *d, enum iGmDocumentFormat format) { | |||
1055 | d->format = format; | 1058 | d->format = format; |
1056 | } | 1059 | } |
1057 | 1060 | ||
1061 | void setSiteBannerEnabled_GmDocument(iGmDocument *d, iBool siteBannerEnabled) { | ||
1062 | d->siteBannerEnabled = siteBannerEnabled; | ||
1063 | } | ||
1064 | |||
1058 | void setWidth_GmDocument(iGmDocument *d, int width, int forceBreakWidth) { | 1065 | void setWidth_GmDocument(iGmDocument *d, int width, int forceBreakWidth) { |
1059 | d->forceBreakWidth = forceBreakWidth; | 1066 | d->forceBreakWidth = forceBreakWidth; |
1060 | d->size.x = width; | 1067 | d->size.x = width; |