diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-21 11:48:07 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-11-21 11:48:07 +0200 |
commit | 0b2b40a233c014e684f6efed0298efda02e7abf4 (patch) | |
tree | a1bc3a095b57279cd27b5ef65498b7c9a0fcf457 /src/app.c | |
parent | c651680715f7549a0cdbdbb10d535cba2272d9d0 (diff) |
Added option to load image instead of scrolling
One can now read through a page and load all inline images simply by repeatedly pressing Space or cursor down.
Key repeat events do not trigger image loads.
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -183,6 +183,7 @@ static iString *serializePrefs_App_(const iApp *d) { | |||
183 | appendFormat_String(str, "prefs.mono.gopher.changed arg:%d\n", d->prefs.monospaceGopher); | 183 | appendFormat_String(str, "prefs.mono.gopher.changed arg:%d\n", d->prefs.monospaceGopher); |
184 | appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); | 184 | appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); |
185 | appendFormat_String(str, "smoothscroll arg:%d\n", d->prefs.smoothScrolling); | 185 | appendFormat_String(str, "smoothscroll arg:%d\n", d->prefs.smoothScrolling); |
186 | appendFormat_String(str, "imageloadscroll arg:%d\n", d->prefs.loadImageInsteadOfScrolling); | ||
186 | appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth); | 187 | appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth); |
187 | appendFormat_String(str, "prefs.biglede.changed arg:%d\n", d->prefs.bigFirstParagraph); | 188 | appendFormat_String(str, "prefs.biglede.changed arg:%d\n", d->prefs.bigFirstParagraph); |
188 | appendFormat_String(str, "prefs.sideicon.changed arg:%d\n", d->prefs.sideIcon); | 189 | appendFormat_String(str, "prefs.sideicon.changed arg:%d\n", d->prefs.sideIcon); |
@@ -746,6 +747,8 @@ static iBool handlePrefsCommands_(iWidget *d, const char *cmd) { | |||
746 | isSelected_Widget(findChild_Widget(d, "prefs.retainwindow"))); | 747 | isSelected_Widget(findChild_Widget(d, "prefs.retainwindow"))); |
747 | postCommandf_App("smoothscroll arg:%d", | 748 | postCommandf_App("smoothscroll arg:%d", |
748 | isSelected_Widget(findChild_Widget(d, "prefs.smoothscroll"))); | 749 | isSelected_Widget(findChild_Widget(d, "prefs.smoothscroll"))); |
750 | postCommandf_App("imageloadscroll arg:%d", | ||
751 | isSelected_Widget(findChild_Widget(d, "prefs.imageloadscroll"))); | ||
749 | postCommandf_App("ostheme arg:%d", | 752 | postCommandf_App("ostheme arg:%d", |
750 | isSelected_Widget(findChild_Widget(d, "prefs.ostheme"))); | 753 | isSelected_Widget(findChild_Widget(d, "prefs.ostheme"))); |
751 | postCommandf_App("proxy.gemini address:%s", | 754 | postCommandf_App("proxy.gemini address:%s", |
@@ -956,6 +959,10 @@ iBool handleCommand_App(const char *cmd) { | |||
956 | d->prefs.smoothScrolling = arg_Command(cmd); | 959 | d->prefs.smoothScrolling = arg_Command(cmd); |
957 | return iTrue; | 960 | return iTrue; |
958 | } | 961 | } |
962 | else if (equal_Command(cmd, "imageloadscroll")) { | ||
963 | d->prefs.loadImageInsteadOfScrolling = arg_Command(cmd); | ||
964 | return iTrue; | ||
965 | } | ||
959 | else if (equal_Command(cmd, "forcewrap.toggle")) { | 966 | else if (equal_Command(cmd, "forcewrap.toggle")) { |
960 | d->prefs.forceLineWrap = !d->prefs.forceLineWrap; | 967 | d->prefs.forceLineWrap = !d->prefs.forceLineWrap; |
961 | updateSize_DocumentWidget(document_App()); | 968 | updateSize_DocumentWidget(document_App()); |
@@ -1153,6 +1160,7 @@ iBool handleCommand_App(const char *cmd) { | |||
1153 | setText_InputWidget(findChild_Widget(dlg, "prefs.downloads"), &d->prefs.downloadDir); | 1160 | setText_InputWidget(findChild_Widget(dlg, "prefs.downloads"), &d->prefs.downloadDir); |
1154 | setToggle_Widget(findChild_Widget(dlg, "prefs.hoveroutline"), d->prefs.hoverOutline); | 1161 | setToggle_Widget(findChild_Widget(dlg, "prefs.hoveroutline"), d->prefs.hoverOutline); |
1155 | setToggle_Widget(findChild_Widget(dlg, "prefs.smoothscroll"), d->prefs.smoothScrolling); | 1162 | setToggle_Widget(findChild_Widget(dlg, "prefs.smoothscroll"), d->prefs.smoothScrolling); |
1163 | setToggle_Widget(findChild_Widget(dlg, "prefs.imageloadscroll"), d->prefs.loadImageInsteadOfScrolling); | ||
1156 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->prefs.useSystemTheme); | 1164 | setToggle_Widget(findChild_Widget(dlg, "prefs.ostheme"), d->prefs.useSystemTheme); |
1157 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); | 1165 | setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); |
1158 | setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), | 1166 | setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), |