diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-28 11:26:37 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-28 11:26:37 +0200 |
commit | b6d0231a53abe3be35f71aa73ddda8654835833f (patch) | |
tree | b4ad5c21ec9f8451dfefc053cf3e8e255d875ecb /src/ui | |
parent | ff2deccfdf4aba25f04eed2bba442d28e6dba2df (diff) |
Cleanup: Removed (hidden) preformatted wrap option
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/documentwidget.c | 11 | ||||
-rw-r--r-- | src/ui/window.c | 2 |
2 files changed, 5 insertions, 8 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 | ||
320 | static int forceBreakWidth_DocumentWidget_(const iDocumentWidget *d) { | 321 | static 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 | ||
332 | static iInt2 documentPos_DocumentWidget_(const iDocumentWidget *d, iInt2 pos) { | 334 | static 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 | ||
692 | static void setSource_DocumentWidget_(iDocumentWidget *d, const iString *source) { | 694 | static 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 | ||
2950 | void updateSize_DocumentWidget(iDocumentWidget *d) { | 2950 | void 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); |
diff --git a/src/ui/window.c b/src/ui/window.c index 906e1084..c0afe266 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -155,8 +155,6 @@ static const iMenuItem viewMenuItems_[] = { | |||
155 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, | 155 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, |
156 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, | 156 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, |
157 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, | 157 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, |
158 | { "---", 0, 0, NULL }, | ||
159 | { "Wrap Preformatted", 0, 0, "forcewrap.toggle" } /* TODO: remove this; should scroll preformatted */ | ||
160 | }; | 158 | }; |
161 | 159 | ||
162 | static iMenuItem bookmarksMenuItems_[] = { | 160 | static iMenuItem bookmarksMenuItems_[] = { |