=> fb1c43b4d277632681e361885c575aa4336e8a29
[1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex c9eda18f..75309737 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -1173,8 +1173,8 @@[m [mstatic void checkResponse_DocumentWidget_(iDocumentWidget *d) {[m : cstr_String(&resp->meta),[m uiTextCaution_ColorEscape "Send \u21d2",[m "document.input.submit");[m [31m- setSensitive_InputWidget(findChild_Widget(dlg, "input"),[m [31m- statusCode == sensitiveInput_GmStatusCode);[m [32m+[m[32m setSensitiveContent_InputWidget(findChild_Widget(dlg, "input"),[m [32m+[m[32m statusCode == sensitiveInput_GmStatusCode);[m break;[m }[m case categorySuccess_GmStatusCode:[m [1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex c4c7475e..85bd8b8b 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -24,6 +24,7 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #include "paint.h"[m #include "util.h"[m #include "keys.h"[m [32m+[m[32m#include "prefs.h"[m #include "app.h"[m [m #include[m [36m@@ -64,11 +65,12 @@[m [mstatic void deinit_InputUndo_(iInputUndo *d) {[m [m enum iInputWidgetFlag {[m isSensitive_InputWidgetFlag = iBit(1),[m [31m- enterPressed_InputWidgetFlag = iBit(2),[m [31m- selectAllOnFocus_InputWidgetFlag = iBit(3),[m [31m- notifyEdits_InputWidgetFlag = iBit(4),[m [31m- eatEscape_InputWidgetFlag = iBit(5),[m [31m- isMarking_InputWidgetFlag = iBit(6),[m [32m+[m[32m isUrl_InputWidgetFlag = iBit(2), /* affected by decoding preference */[m [32m+[m[32m enterPressed_InputWidgetFlag = iBit(3),[m [32m+[m[32m selectAllOnFocus_InputWidgetFlag = iBit(4),[m [32m+[m[32m notifyEdits_InputWidgetFlag = iBit(5),[m [32m+[m[32m eatEscape_InputWidgetFlag = iBit(6),[m [32m+[m[32m isMarking_InputWidgetFlag = iBit(7),[m };[m [m struct Impl_InputWidget {[m [36m@@ -168,10 +170,6 @@[m [mvoid setMode_InputWidget(iInputWidget *d, enum iInputMode mode) {[m d->mode = mode;[m }[m [m [31m-void setSensitive_InputWidget(iInputWidget *d, iBool isSensitive) {[m [31m- iChangeFlags(d->inFlags, isSensitive_InputWidgetFlag, isSensitive);[m [31m-}[m [31m-[m const iString *text_InputWidget(const iInputWidget *d) {[m return collect_String(newUnicodeN_String(constData_Array(&d->text), size_Array(&d->text)));[m }[m [36m@@ -372,6 +370,14 @@[m [mvoid setCursor_InputWidget(iInputWidget *d, size_t pos) {[m }[m }[m [m [32m+[m[32mvoid setSensitiveContent_InputWidget(iInputWidget *d, iBool isSensitive) {[m [32m+[m[32m iChangeFlags(d->inFlags, isSensitive_InputWidgetFlag, isSensitive);[m [32m+[m[32m}[m [32m+[m [32m+[m[32mvoid setUrlContent_InputWidget(iInputWidget *d, iBool isUrl) {[m [32m+[m[32m iChangeFlags(d->inFlags, isUrl_InputWidgetFlag, isUrl);[m [32m+[m[32m}[m [32m+[m void setSelectAllOnFocus_InputWidget(iInputWidget *d, iBool selectAllOnFocus) {[m iChangeFlags(d->inFlags, selectAllOnFocus_InputWidgetFlag, selectAllOnFocus);[m }[m [36m@@ -591,6 +597,15 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m deleteMarked_InputWidget_(d);[m char *text = SDL_GetClipboardText();[m iString *paste = collect_String(newCStr_String(text));[m [32m+[m[32m /* Url decoding. */[m [32m+[m[32m if (d->inFlags & isUrl_InputWidgetFlag) {[m [32m+[m[32m if (prefs_App()->decodeUserVisibleURLs) {[m [32m+[m[32m paste = collect_String(urlDecode_String(paste));[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m urlEncodePath_String(paste);[m [32m+[m[32m }[m [32m+[m[32m }[m SDL_free(text);[m iConstForEach(String, i, paste) {[m insertChar_InputWidget_(d, i.value);[m [1mdiff --git a/src/ui/inputwidget.h b/src/ui/inputwidget.h[m [1mindex 7fb8a8bd..654433ea 100644[m [1m--- a/src/ui/inputwidget.h[m [1m+++ b/src/ui/inputwidget.h[m [36m@@ -33,19 +33,21 @@[m [menum iInputMode {[m };[m [m void setHint_InputWidget (iInputWidget *, const char *hintText);[m [31m-void setSensitive_InputWidget(iInputWidget *, iBool isSensitive);[m void setMode_InputWidget (iInputWidget *, enum iInputMode mode);[m void setMaxLen_InputWidget (iInputWidget *, size_t maxLen);[m void setText_InputWidget (iInputWidget *, const iString *text);[m void setTextCStr_InputWidget (iInputWidget *, const char *cstr);[m void setCursor_InputWidget (iInputWidget *, size_t pos);[m [31m-void setSelectAllOnFocus_InputWidget (iInputWidget *, iBool selectAllOnFocus);[m [31m-void setNotifyEdits_InputWidget (iInputWidget *, iBool notifyEdits);[m [31m-void setEatEscape_InputWidget(iInputWidget *, iBool eatEscape);[m void begin_InputWidget (iInputWidget *);[m void end_InputWidget (iInputWidget *, iBool accept);[m void selectAll_InputWidget (iInputWidget *);[m [m [32m+[m[32mvoid setSelectAllOnFocus_InputWidget (iInputWidget *, iBool selectAllOnFocus);[m [32m+[m[32mvoid setSensitiveContent_InputWidget (iInputWidget *, iBool isSensitive);[m [32m+[m[32mvoid setUrlContent_InputWidget (iInputWidget *, iBool isUrl);[m [32m+[m[32mvoid setNotifyEdits_InputWidget (iInputWidget *, iBool notifyEdits);[m [32m+[m[32mvoid setEatEscape_InputWidget (iInputWidget *, iBool eatEscape);[m [32m+[m const iString * text_InputWidget (const iInputWidget *);[m [m iLocalDef iInputWidget *newHint_InputWidget(size_t maxLen, const char *hint) {[m [1mdiff --git a/src/ui/util.c b/src/ui/util.c[m [1mindex e1db3129..b6378055 100644[m [1m--- a/src/ui/util.c[m [1m+++ b/src/ui/util.c[m [36m@@ -1184,6 +1184,7 @@[m [miWidget *makeBookmarkEditor_Widget(void) {[m setId_Widget(addChild_Widget(values, iClob(inputs[0] = new_InputWidget(0))), "bmed.title");[m addChild_Widget(headings, iClob(makeHeading_Widget("URL:")));[m setId_Widget(addChild_Widget(values, iClob(inputs[1] = new_InputWidget(0))), "bmed.url");[m [32m+[m[32m setUrlContent_InputWidget(inputs[1], iTrue);[m addChild_Widget(headings, iClob(makeHeading_Widget("Tags:")));[m setId_Widget(addChild_Widget(values, iClob(inputs[2] = new_InputWidget(0))), "bmed.tags");[m arrange_Widget(dlg);[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 6edd4c0e..c2d43aae 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -514,6 +514,7 @@[m [mstatic void setupUserInterface_Window(iWindow *d) {[m iInputWidget *url = new_InputWidget(0);[m setSelectAllOnFocus_InputWidget(url, iTrue);[m setId_Widget(as_Widget(url), "url");[m [32m+[m[32m setUrlContent_InputWidget(url, iTrue);[m setNotifyEdits_InputWidget(url, iTrue);[m setTextCStr_InputWidget(url, "gemini://");[m addChildFlags_Widget(navBar, iClob(url), expand_WidgetFlag);[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).