From f8a848179504282d92be8c96022ee3d8e72509b3 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Tue, 1 Sep 2020 13:46:17 +0300 Subject: Scheme-specific proxies for Gopher and HTTP Make requests via a proxy. TODO: What about the server domain verification? Check against the proxy hostname? --- src/ui/util.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ui/util.c') 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) { addChild_Widget(values, iClob(makeToggle_Widget("prefs.retainwindow"))); addChild_Widget(headings, iClob(makeHeading_Widget("UI scale factor:"))); setId_Widget(addChild_Widget(values, iClob(new_InputWidget(8))), "prefs.uiscale"); + addChild_Widget(headings, iClob(makeHeading_Widget(uiHeading_ColorEscape "Proxies"))); + addChild_Widget(values, iClob(makeHeading_Widget(""))); + addChild_Widget(headings, iClob(makeHeading_Widget("HTTP proxy:"))); + setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.http"); + addChild_Widget(headings, iClob(makeHeading_Widget("Gopher proxy:"))); + setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gopher"); arrange_Widget(dlg); -// as_Widget(songDir)->rect.size.x = dlg->rect.size.x - headings->rect.size.x; + /* Text input widths. */ { + const int inputWidth = width_Rect(page->rect) - width_Rect(headings->rect); + as_Widget(findChild_Widget(values, "prefs.proxy.http"))->rect.size.x = inputWidth; + as_Widget(findChild_Widget(values, "prefs.proxy.gopher"))->rect.size.x = inputWidth; + } iWidget *div = new_Widget(); { setFlags_Widget(div, arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag, iTrue); addChild_Widget(div, iClob(new_LabelWidget("Dismiss", SDLK_ESCAPE, 0, "prefs.dismiss"))); -- cgit v1.2.3