diff options
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/util.c | 19 | ||||
-rw-r--r-- | src/ui/window.c | 1 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 7fc27130..91945db8 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -1090,7 +1090,7 @@ iWidget *makePreferences_Widget(void) { | |||
1090 | } | 1090 | } |
1091 | /* Colors. */ { | 1091 | /* Colors. */ { |
1092 | appendTwoColumnPage_(tabs, "Colors", '3', &headings, &values); | 1092 | appendTwoColumnPage_(tabs, "Colors", '3', &headings, &values); |
1093 | makeTwoColumnHeading_("PAGE CONTENTS", headings, values); | 1093 | makeTwoColumnHeading_("PAGE CONTENT", headings, values); |
1094 | for (int i = 0; i < 2; ++i) { | 1094 | for (int i = 0; i < 2; ++i) { |
1095 | const iBool isDark = (i == 0); | 1095 | const iBool isDark = (i == 0); |
1096 | const char *mode = isDark ? "dark" : "light"; | 1096 | const char *mode = isDark ? "dark" : "light"; |
@@ -1121,6 +1121,7 @@ iWidget *makePreferences_Widget(void) { | |||
1121 | } | 1121 | } |
1122 | /* Layout. */ { | 1122 | /* Layout. */ { |
1123 | appendTwoColumnPage_(tabs, "Style", '4', &headings, &values); | 1123 | appendTwoColumnPage_(tabs, "Style", '4', &headings, &values); |
1124 | makeTwoColumnHeading_("FONTS", headings, values); | ||
1124 | /* Fonts. */ { | 1125 | /* Fonts. */ { |
1125 | iWidget *fonts; | 1126 | iWidget *fonts; |
1126 | addChild_Widget(headings, iClob(makeHeading_Widget("Heading font:"))); | 1127 | addChild_Widget(headings, iClob(makeHeading_Widget("Heading font:"))); |
@@ -1140,8 +1141,7 @@ iWidget *makePreferences_Widget(void) { | |||
1140 | addChild_Widget(mono, iClob(makeToggle_Widget("prefs.mono.gopher"))), "Gopher"); | 1141 | addChild_Widget(mono, iClob(makeToggle_Widget("prefs.mono.gopher"))), "Gopher"); |
1141 | addChildFlags_Widget(values, iClob(mono), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | 1142 | addChildFlags_Widget(values, iClob(mono), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); |
1142 | } | 1143 | } |
1143 | addChild_Widget(headings, iClob(makePadding_Widget(2 * gap_UI))); | 1144 | makeTwoColumnHeading_("PARAGRAPH", headings, values); |
1144 | addChild_Widget(values, iClob(makePadding_Widget(2 * gap_UI))); | ||
1145 | addChild_Widget(headings, iClob(makeHeading_Widget("Line width:"))); | 1145 | addChild_Widget(headings, iClob(makeHeading_Widget("Line width:"))); |
1146 | iWidget *widths = new_Widget(); | 1146 | iWidget *widths = new_Widget(); |
1147 | /* Line widths. */ { | 1147 | /* Line widths. */ { |
@@ -1162,10 +1162,19 @@ iWidget *makePreferences_Widget(void) { | |||
1162 | addChild_Widget(headings, iClob(makeHeading_Widget("Big 1st paragaph:"))); | 1162 | addChild_Widget(headings, iClob(makeHeading_Widget("Big 1st paragaph:"))); |
1163 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); | 1163 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); |
1164 | } | 1164 | } |
1165 | /* Proxies. */ { | 1165 | /* Network. */ { |
1166 | appendTwoColumnPage_(tabs, "Network", '5', &headings, &values); | 1166 | appendTwoColumnPage_(tabs, "Network", '5', &headings, &values); |
1167 | addChild_Widget(headings, iClob(makeHeading_Widget("Decode paths:"))); | 1167 | addChild_Widget(headings, iClob(makeHeading_Widget("Cache size:"))); |
1168 | iWidget *cacheGroup = new_Widget(); { | ||
1169 | iInputWidget *cache = new_InputWidget(4); | ||
1170 | setSelectAllOnFocus_InputWidget(cache, iTrue); | ||
1171 | setId_Widget(addChild_Widget(cacheGroup, iClob(cache)), "prefs.cachesize"); | ||
1172 | addChildFlags_Widget(cacheGroup, iClob(new_LabelWidget("MB", NULL)), frameless_WidgetFlag); | ||
1173 | } | ||
1174 | addChildFlags_Widget(values, iClob(cacheGroup), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); | ||
1175 | addChild_Widget(headings, iClob(makeHeading_Widget("Decode URLs:"))); | ||
1168 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls"))); | 1176 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls"))); |
1177 | makeTwoColumnHeading_("PROXIES", headings, values); | ||
1169 | addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:"))); | 1178 | addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:"))); |
1170 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini"); | 1179 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini"); |
1171 | addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); | 1180 | addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); |
diff --git a/src/ui/window.c b/src/ui/window.c index 2e38512b..66994e79 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -397,6 +397,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { | |||
397 | if (equal_Command(cmd, "document.changed")) { | 397 | if (equal_Command(cmd, "document.changed")) { |
398 | iInputWidget *url = findWidget_App("url"); | 398 | iInputWidget *url = findWidget_App("url"); |
399 | const iString *urlStr = collect_String(suffix_Command(cmd, "url")); | 399 | const iString *urlStr = collect_String(suffix_Command(cmd, "url")); |
400 | trimCache_App(); | ||
400 | visitUrl_Visited(visited_App(), urlStr, 0); | 401 | visitUrl_Visited(visited_App(), urlStr, 0); |
401 | postCommand_App("visited.changed"); /* sidebar will update */ | 402 | postCommand_App("visited.changed"); /* sidebar will update */ |
402 | setText_InputWidget(url, urlStr); | 403 | setText_InputWidget(url, urlStr); |