[1mdiff --git a/lib/the_Foundation b/lib/the_Foundation[m
[1mindex db2d7340..09f101fe 160000[m
[1m--- a/lib/the_Foundation[m
[1m+++ b/lib/the_Foundation[m
[36m@@ -1 +1 @@[m
[31m-Subproject commit db2d73404bc3df02e375e44fd4f7b8a5ee075ccf[m
[32m+[m[32mSubproject commit 09f101fe52731f828cca77da00473f5562d91314[m
[1mdiff --git a/res/about/version.gmi b/res/about/version.gmi[m
[1mindex cda01f18..a0426ab4 100644[m
[1m--- a/res/about/version.gmi[m
[1m+++ b/res/about/version.gmi[m
[36m@@ -10,6 +10,7 @@[m
New features:[m
[m
Changes and enhancements:[m
[32m+[m[32m* Newly created client certificates have a default expiration date in the year 9999, which means they won't expire. One can still also set a specific date as before.[m
[m
Fixes:[m
[1mdiff --git a/src/app.c b/src/app.c[m
[1mindex f2a7c5be..ae0ac09f 100644[m
[1m--- a/src/app.c[m
[1m+++ b/src/app.c[m
[36m@@ -193,7 +193,7 @@[m [mstruct Impl_App {[m
static iApp app_;[m
[m
static iBool handleNonWindowRelatedCommand_App_(iApp *d, const char *cmd);[m
[31m- [m
[32m+[m
/----------------------------------------------------------------------------------------------/[m
[m
iDeclareType(Ticker)[m
[36m@@ -536,7 +536,7 @@[m [mvoid updateCACertificates_App(void) {[m
else {[m
setCACertificates_TlsRequest(&d->prefs.strings[caFile_PrefsString],[m
&d->prefs.strings[caPath_PrefsString]);[m
[31m- } [m
[32m+[m[32m }[m
}[m
[m
static void loadPrefs_App_(iApp *d) {[m
[36m@@ -589,12 +589,12 @@[m [mstatic void loadPrefs_App_(iApp *d) {[m
}[m
else if (equal_Command(cmd, "font.set") ||[m
equal_Command(cmd, "prefs.retaintabs.changed")) {[m
[31m- /* Fonts are set immediately so the first initialization already has [m
[32m+[m[32m /* Fonts are set immediately so the first initialization already has[m
the right ones. */[m
handleCommand_App(cmd);[m
}[m
else if (equal_Command(cmd, "prefs.menubar.changed")) {[m
[31m- handleCommand_App(cmd); [m
[32m+[m[32m handleCommand_App(cmd);[m
}[m
#if defined (iPlatformAndroidMobile)[m
else if (equal_Command(cmd, "returnkey.set")) {[m
[36m@@ -694,7 +694,7 @@[m [mstatic iRect initialWindowRect_App_(const iApp *d, size_t windowIndex) {[m
mulfv_I2(&rect.size, iMax(factor, 1.0f));[m
}[m
#endif[m
[31m- return rect; [m
[32m+[m[32m return rect;[m
}[m
[m
static iBool loadState_App_(iApp *d) {[m
[36m@@ -763,7 +763,7 @@[m [mstatic iBool loadState_App_(iApp *d) {[m
if (!win) {[m
printf("%s: missing window\n", cstr_String(path_File(f)));[m
setCurrent_Root(NULL);[m
[31m- return iFalse; [m
[32m+[m[32m return iFalse;[m
}[m
const uint16_t bits = readU16_File(f);[m
const uint8_t modes = readU8_File(f);[m
[36m@@ -807,7 +807,7 @@[m [mstatic iBool loadState_App_(iApp *d) {[m
if (!win) {[m
printf("%s: missing window\n", cstr_String(path_File(f)));[m
setCurrent_Root(NULL);[m
[31m- return iFalse; [m
[32m+[m[32m return iFalse;[m
}[m
const int8_t flags = read8_File(f);[m
int rootIndex = flags & rootIndex1_DocumentStateFlag ? 1 : 0;[m
[36m@@ -1072,7 +1072,7 @@[m [mstatic void dumpRequestFinished_App_(void *obj, iGmRequest *req) {[m
fwrite(constData_Block(body), size_Block(body), 1, stdout);[m
if (--dumpCount_ == 0) {[m
signal_Condition(dumpFinishedCondition_);[m
[31m- } [m
[32m+[m[32m }[m
unlock_Mutex(dumpMutex_);[m
}[m
[m
[36m@@ -1100,7 +1100,7 @@[m [mstatic void init_App_(iApp *d, int argc, char **argv) {[m
d->recentlyClosedTabUrls = new_StringList();[m
d->overrideDataPath = NULL;[m
d->didCheckDataPathOption = iFalse;[m
[31m- init_Array(&d->initialWindowRects, sizeof(iRect)); [m
[32m+[m[32m init_Array(&d->initialWindowRects, sizeof(iRect));[m
init_CommandLine(&d->args, argc, argv);[m
/* Where was the app started from? We ask SDL first because the command line alone[m
cannot be relied on (behavior differs depending on OS). */ {[m
[36m@@ -1288,8 +1288,8 @@[m [mstatic void init_App_(iApp *d, int argc, char **argv) {[m
}[m
});[m
deinit_Foundation();[m
[31m- exit(0); [m
[31m- } [m
[32m+[m[32m exit(0);[m
[32m+[m[32m }[m
init_Periodic(&d->periodic);[m
#if defined (iPlatformAppleDesktop)[m
setupApplication_MacOS();[m
[36m@@ -1310,7 +1310,7 @@[m [mstatic void init_App_(iApp *d, int argc, char **argv) {[m
resize_Array(&d->initialWindowRects, 1);[m
set_Array(&d->initialWindowRects, 0, &winRect);[m
}[m
[31m- loadPrefs_App_(d); [m
[32m+[m[32m loadPrefs_App_(d);[m
updateActive_Fonts();[m
load_Keys(dataDir_App_());[m
iRect *winRect0 = at_Array(&d->initialWindowRects, 0);[m
[36m@@ -1744,7 +1744,7 @@[m [mstatic SDL_MouseMotionEvent pendingMotion_;[m
[m
static iBool nextEvent_App_(iApp *d, enum iAppEventMode eventMode, SDL_Event *event) {[m
#if !defined (iPlatformApple)[m
[31m- /* If there is accumulated mouse motion, don't spend too long processing events. [m
[32m+[m[32m /* If there is accumulated mouse motion, don't spend too long processing events.[m
We want to refresh the UI ASAP, if necessary. */[m
if (eventProcessingStartTime_ == 0) {[m
eventProcessingStartTime_ = SDL_GetTicks();[m
[36m@@ -1775,7 +1775,7 @@[m [mstatic iBool nextEvent_App_(iApp *d, enum iAppEventMode eventMode, SDL_Event *ev[m
return SDL_WaitEvent(event);[m
}[m
}[m
[31m- /* SDL regression circa 2.0.18? SDL_PollEvent() doesn't always return [m
[32m+[m[32m /* SDL regression circa 2.0.18? SDL_PollEvent() doesn't always return[m
events posted immediately beforehand. Waiting with a very short timeout[m
seems to work better. */[m
#if defined (iPlatformLinux) && SDL_VERSION_ATLEAST(2, 0, 18)[m
[36m@@ -1795,7 +1795,7 @@[m [mvoid processEvents_App(enum iAppEventMode eventMode) {[m
iBool gotRefresh = iFalse;[m
iPtrArray windows;[m
init_PtrArray(&windows);[m
[31m- /* A bit of global state, alas, but we need to protect against a flood of mouse [m
[32m+[m[32m /* A bit of global state, alas, but we need to protect against a flood of mouse[m
motion events that get us stuck here in the event processing loop for too long. */[m
eventProcessingStartTime_ = 0;[m
numPendingMotionEvents_ = 0;[m
[36m@@ -2046,7 +2046,7 @@[m [mvoid processEvents_App(enum iAppEventMode eventMode) {[m
index++;[m
}[m
if (curIndex != index) {[m
[31m- setFocus_Widget(child_Widget(menubar, index)); [m
[32m+[m[32m setFocus_Widget(child_Widget(menubar, index));[m
postCommand_Widget(child_Widget(menubar, index), "trigger");[m
}[m
}[m
[36m@@ -2084,12 +2084,12 @@[m [mvoid processEvents_App(enum iAppEventMode eventMode) {[m
iWidget *startFrom = focus_Widget();[m
const iBool isLimitedFocus = focusRoot_Widget(startFrom) != get_Root()->widget;[m
/* Go to a sidebar if one is visible. */[m
[31m- if (!startFrom && !isLimitedFocus && [m
[32m+[m[32m if (!startFrom && !isLimitedFocus &&[m
isVisible_Widget(findWidget_App("sidebar"))) {[m
setFocus_Widget(as_Widget([m
list_SidebarWidget((iSidebarWidget *) findWidget_App("sidebar"))));[m
}[m
[31m- else if (!startFrom && !isLimitedFocus && [m
[32m+[m[32m else if (!startFrom && !isLimitedFocus &&[m
isVisible_Widget(findWidget_App("sidebar2"))) {[m
setFocus_Widget(as_Widget([m
list_SidebarWidget((iSidebarWidget *) findWidget_App("sidebar2"))));[m
[36m@@ -2264,7 +2264,7 @@[m [miLocalDef iBool isResizeDrawEnabled_(void) {[m
return iTrue;[m
#else[m
return iFalse;[m
[31m-#endif [m
[32m+[m[32m#endif[m
}[m
[m
static int run_App_(iApp *d) {[m
[36m@@ -2351,7 +2351,7 @@[m [mvoid refresh_App(void) {[m
else {[m
#if defined (iPlatformApple)[m
/* Nothing needs redrawing, however we may have to keep blitting the latest contents.[m
[31m- The Metal renderer can get stuttery otherwise. */ [m
[32m+[m[32m The Metal renderer can get stuttery otherwise. */[m
iConstForEach(PtrArray, j, &windows) {[m
iWindow *win = j.ptr;[m
switch (win->type) {[m
[36m@@ -2586,7 +2586,7 @@[m [msize_t numWindows_App(void) {[m
}[m
[m
size_t windowIndex_App(const iMainWindow *win) {[m
[31m- return indexOf_PtrArray(&app_.mainWindows, win); [m
[32m+[m[32m return indexOf_PtrArray(&app_.mainWindows, win);[m
}[m
[m
iMainWindow *newMainWindow_App(void) {[m
[36m@@ -2594,7 +2594,7 @@[m [miMainWindow *newMainWindow_App(void) {[m
iMainWindow *newWin = new_MainWindow(initialWindowRect_App_(d, numWindows_App()));[m
addWindow_App(newWin); /* App takes ownership */[m
SDL_ShowWindow(newWin->base.win);[m
[31m- setCurrent_Window(newWin); [m
[32m+[m[32m setCurrent_Window(newWin);[m
if (isAppleDesktop_Platform() && size_PtrArray(mainWindows_App()) == 1) {[m
/* Restore the window state as it was before (sidebars, navigation history) when[m
opening a window again after all windows have been closed. */[m
[36m@@ -2705,7 +2705,7 @@[m [miBool isRunningUnderWindowSystem_App(void) {[m
void setTextInputActive_App(iBool active) {[m
app_.isTextInputActive = active;[m
if (active) {[m
[31m- SDL_StartTextInput(); [m
[32m+[m[32m SDL_StartTextInput();[m
}[m
else {[m
SDL_StopTextInput();[m
[36m@@ -2758,7 +2758,7 @@[m [mstatic void updatePrefsPinSplitButtons_(iWidget *d, int value) {[m
static void updatePrefsToolBarActionButton_(iWidget *prefs, int buttonIndex, int action) {[m
updateDropdownSelection_LabelWidget([m
findChild_Widget(prefs, format_CStr("prefs.toolbaraction%d", buttonIndex + 1)),[m
[31m- format_CStr(" arg:%d button:%d", action, buttonIndex)); [m
[32m+[m[32m format_CStr(" arg:%d button:%d", action, buttonIndex));[m
}[m
[m
static void updateScrollSpeedButtons_(iWidget *d, enum iScrollType type, const int value) {[m
[36m@@ -3003,7 +3003,7 @@[m [mvoid closeWindow_App(iWindow *win) {[m
iAssert(win->type == main_WindowType || win->type == extra_WindowType);[m
const iBool isMain = (win->type == main_WindowType);[m
iWindow *activeWindow = d->window;[m
[31m- /* Preferences needs to be dismissed properly. */ [m
[32m+[m[32m /* Preferences needs to be dismissed properly. */[m
/* TODO: This needs a more generic dialog dismissal command system. Also needed for mobile! */[m
if (win->type == extra_WindowType) {[m
iWidget *prefs = findChild_Widget(win->roots[0]->widget, "prefs");[m
[36m@@ -3026,7 +3026,7 @@[m [mvoid closeWindow_App(iWindow *win) {[m
/* The one and only window is being closed. On macOS, the app will keep running, which[m
means we must save the state of the window now or otherwise it will be lost. A newly[m
opened window will use this saved state if it's the only window of the app. */[m
[31m- saveState_App_(d); [m
[32m+[m[32m saveState_App_(d);[m
}[m
if (activeWindow == win) {[m
d->window = NULL;[m
[36m@@ -3123,6 +3123,12 @@[m [mstatic iBool handleIdentityCreationCommands_(iWidget *dlg, const char *cmd) {[m
until.minute = n >= 5 ? val[4] : 0;[m
until.second = n == 6 ? val[5] : 0;[m
until.gmtOffsetSeconds = today.gmtOffsetSeconds;[m
[32m+[m[32m if (!cmp_String([m
[32m+[m[32m text_InputWidget(findChild_Widget(dlg, "ident.until")),[m
[32m+[m[32m "9999-12-31 23:59:59")) {[m
[32m+[m[32m /* This is a special "indefinite" date, intended to be set in GMT. */[m
[32m+[m[32m until.gmtOffsetSeconds = 0;[m
[32m+[m[32m }[m
/* In the past? */ {[m
iTime now, t;[m
initCurrent_Time(&now);[m
[36m@@ -3210,7 +3216,7 @@[m [mvoid availableFontsChanged_App(void) {[m
iApp *d = &app_;[m
iConstForEach(PtrArray, win, listWindows_App_(d, collectNew_PtrArray())) {[m
resetMissing_Text(text_Window(win.ptr));[m
[31m- } [m
[32m+[m[32m }[m
}[m
[m
static void invalidateCachedDocuments_App_(void) {[m
[36m@@ -3230,7 +3236,7 @@[m [mstatic const iString *popClosedTabUrl_App_(iApp *d) {[m
if (isEmpty_StringList(d->recentlyClosedTabUrls)) {[m
return NULL;[m
}[m
[31m- return collect_String(takeLast_StringList(d->recentlyClosedTabUrls)); [m
[32m+[m[32m return collect_String(takeLast_StringList(d->recentlyClosedTabUrls));[m
}[m
[m
static iBool handleNonWindowRelatedCommand_App_(iApp *d, const char *cmd) {[m
[36m@@ -3269,7 +3275,7 @@[m [mstatic iBool handleNonWindowRelatedCommand_App_(iApp *d, const char *cmd) {[m
if (!isFrozen) {[m
postCommand_App("~toolbar.actions.changed");[m
}[m
[31m- return iTrue; [m
[32m+[m[32m return iTrue;[m
}[m
else if (equal_Command(cmd, "prefs.bottomnavbar.changed")) {[m
d->prefs.bottomNavBar = arg_Command(cmd) != 0;[m
[36m@@ -4016,8 +4022,8 @@[m [mstatic iBool handleOpenCommand_App_(iApp *d, const char *cmd) {[m
const iBool isHistory = argLabel_Command(cmd, "history") != 0;[m
/* If not opening in a new tab, we must not domains/roots accidentally. */[m
if (!isHistory &&[m
[31m- isIdentityPinned_DocumentWidget(doc) && [m
[31m- (newTab & newTabMask_OpenTabFlag) == 0 && [m
[32m+[m[32m isIdentityPinned_DocumentWidget(doc) &&[m
[32m+[m[32m (newTab & newTabMask_OpenTabFlag) == 0 &&[m
!isSetIdentityRetained_DocumentWidget(doc, url)) {[m
/* Ensure a new tab is opened where there is no set identity. */[m
newTab = new_OpenTabFlag;[m
[36m@@ -4041,7 +4047,7 @@[m [mstatic iBool handleOpenCommand_App_(iApp *d, const char *cmd) {[m
setInitialScroll_DocumentWidget(doc, argfLabel_Command(cmd, "scroll"));[m
setRedirectCount_DocumentWidget(doc, redirectCount);[m
setOrigin_DocumentWidget(doc, origin);[m
[31m- showCollapsed_Widget(findWidget_App("document.progress"), iFalse); [m
[32m+[m[32m showCollapsed_Widget(findWidget_App("document.progress"), iFalse);[m
/* Do the fetch or load page from cache. */[m
setUrlFlags_DocumentWidget([m
doc,[m
[36m@@ -4406,7 +4412,7 @@[m [miBool handleCommand_App(const char *cmd) {[m
}[m
return iTrue;[m
}[m
[31m- else if (equal_Command(cmd, "preferences")) { [m
[32m+[m[32m else if (equal_Command(cmd, "preferences")) {[m
/* Preferences may already be open. */ {[m
iWindow *win = findWindow_App(extra_WindowType, "prefs");[m
if (win) {[m
[36m@@ -4667,7 +4673,8 @@[m [miBool handleCommand_App(const char *cmd) {[m
}[m
else if (equal_Command(cmd, "ident.new") && isMainWin) {[m
iWidget *dlg = makeIdentityCreation_Widget();[m
[31m- setFocus_Widget(findChild_Widget(dlg, "ident.until"));[m
[32m+[m[32m setTextCStr_InputWidget(findChild_Widget(dlg, "ident.until"), "9999-12-31 23:59:59");[m
[32m+[m[32m setFocus_Widget(findChild_Widget(dlg, "ident.common"));[m
setCommandHandler_Widget(dlg, handleIdentityCreationCommands_);[m
iLabelWidget *scope = findChild_Widget(dlg, "ident.scope");[m
if (argLabel_Command(cmd, "scope")) {[m
[36m@@ -4690,7 +4697,7 @@[m [miBool handleCommand_App(const char *cmd) {[m
}[m
else if (equal_Command(cmd, "ident.switch")) {[m
/* This is different than "ident.signin" in that the currently used identity's activation[m
[31m- URL is used instead of the current one. */ [m
[32m+[m[32m URL is used instead of the current one. */[m
const iString *docUrl = url_DocumentWidget(document_App());[m
const iGmIdentity *cur = identity_DocumentWidget(document_App());[m
iGmIdentity *dst = findIdentity_GmCerts([m
[36m@@ -4779,7 +4786,7 @@[m [miBool handleCommand_App(const char *cmd) {[m
}[m
else {[m
makeSimpleMessage_Widget(uiHeading_ColorEscape "${heading.import.userdata.error}",[m
[31m- format_Lang("${import.userdata.error}", cstr_String(path))); [m
[32m+[m[32m format_Lang("${import.userdata.error}", cstr_String(path)));[m
}[m
delete_Export(export);[m
}[m
text/plain
This content has been proxied by September (ba2dc).