[1mdiff --git a/po/en.po b/po/en.po[m
[1mindex 476ed3f1..cc4a765d 100644[m
[1m--- a/po/en.po[m
[1m+++ b/po/en.po[m
[36m@@ -2639,4 +2639,38 @@[m [mmsgstr "Content:"[m
msgid "snip.accept"[m
msgstr "Save Snippet"[m
[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.url"[m
[32m+[m[32mmsgstr "Enter URL"[m
[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.linkkeys"[m
[32m+[m[32mmsgstr "Open link"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.menu"[m
[32m+[m[32mmsgstr "Context menu"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.menubar"[m
[32m+[m[32mmsgstr "Menubar"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.sidebar"[m
[32m+[m[32mmsgstr "Sidebar"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.tab.new"[m
[32m+[m[32mmsgstr "New tab"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.tab.close"[m
[32m+[m[32mmsgstr "Close tab"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.hover"[m
[32m+[m[32mmsgstr "Focus link"[m
[32m+[m
[32m+[m[32m# Keyboard shortcut for the terminal. Should be very short or abbreviated.[m
[32m+[m[32mmsgid "term.focus"[m
[32m+[m[32mmsgstr "Focus"[m
[1mdiff --git a/res/lang/cs.bin b/res/lang/cs.bin[m
[1mindex 11b3db07..69e51914 100644[m
Binary files a/res/lang/cs.bin and b/res/lang/cs.bin differ
[1mdiff --git a/res/lang/de.bin b/res/lang/de.bin[m
[1mindex de4474ad..f30fc5a9 100644[m
Binary files a/res/lang/de.bin and b/res/lang/de.bin differ
[1mdiff --git a/res/lang/en.bin b/res/lang/en.bin[m
[1mindex 0f65af65..8bbb2026 100644[m
Binary files a/res/lang/en.bin and b/res/lang/en.bin differ
[1mdiff --git a/res/lang/eo.bin b/res/lang/eo.bin[m
[1mindex ab5944c7..857dfe5d 100644[m
Binary files a/res/lang/eo.bin and b/res/lang/eo.bin differ
[1mdiff --git a/res/lang/es.bin b/res/lang/es.bin[m
[1mindex 845a1738..395f14fb 100644[m
Binary files a/res/lang/es.bin and b/res/lang/es.bin differ
[1mdiff --git a/res/lang/es_MX.bin b/res/lang/es_MX.bin[m
[1mindex a89c6e88..7faaa660 100644[m
Binary files a/res/lang/es_MX.bin and b/res/lang/es_MX.bin differ
[1mdiff --git a/res/lang/eu.bin b/res/lang/eu.bin[m
[1mindex 6a4aebfc..8b27e451 100644[m
Binary files a/res/lang/eu.bin and b/res/lang/eu.bin differ
[1mdiff --git a/res/lang/fi.bin b/res/lang/fi.bin[m
[1mindex 05a48ac9..3f1b14f0 100644[m
Binary files a/res/lang/fi.bin and b/res/lang/fi.bin differ
[1mdiff --git a/res/lang/fr.bin b/res/lang/fr.bin[m
[1mindex e770bade..26241003 100644[m
Binary files a/res/lang/fr.bin and b/res/lang/fr.bin differ
[1mdiff --git a/res/lang/gl.bin b/res/lang/gl.bin[m
[1mindex 65e28044..018f8641 100644[m
Binary files a/res/lang/gl.bin and b/res/lang/gl.bin differ
[1mdiff --git a/res/lang/hu.bin b/res/lang/hu.bin[m
[1mindex 35bb3d0d..c368d0fa 100644[m
Binary files a/res/lang/hu.bin and b/res/lang/hu.bin differ
[1mdiff --git a/res/lang/ia.bin b/res/lang/ia.bin[m
[1mindex df40df5e..764728a6 100644[m
Binary files a/res/lang/ia.bin and b/res/lang/ia.bin differ
[1mdiff --git a/res/lang/ie.bin b/res/lang/ie.bin[m
[1mindex 56fffd51..b803de9f 100644[m
Binary files a/res/lang/ie.bin and b/res/lang/ie.bin differ
[1mdiff --git a/res/lang/isv.bin b/res/lang/isv.bin[m
[1mindex 44ab74aa..4a223ab5 100644[m
Binary files a/res/lang/isv.bin and b/res/lang/isv.bin differ
[1mdiff --git a/res/lang/it.bin b/res/lang/it.bin[m
[1mindex aafc26ba..ed8d0f77 100644[m
Binary files a/res/lang/it.bin and b/res/lang/it.bin differ
[1mdiff --git a/res/lang/ja.bin b/res/lang/ja.bin[m
[1mindex 324318b3..39bedf71 100644[m
Binary files a/res/lang/ja.bin and b/res/lang/ja.bin differ
[1mdiff --git a/res/lang/nl.bin b/res/lang/nl.bin[m
[1mindex ed6507ca..3b6718b3 100644[m
Binary files a/res/lang/nl.bin and b/res/lang/nl.bin differ
[1mdiff --git a/res/lang/pl.bin b/res/lang/pl.bin[m
[1mindex 0323b8f1..2ea179ba 100644[m
Binary files a/res/lang/pl.bin and b/res/lang/pl.bin differ
[1mdiff --git a/res/lang/ru.bin b/res/lang/ru.bin[m
[1mindex a0775e00..a7725824 100644[m
Binary files a/res/lang/ru.bin and b/res/lang/ru.bin differ
[1mdiff --git a/res/lang/sk.bin b/res/lang/sk.bin[m
[1mindex 11041074..6414aec7 100644[m
Binary files a/res/lang/sk.bin and b/res/lang/sk.bin differ
[1mdiff --git a/res/lang/sr.bin b/res/lang/sr.bin[m
[1mindex 4bdc4370..8d206933 100644[m
Binary files a/res/lang/sr.bin and b/res/lang/sr.bin differ
[1mdiff --git a/res/lang/tok.bin b/res/lang/tok.bin[m
[1mindex 44647694..8b500280 100644[m
Binary files a/res/lang/tok.bin and b/res/lang/tok.bin differ
[1mdiff --git a/res/lang/tr.bin b/res/lang/tr.bin[m
[1mindex c9a52449..34e69087 100644[m
Binary files a/res/lang/tr.bin and b/res/lang/tr.bin differ
[1mdiff --git a/res/lang/uk.bin b/res/lang/uk.bin[m
[1mindex 21504e85..b58b82dd 100644[m
Binary files a/res/lang/uk.bin and b/res/lang/uk.bin differ
[1mdiff --git a/res/lang/zh_Hans.bin b/res/lang/zh_Hans.bin[m
[1mindex e278e641..be83359f 100644[m
Binary files a/res/lang/zh_Hans.bin and b/res/lang/zh_Hans.bin differ
[1mdiff --git a/res/lang/zh_Hant.bin b/res/lang/zh_Hant.bin[m
[1mindex fbb33027..83010daa 100644[m
Binary files a/res/lang/zh_Hant.bin and b/res/lang/zh_Hant.bin differ
[1mdiff --git a/src/app.c b/src/app.c[m
[1mindex a5e417d2..c4b07d44 100644[m
[1m--- a/src/app.c[m
[1m+++ b/src/app.c[m
[36m@@ -2784,7 +2784,7 @@[m [miBool moveFocusInsideMenu_App(const void *sdlEvent) {[m
}[m
return iTrue;[m
}[m
[31m- else {[m
[32m+[m[32m else if (menu) {[m
setCurrent_Window(window_Widget(focus_Widget()));[m
postCommand_Widget(focus_Widget(), "cancel");[m
}[m
[1mdiff --git a/src/defs.h b/src/defs.h[m
[1mindex bc5e0b95..3746acb0 100644[m
[1m--- a/src/defs.h[m
[1m+++ b/src/defs.h[m
[36m@@ -332,6 +332,10 @@[m [miLocalDef int acceptKeyMod_ReturnKeyBehavior(int behavior) {[m
#endif[m
[m
[32m+[m[32m#if defined (iPlatformDesktop) && !defined (iPlatformTerminal)[m
[32m+[m[32m# define LAGRANGE_MULTIPLE_WINDOWS[m
[32m+[m[32m#endif[m
[32m+[m
/* UI labels that depend on the platform */[m
[m
#if defined (iPlatformMobile)[m
[1mdiff --git a/src/ui/certlistwidget.c b/src/ui/certlistwidget.c[m
[1mindex 9da7fe6a..dbaefeb1 100644[m
[1m--- a/src/ui/certlistwidget.c[m
[1m+++ b/src/ui/certlistwidget.c[m
[36m@@ -120,7 +120,7 @@[m [mstatic void updateContextMenu_CertListWidget_(iCertListWidget *d) {[m
insert_Array(items, insertPos++, &(iMenuItem){ "---", 0, 0, NULL });[m
}[m
iBool usedOnCurrentPage = iFalse;[m
[31m- iConstForEach(StringSet, i, ident->useUrls) { [m
[32m+[m[32m iConstForEach(StringSet, i, ident->useUrls) {[m
const iString *url = i.value;[m
usedOnCurrentPage |= startsWithCase_String(docUrl, cstr_String(url));[m
iRangecc urlStr = range_String(url);[m
[36m@@ -141,8 +141,8 @@[m [mstatic void updateContextMenu_CertListWidget_(iCertListWidget *d) {[m
remove_Array(items, firstIndex);[m
}[m
}[m
[31m- destroy_Widget(d->menu); [m
[31m- d->menu = makeMenu_Widget(as_Widget(d), data_Array(items), size_Array(items)); [m
[32m+[m[32m destroy_Widget(d->menu);[m
[32m+[m[32m d->menu = makeMenu_Widget(as_Widget(d), data_Array(items), size_Array(items));[m
}[m
[m
static void itemClicked_CertListWidget_(iCertListWidget *d, iCertItem *item, size_t itemIndex) {[m
[36m@@ -180,7 +180,7 @@[m [mstatic iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e[m
return iTrue;[m
}[m
else if (isCommand_Widget(w, ev, "ident.use")) {[m
[31m- iGmIdentity *ident = menuIdentity_CertListWidget_(d); [m
[32m+[m[32m iGmIdentity *ident = menuIdentity_CertListWidget_(d);[m
const iString *tabUrl = urlQueryStripped_String(url_DocumentWidget(document_App()));[m
if (ident) {[m
if (argLabel_Command(cmd, "clear")) {[m
[36m@@ -217,7 +217,16 @@[m [mstatic iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e[m
if (ident) {[m
const iString *fps = collect_String([m
hexEncode_Block(collect_Block(fingerprint_TlsCertificate(ident->cert))));[m
[31m- SDL_SetClipboardText(cstr_String(fps));[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m makeMessage_Widget([m
[32m+[m[32m "${ident.fingerprint}",[m
[32m+[m[32m cstr_String(fps),[m
[32m+[m[32m (iMenuItem[]){ { "${dlg.message.ok}", SDLK_RETURN, 0, "message.ok" } },[m
[32m+[m[32m 1);[m
[32m+[m[32m }[m
[32m+[m[32m else {[m
[32m+[m[32m SDL_SetClipboardText(cstr_String(fps));[m
[32m+[m[32m }[m
}[m
return iTrue;[m
}[m
[36m@@ -303,7 +312,7 @@[m [mstatic iBool processEvent_CertListWidget_(iCertListWidget *d, const SDL_Event *e[m
invalidateItem_ListWidget(&d->list, d->contextIndex);[m
}[m
d->contextIndex = hoverItemIndex_ListWidget(&d->list);[m
[31m- updateContextMenu_CertListWidget_(d); [m
[32m+[m[32m updateContextMenu_CertListWidget_(d);[m
/* TODO: Some callback-based mechanism would be nice for updating menus right[m
before they open? At least move these to `updateContextMenu_ */[m
const iGmIdentity *ident = constHoverIdentity_CertListWidget(d);[m
[36m@@ -365,7 +374,7 @@[m [mstatic void draw_CertItem_(const iCertItem *d, iPaint *p, iRect itemRect,[m
bg = uiBackgroundUnfocusedSelection_ColorId;[m
fillRect_Paint(p, itemRect, bg);[m
}[m
[31m-// iInt2 pos = itemRect.pos; [m
[32m+[m[32m// iInt2 pos = itemRect.pos;[m
const int fg = isHover ? (isPressing ? uiTextPressed_ColorId : uiTextFramelessHover_ColorId)[m
: uiTextStrong_ColorId;[m
const iBool isUsedOnDomain = (d->indent != 0);[m
[1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m
[1mindex d48a2fcd..1a547fa7 100644[m
[1m--- a/src/ui/documentwidget.c[m
[1m+++ b/src/ui/documentwidget.c[m
[36m@@ -3154,7 +3154,17 @@[m [mstatic iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)[m
else if (equal_Command(cmd, "server.copycert") && document_App() == d) {[m
const iString *fp = collect_String([m
hexEncode_Block(arg_Command(cmd) ? d->certFullFingerprint : d->certFingerprint));[m
[31m- SDL_SetClipboardText(cstr_String(fp));[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m makeMessage_Widget([m
[32m+[m[32m arg_Command(cmd) ? "${dlg.cert.fingerprint.full}"[m
[32m+[m[32m : "${dlg.cert.fingerprint.pubkey}",[m
[32m+[m[32m cstr_String(fp),[m
[32m+[m[32m (iMenuItem[]){ { "${dlg.message.ok}", SDLK_RETURN, 0, "message.ok" } },[m
[32m+[m[32m 1);[m
[32m+[m[32m }[m
[32m+[m[32m else {[m
[32m+[m[32m SDL_SetClipboardText(cstr_String(fp));[m
[32m+[m[32m }[m
return iTrue;[m
}[m
else if (equal_Command(cmd, "copy") && document_App() == d && !focus_Widget()) {[m
[1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m
[1mindex 66201119..355486de 100644[m
[1m--- a/src/ui/inputwidget.c[m
[1m+++ b/src/ui/inputwidget.c[m
[36m@@ -396,7 +396,7 @@[m [mstatic iRect contentBounds_InputWidget_(const iInputWidget *d) {[m
iRect bounds = adjusted_Rect(bounds_Widget(w),[m
addX_I2(padding_(), d->leftPadding),[m
neg_I2(addX_I2(padding_(), d->rightPadding)));[m
[31m- shrink_Rect(&bounds, init_I2(gap_UI * (flags_Widget(w) & tight_WidgetFlag ? 1 : 2), 0));[m
[32m+[m[32m shrink_Rect(&bounds, init_I2(gap_UI * (flags_Widget(w) & tight_WidgetFlag ? 1 : 2) * aspect_UI, 0));[m
bounds.pos.y += padding_().y / 2;[m
if (flags_Widget(w) & extraPadding_WidgetFlag) {[m
if (d->sysCtrl && !cmp_String(id_Widget(w), "url")) {[m
[1mdiff --git a/src/ui/root.c b/src/ui/root.c[m
[1mindex ddba9aa2..22289366 100644[m
[1m--- a/src/ui/root.c[m
[1m+++ b/src/ui/root.c[m
[36m@@ -415,6 +415,64 @@[m [mstatic iBool isBookmarkFolder_(void *context, const iBookmark *bm) {[m
return isFolder_Bookmark(bm);[m
}[m
[m
[32m+[m[32mstatic size_t visibleSize_String(const iString *d) {[m
[32m+[m[32m size_t n = 0;[m
[32m+[m[32m iConstForEach(String, i, d) {[m
[32m+[m[32m if (i.value == '\v') {[m
[32m+[m[32m next_StringConstIterator(&i); /* skip escape */[m
[32m+[m[32m continue;[m
[32m+[m[32m }[m
[32m+[m[32m n += width_Char(i.value);[m
[32m+[m[32m }[m
[32m+[m[32m return n;[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mstatic void formatShortcut_(iString *d, int maxLen, const char *label, int key, int mods) {[m
[32m+[m[32m iString str;[m
[32m+[m[32m init_String(&str);[m
[32m+[m[32m iString keyStr;[m
[32m+[m[32m init_String(&keyStr);[m
[32m+[m[32m toString_Sym(key, mods, &keyStr);[m
[32m+[m[32m if (!isEmpty_String(d)) {[m
[32m+[m[32m appendCStr_String(&str, " ");[m
[32m+[m[32m }[m
[32m+[m[32m appendFormat_String(&str,[m
[32m+[m[32m "%s%s%s %s",[m
[32m+[m[32m escape_Color(uiTextShortcut_ColorId),[m
[32m+[m[32m cstr_String(&keyStr),[m
[32m+[m[32m uiText_ColorEscape,[m
[32m+[m[32m label);[m
[32m+[m[32m if (visibleSize_String(d) + visibleSize_String(&str) <= maxLen) {[m
[32m+[m[32m append_String(d, &str);[m
[32m+[m[32m }[m
[32m+[m[32m deinit_String(&keyStr);[m
[32m+[m[32m deinit_String(&str);[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mstatic void updateTerminalStatus_(iLabelWidget *term) {[m
[32m+[m[32m const iBinding *bind;[m
[32m+[m[32m iString *str = new_String();[m
[32m+[m[32m const int maxLen = width_Widget(root_Widget(as_Widget(term))) - 2;[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.url}", SDLK_RETURN, 0);[m
[32m+[m[32m bind = findCommand_Keys("document.linkkeys arg:1");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.linkkeys}", bind->key, bind->mods);[m
[32m+[m[32m bind = findCommand_Keys("contextkey");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.menu}", bind->key, bind->mods);[m
[32m+[m[32m bind = findCommand_Keys("menubar.focus");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.menubar}", bind->key, bind->mods);[m
[32m+[m[32m formatShortcut_(str, maxLen, "${cancel}", 'g', KMOD_CTRL);[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.focus}", SDLK_TAB, 0);[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.sidebar}", leftSidebar_KeyShortcut);[m
[32m+[m[32m bind = findCommand_Keys("tabs.new append:1");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.tab.new}", bind->key, bind->mods);[m
[32m+[m[32m bind = findCommand_Keys("tabs.close");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.tab.close}", bind->key, bind->mods);[m
[32m+[m[32m bind = findCommand_Keys("document.linkkeys arg:1 hover:1");[m
[32m+[m[32m formatShortcut_(str, maxLen, "${term.hover}", bind->key, bind->mods);[m
[32m+[m[32m updateText_LabelWidget(term, str);[m
[32m+[m[32m delete_String(str);[m
[32m+[m[32m}[m
[32m+[m
iBool handleRootCommands_Widget(iWidget *root, const char *cmd) {[m
iUnused(root);[m
if (equal_Command(cmd, "menu.open")) {[m
[36m@@ -527,9 +585,26 @@[m [miBool handleRootCommands_Widget(iWidget *root, const char *cmd) {[m
if (menubar) {[m
setFocus_Widget(child_Widget(menubar, prefs_App()->recentMenuBarIndex));[m
postCommand_Widget(focus_Widget(), "trigger");[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m setFlags_Widget(findChild_Widget(root, "termstatus"), hidden_WidgetFlag, iTrue);[m
[32m+[m[32m }[m
}[m
return iTrue;[m
}[m
[32m+[m[32m else if (isTerminal_Platform() && equal_Command(cmd, "focus.gained")) {[m
[32m+[m[32m if (!cmp_String(id_Widget(parent_Widget(focus_Widget())), "menubar")) {[m
[32m+[m[32m setFlags_Widget(findChild_Widget(root, "termstatus"), hidden_WidgetFlag, iTrue);[m
[32m+[m[32m }[m
[32m+[m[32m return iFalse;[m
[32m+[m[32m }[m
[32m+[m[32m else if (isTerminal_Platform() && equal_Command(cmd, "menu.closed")) {[m
[32m+[m[32m if (!focus_Widget()) {[m
[32m+[m[32m iLabelWidget *status = findChild_Widget(root, "termstatus");[m
[32m+[m[32m setFlags_Widget(as_Widget(status), hidden_WidgetFlag, iFalse);[m
[32m+[m[32m updateTerminalStatus_(status);[m
[32m+[m[32m }[m
[32m+[m[32m return iFalse;[m
[32m+[m[32m }[m
else if (equal_Command(cmd, "input.resized")) {[m
/* No parent handled this, so do a full rearrangement. */[m
/* TODO: Defer this and do a single rearrangement later. */[m
[36m@@ -591,6 +666,9 @@[m [miBool handleRootCommands_Widget(iWidget *root, const char *cmd) {[m
return iTrue;[m
}[m
else if (equal_Command(cmd, "window.resized")) {[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m updateTerminalStatus_(findWidget_Root("termstatus"));[m
[32m+[m[32m }[m
iSidebarWidget *sidebar = findChild_Widget(root, "sidebar");[m
iSidebarWidget *sidebar2 = findChild_Widget(root, "sidebar2");[m
if (deviceType_App() != phone_AppDeviceType) {[m
[36m@@ -889,7 +967,7 @@[m [mstatic void updateUrlInputContentPadding_(iWidget *navBar) {[m
const int indicatorsWidth = width_Widget(findChild_Widget(navBar, "url.rightembed"));[m
/* The indicators widget has a padding that covers the urlButtons area. */[m
setContentPadding_InputWidget(url,[m
[31m- lockWidth - 2 * gap_UI, // * 0.75f,[m
[32m+[m[32m isTerminal_Platform() ? lockWidth : (lockWidth - 2 * gap_UI),[m
indicatorsWidth);[m
}[m
[m
[36m@@ -1490,6 +1568,8 @@[m [mvoid updateMetrics_Root(iRoot *d) {[m
setFixedSize_Widget(appIcon, init_I2(appIconSize_Root(), appMin->rect.size.y));[m
}[m
iWidget *navBar = findChild_Widget(d->widget, "navbar");[m
[32m+[m[32m iWidget *menuBar = findChild_Widget(d->widget, "menubar");[m
[32m+[m[32m iWidget *termStatus = findChild_Widget(d->widget, "termstatus");[m
iWidget *url = findChild_Widget(d->widget, "url");[m
iWidget *rightEmbed = findChild_Widget(navBar, "url.rightembed");[m
iWidget *embedPad = findChild_Widget(navBar, "url.embedpad");[m
[36m@@ -1505,6 +1585,9 @@[m [mvoid updateMetrics_Root(iRoot *d) {[m
if (navBar) {[m
updateUrlInputContentPadding_(navBar);[m
}[m
[32m+[m[32m if (termStatus) {[m
[32m+[m[32m setFixedSize_Widget(menuBar, menuBar->rect.size);[m
[32m+[m[32m }[m
if (idName) {[m
setFixedSize_Widget(as_Widget(idName),[m
init_I2(-1, 2 * gap_UI + lineHeight_Text(uiLabelTiny_FontId)));[m
[36m@@ -1534,8 +1617,9 @@[m [mstatic iBool updateWindowMenu_(iWidget *menuBarItem, const char *cmd) {[m
/* Remove the old dynamic window list items first. See `windowMenuItems_` in window.c[m
for the fixed list. */[m
iWidget *menu = findChild_Widget(menuBarItem, "menu");[m
[31m- while (childCount_Widget(menu) > 9) {[m
[31m- destroy_Widget(removeChild_Widget(menu, child_Widget(menu, 9)));[m
[32m+[m[32m const size_t numFixedItems = numWindowMenuItems_Window() + 1;[m
[32m+[m[32m while (childCount_Widget(menu) > numFixedItems) {[m
[32m+[m[32m destroy_Widget(removeChild_Widget(menu, child_Widget(menu, numFixedItems)));[m
}[m
iArray winItems;[m
init_Array(&winItems, sizeof(iMenuItem));[m
[36m@@ -1736,16 +1820,19 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m
/* TODO: Use Widget's `updateMenuItems` callback. */[m
setCommandHandler_Widget(child_Widget(menuBar, 5), updateWindowMenu_);[m
setId_Widget(menuBar, "menubar");[m
[31m-# if 0[m
[31m- addChildFlags_Widget(menuBar, iClob(new_Widget()), expand_WidgetFlag);[m
[31m- /* It's nice to use this space for something, but it should be more valuable than[m
[31m- just the app version... */[m
[31m- iLabelWidget *ver = addChildFlags_Widget(menuBar, iClob(new_LabelWidget(LAGRANGE_APP_VERSION, NULL)),[m
[31m- frameless_WidgetFlag);[m
[31m- setTextColor_LabelWidget(ver, uiAnnotation_ColorId);[m
[31m-# endif[m
}[m
#endif[m
[32m+[m[32m /* Terminal status/help indicator. */[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m iWidget *termStatus =[m
[32m+[m[32m addChildFlags_Widget(div,[m
[32m+[m[32m iClob(new_LabelWidget("", NULL)),[m
[32m+[m[32m fixedPosition_WidgetFlag | fixedHeight_WidgetFlag |[m
[32m+[m[32m resizeToParentWidth_WidgetFlag);[m
[32m+[m[32m setBackgroundColor_Widget(termStatus, uiBackground_ColorId);[m
[32m+[m[32m updateTerminalStatus_((iLabelWidget *) termStatus);[m
[32m+[m[32m setId_Widget(termStatus, "termstatus");[m
[32m+[m[32m }[m
iWidget *navBar;[m
/* Navigation bar. */ {[m
navBar = new_Widget();[m
[1mdiff --git a/src/ui/util.c b/src/ui/util.c[m
[1mindex 4c2c3bf8..3cacc019 100644[m
[1m--- a/src/ui/util.c[m
[1m+++ b/src/ui/util.c[m
[36m@@ -2783,10 +2783,14 @@[m [mstatic iBool messageHandler_(iWidget *msg, const char *cmd) {[m
equal_Command(cmd, "theme.changed") ||[m
equal_Command(cmd, "focus.lost") ||[m
equal_Command(cmd, "focus.gained") ||[m
[32m+[m[32m equal_Command(cmd, "menu.open") ||[m
[32m+[m[32m equal_Command(cmd, "menu.opened") ||[m
equal_Command(cmd, "menu.closed") ||[m
[32m+[m[32m startsWith_CStr(cmd, "cancel menu:") ||[m
startsWith_CStr(cmd, "feeds.update.") ||[m
startsWith_CStr(cmd, "window."))) {[m
[31m- //printf("message dismissed by: %s\n", cmd); fflush(stdout);[m
[32m+[m[32m // printf("message dismissed by: %s\n", cmd); fflush(stdout);[m
[32m+[m[32m // SDL_Delay(5000);[m
setupSheetTransition_Mobile(msg, dialogTransitionDir_Widget(msg));[m
destroy_Widget(msg);[m
}[m
[36m@@ -3994,6 +3998,9 @@[m [mconst iArray *makeBookmarkFolderActions_MenuItem(const char *command, iBool with[m
}[m
[m
void enableResizing_Widget(iWidget *d, int minWidth, const char *resizeId) {[m
[32m+[m[32m if (isTerminal_Platform()) {[m
[32m+[m[32m return; /* cannot grab edges */[m
[32m+[m[32m }[m
if (deviceType_App() == desktop_AppDeviceType) {[m
iChangeFlags(d->flags, arrangeWidth_WidgetFlag, iFalse);[m
d->flags2 |= horizontallyResizable_WidgetFlag2;[m
[36m@@ -4138,7 +4145,7 @@[m [miWidget *makeBookmarkEditor_Widget(uint32_t folderId, iBool withDup) {[m
addDialogToggle_(headings, values, "${bookmark.tag.linksplit}:", "bmed.tag.linksplit");[m
}[m
arrange_Widget(dlg);[m
[31m- const int inputWidth = 100 * gap_UI - headings->rect.size.x;[m
[32m+[m[32m const int inputWidth = iMin(100 * gap_UI, width_Rect(rect_Root(dlg->root))) - headings->rect.size.x;[m
for (int i = 0; i < 4; ++i) {[m
if (inputs[i]) {[m
as_Widget(inputs[i])->rect.size.x = inputWidth;[m
text/plain
This content has been proxied by September (ba2dc).