diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 13:46:17 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-01 13:46:17 +0300 |
commit | f8a848179504282d92be8c96022ee3d8e72509b3 (patch) | |
tree | 93e261e4e6c544ff6e79bc7438af12f166937af0 /src/ui/util.c | |
parent | d1dc79623142112521d15ef936e010f099b0e242 (diff) |
Scheme-specific proxies for Gopher and HTTP
Make requests via a proxy.
TODO: What about the server domain verification? Check against the proxy
hostname?
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 6aa6ccc9..dfe364a5 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -755,8 +755,18 @@ iWidget *makePreferences_Widget(void) { | |||
755 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow"))); | 755 | addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow"))); |
756 | addChild_Widget(headings, iClob(makeHeading_Widget("UI scale factor:"))); | 756 | addChild_Widget(headings, iClob(makeHeading_Widget("UI scale factor:"))); |
757 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); | 757 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); |
758 | addChild_Widget(headings, iClob(makeHeading_Widget(uiHeading_ColorEscape "Proxies"))); | ||
759 | addChild_Widget(values, iClob(makeHeading_Widget(""))); | ||
760 | addChild_Widget(headings, iClob(makeHeading_Widget("HTTP proxy:"))); | ||
761 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.http"); | ||
762 | addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); | ||
763 | setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gopher"); | ||
758 | arrange_Widget(dlg); | 764 | arrange_Widget(dlg); |
759 | // as_Widget(songDir)->rect.size.x = dlg->rect.size.x - headings->rect.size.x; | 765 | /* Text input widths. */ { |
766 | const int inputWidth = width_Rect(page->rect) - width_Rect(headings->rect); | ||
767 | as_Widget(findChild_Widget(values, "prefs.proxy.http"))->rect.size.x = inputWidth; | ||
768 | as_Widget(findChild_Widget(values, "prefs.proxy.gopher"))->rect.size.x = inputWidth; | ||
769 | } | ||
760 | iWidget *div = new_Widget(); { | 770 | iWidget *div = new_Widget(); { |
761 | setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue); | 771 | setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue); |
762 | addChild_Widget(div, iClob(new_LabelWidget("Dismiss", SDLK_ESCAPE, 0, "prefs.dismiss"))); | 772 | addChild_Widget(div, iClob(new_LabelWidget("Dismiss", SDLK_ESCAPE, 0, "prefs.dismiss"))); |