summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/app.c b/src/app.c
index 347e3661..ac93d511 100644
--- a/src/app.c
+++ b/src/app.c
@@ -169,6 +169,7 @@ static iString *serializePrefs_App_(const iApp *d) {
169 appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar)); 169 appendFormat_String(str, "sidebar.mode arg:%d\n", mode_SidebarWidget(sidebar));
170 appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window)); 170 appendFormat_String(str, "uiscale arg:%f\n", uiScale_Window(d->window));
171 appendFormat_String(str, "font.set arg:%d\n", d->prefs.font); 171 appendFormat_String(str, "font.set arg:%d\n", d->prefs.font);
172 appendFormat_String(str, "headingfont.set arg:%d\n", d->prefs.headingFont);
172 appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent); 173 appendFormat_String(str, "zoom.set arg:%d\n", d->prefs.zoomPercent);
173 appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth); 174 appendFormat_String(str, "linewidth.set arg:%d\n", d->prefs.lineWidth);
174 appendFormat_String(str, "prefs.biglede.changed arg:%d\n", d->prefs.bigFirstParagraph); 175 appendFormat_String(str, "prefs.biglede.changed arg:%d\n", d->prefs.bigFirstParagraph);
@@ -834,6 +835,14 @@ iBool handleCommand_App(const char *cmd) {
834 postCommand_App("window.unfreeze"); 835 postCommand_App("window.unfreeze");
835 return iTrue; 836 return iTrue;
836 } 837 }
838 else if (equal_Command(cmd, "headingfont.set")) {
839 setFreezeDraw_Window(get_Window(), iTrue);
840 d->prefs.headingFont = arg_Command(cmd);
841 setHeadingFont_Text(d->prefs.headingFont);
842 postCommand_App("font.changed");
843 postCommand_App("window.unfreeze");
844 return iTrue;
845 }
837 else if (equal_Command(cmd, "zoom.set")) { 846 else if (equal_Command(cmd, "zoom.set")) {
838 setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */ 847 setFreezeDraw_Window(get_Window(), iTrue); /* no intermediate draws before docs updated */
839 d->prefs.zoomPercent = arg_Command(cmd); 848 d->prefs.zoomPercent = arg_Command(cmd);
@@ -1016,6 +1025,10 @@ iBool handleCommand_App(const char *cmd) {
1016 selected_WidgetFlag, 1025 selected_WidgetFlag,
1017 iTrue); 1026 iTrue);
1018 setFlags_Widget( 1027 setFlags_Widget(
1028 findChild_Widget(dlg, format_CStr("prefs.headingfont.%d", d->prefs.headingFont)),
1029 selected_WidgetFlag,
1030 iTrue);
1031 setFlags_Widget(
1019 findChild_Widget(dlg, format_CStr("prefs.linewidth.%d", d->prefs.lineWidth)), 1032 findChild_Widget(dlg, format_CStr("prefs.linewidth.%d", d->prefs.lineWidth)),
1020 selected_WidgetFlag, 1033 selected_WidgetFlag,
1021 iTrue); 1034 iTrue);