summaryrefslogtreecommitdiff
path: root/src/ui/documentwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r--src/ui/documentwidget.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index ef856558..c82e823d 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -317,6 +317,7 @@ static iRect siteBannerRect_DocumentWidget_(const iDocumentWidget *d) {
317 return moved_Rect(banner->visBounds, origin); 317 return moved_Rect(banner->visBounds, origin);
318} 318}
319 319
320#if 0
320static int forceBreakWidth_DocumentWidget_(const iDocumentWidget *d) { 321static int forceBreakWidth_DocumentWidget_(const iDocumentWidget *d) {
321 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "gopher")) { 322 if (equalCase_Rangecc(urlScheme_String(d->mod.url), "gopher")) {
322 return documentWidth_DocumentWidget_(d); 323 return documentWidth_DocumentWidget_(d);
@@ -328,6 +329,7 @@ static int forceBreakWidth_DocumentWidget_(const iDocumentWidget *d) {
328 } 329 }
329 return 0; 330 return 0;
330} 331}
332#endif
331 333
332static iInt2 documentPos_DocumentWidget_(const iDocumentWidget *d, iInt2 pos) { 334static iInt2 documentPos_DocumentWidget_(const iDocumentWidget *d, iInt2 pos) {
333 return addY_I2(sub_I2(pos, topLeft_Rect(documentBounds_DocumentWidget_(d))), 335 return addY_I2(sub_I2(pos, topLeft_Rect(documentBounds_DocumentWidget_(d))),
@@ -691,8 +693,7 @@ static void updateOutline_DocumentWidget_(iDocumentWidget *d) {
691 693
692static void setSource_DocumentWidget_(iDocumentWidget *d, const iString *source) { 694static void setSource_DocumentWidget_(iDocumentWidget *d, const iString *source) {
693 setUrl_GmDocument(d->doc, d->mod.url); 695 setUrl_GmDocument(d->doc, d->mod.url);
694 setSource_GmDocument( 696 setSource_GmDocument(d->doc, source, documentWidth_DocumentWidget_(d));
695 d->doc, source, documentWidth_DocumentWidget_(d), forceBreakWidth_DocumentWidget_(d));
696 d->foundMark = iNullRange; 697 d->foundMark = iNullRange;
697 d->selectMark = iNullRange; 698 d->selectMark = iNullRange;
698 d->hoverLink = NULL; 699 d->hoverLink = NULL;
@@ -1354,8 +1355,7 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
1354 const char *midLoc = (mid ? mid->text.start : NULL); 1355 const char *midLoc = (mid ? mid->text.start : NULL);
1355 /* Alt/Option key may be involved in window size changes. */ 1356 /* Alt/Option key may be involved in window size changes. */
1356 iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iFalse); 1357 iChangeFlags(d->flags, showLinkNumbers_DocumentWidgetFlag, iFalse);
1357 setWidth_GmDocument( 1358 setWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d));
1358 d->doc, documentWidth_DocumentWidget_(d), forceBreakWidth_DocumentWidget_(d));
1359 scroll_DocumentWidget_(d, 0); 1359 scroll_DocumentWidget_(d, 0);
1360 if (midLoc) { 1360 if (midLoc) {
1361 mid = findRunAtLoc_GmDocument(d->doc, midLoc); 1361 mid = findRunAtLoc_GmDocument(d->doc, midLoc);
@@ -2948,8 +2948,7 @@ iBool isRequestOngoing_DocumentWidget(const iDocumentWidget *d) {
2948} 2948}
2949 2949
2950void updateSize_DocumentWidget(iDocumentWidget *d) { 2950void updateSize_DocumentWidget(iDocumentWidget *d) {
2951 setWidth_GmDocument( 2951 setWidth_GmDocument(d->doc, documentWidth_DocumentWidget_(d));
2952 d->doc, documentWidth_DocumentWidget_(d), forceBreakWidth_DocumentWidget_(d));
2953 updateSideIconBuf_DocumentWidget_(d); 2952 updateSideIconBuf_DocumentWidget_(d);
2954 updateOutline_DocumentWidget_(d); 2953 updateOutline_DocumentWidget_(d);
2955 updateVisible_DocumentWidget_(d); 2954 updateVisible_DocumentWidget_(d);