summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 839e8e65..3ec65ecd 100644
--- a/src/app.c
+++ b/src/app.c
@@ -153,6 +153,8 @@ static iString *serializePrefs_App_(const iApp *d) {
153 if (isMaximized) { 153 if (isMaximized) {
154 appendFormat_String(str, "~window.maximize\n"); 154 appendFormat_String(str, "~window.maximize\n");
155 } 155 }
156#else
157 iUnused(isMaximized);
156#endif 158#endif
157 } 159 }
158 if (isVisible_Widget(sidebar)) { 160 if (isVisible_Widget(sidebar)) {
@@ -164,6 +166,8 @@ static iString *serializePrefs_App_(const iApp *d) {
164 appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar)); 166 appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar));
165 appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window)); 167 appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window));
166 appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); 168 appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent);
169 appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth);
170 appendFormat_String(str, "biglede.set arg:%d\n", d->prefs.bigFirstParagraph);
167 appendFormat_String(str, "theme.set arg:%d auto:1\n", d->prefs.theme); 171 appendFormat_String(str, "theme.set arg:%d auto:1\n", d->prefs.theme);
168 appendFormat_String(str, "ostheme arg:%d\n", d->prefs.useSystemTheme); 172 appendFormat_String(str, "ostheme arg:%d\n", d->prefs.useSystemTheme);
169 appendFormat_String(str, "saturation.set arg:%d\n", (int) ((d->prefs.saturation * 100) + 0.5f)); 173 appendFormat_String(str, "saturation.set arg:%d\n", (int) ((d->prefs.saturation * 100) + 0.5f));
@@ -845,6 +849,16 @@ iBool handleCommand_App(const char *cmd) {
845 d->prefs.useSystemTheme = arg_Command(cmd); 849 d->prefs.useSystemTheme = arg_Command(cmd);
846 return iTrue; 850 return iTrue;
847 } 851 }
852 else if (equal_Command(cmd, "linewidth.set")) {
853 d->prefs.lineWidth = iMax(20, arg_Command(cmd));
854 postCommand_App("document.layout.changed");
855 return iTrue;
856 }
857 else if (equal_Command(cmd, "prefs.biglede.changed")) {
858 d->prefs.bigFirstParagraph = arg_Command(cmd) != 0;
859 postCommand_App("document.layout.changed");
860 return iTrue;
861 }
848 else if (equal_Command(cmd, "saturation.set")) { 862 else if (equal_Command(cmd, "saturation.set")) {
849 d->prefs.saturation = (float) arg_Command(cmd) / 100.0f; 863 d->prefs.saturation = (float) arg_Command(cmd) / 100.0f;
850 postCommandf_App("theme.changed auto:1"); 864 postCommandf_App("theme.changed auto:1");
@@ -963,6 +977,16 @@ iBool handleCommand_App(const char *cmd) {
963 setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize); 977 setToggle_Widget(findChild_Widget(dlg, "prefs.retainwindow"), d->prefs.retainWindowSize);
964 setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"), 978 setText_InputWidget(findChild_Widget(dlg, "prefs.uiscale"),
965 collectNewFormat_String("%g", uiScale_Window(d->window))); 979 collectNewFormat_String("%g", uiScale_Window(d->window)));
980 setFlags_Widget(
981 findChild_Widget(dlg, format_CStr("prefs.linewidth.%d", d->prefs.lineWidth)),
982 selected_WidgetFlag,
983 iTrue);
984 setToggle_Widget(findChild_Widget(dlg, "prefs.biglede"), d->prefs.bigFirstParagraph);
985 setFlags_Widget(
986 findChild_Widget(
987 dlg, format_CStr("prefs.saturation.%d", (int) (d->prefs.saturation * 3.99f))),
988 selected_WidgetFlag,
989 iTrue);
966 setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.http"), 990 setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.http"),
967 schemeProxy_App(range_CStr("http"))); 991 schemeProxy_App(range_CStr("http")));
968 setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"), 992 setText_InputWidget(findChild_Widget(dlg, "prefs.proxy.gopher"),