summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-12-12 12:39:21 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-12-12 12:39:21 +0200
commit8864cc5aee3b134b0ffc5f53c1593645f4109f8c (patch)
treeae06a5d64bd72521b447d1abc984f6d2e171e0cb /src/ui
parent7bc2f1b1dd089bfd362ad04dad47ab38c6d9ff37 (diff)
Added option to show URL paths as encoded or decoded
IssueID #73
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/sidebarwidget.c9
-rw-r--r--src/ui/util.c4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 8024b240..1167ebe3 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -240,6 +240,13 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
240 const iVisitedUrl *visit = i.ptr; 240 const iVisitedUrl *visit = i.ptr;
241 iSidebarItem *item = new_SidebarItem(); 241 iSidebarItem *item = new_SidebarItem();
242 set_String(&item->url, &visit->url); 242 set_String(&item->url, &visit->url);
243 set_String(&item->label, &visit->url);
244 if (prefs_App()->decodeUserVisibleURLs) {
245 urlDecodePath_String(&item->label);
246 }
247 else {
248 urlEncodePath_String(&item->label);
249 }
243 iDate date; 250 iDate date;
244 init_Date(&date, &visit->when); 251 init_Date(&date, &visit->when);
245 if (date.day != on.day || date.month != on.month || date.year != on.year) { 252 if (date.day != on.day || date.month != on.month || date.year != on.year) {
@@ -1211,7 +1218,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect,
1211 } 1218 }
1212 else { 1219 else {
1213 iUrl parts; 1220 iUrl parts;
1214 init_Url(&parts, &d->url); 1221 init_Url(&parts, &d->label);
1215 const iBool isAbout = equalCase_Rangecc(parts.scheme, "about"); 1222 const iBool isAbout = equalCase_Rangecc(parts.scheme, "about");
1216 const iBool isGemini = equalCase_Rangecc(parts.scheme, "gemini"); 1223 const iBool isGemini = equalCase_Rangecc(parts.scheme, "gemini");
1217 draw_Text(font, 1224 draw_Text(font,
diff --git a/src/ui/util.c b/src/ui/util.c
index 1ad3f30e..6c9d75dc 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1136,7 +1136,9 @@ iWidget *makePreferences_Widget(void) {
1136 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede"))); 1136 addChild_Widget(values, iClob(makeToggle_Widget("prefs.biglede")));
1137 } 1137 }
1138 /* Proxies. */ { 1138 /* Proxies. */ {
1139 appendTwoColumnPage_(tabs, "Proxies", '5', &headings, &values); 1139 appendTwoColumnPage_(tabs, "Network", '5', &headings, &values);
1140 addChild_Widget(headings, iClob(makeHeading_Widget("Decode paths:")));
1141 addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls")));
1140 addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:"))); 1142 addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:")));
1141 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini"); 1143 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini");
1142 addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); 1144 addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:")));