=> 26330fd2ea529ce1e1a5774149870f97226faee7
[1mdiff --git a/src/app.c b/src/app.c[m [1mindex cedbdbd0..29faa161 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -4989,6 +4989,14 @@[m [miBool handleCommand_App(const char *cmd) {[m }[m return iTrue;[m }[m [32m+[m[32m else if (equal_Command(cmd, "snippet.add")) {[m [32m+[m[32m iWidget *dlg = makeSnippetCreation_Widget();[m [32m+[m[32m if (hasLabel_Command(cmd, "content")) {[m [32m+[m[32m setTextCStr_InputWidget(findChild_Widget(dlg, "snip.content"),[m [32m+[m[32m suffixPtr_Command(cmd, "content"));[m [32m+[m[32m }[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m else {[m return iFalse;[m }[m [1mdiff --git a/src/defs.h b/src/defs.h[m [1mindex fd916845..20898327 100644[m [1m--- a/src/defs.h[m [1m+++ b/src/defs.h[m [36m@@ -270,6 +270,7 @@[m [miLocalDef int acceptKeyMod_ReturnKeyBehavior(int behavior) {[m #define unhappy_Icon "\U0001f641"[m #define globe_Icon "\U0001f310"[m #define envelope_Icon "\U0001f4e7"[m [32m+[m[32m#define hammer_Icon "\U0001f528"[m #define magnifyingGlass_Icon "\U0001f50d"[m #define midEllipsis_Icon "\u2022\u2022\u2022"[m #define return_Icon "\u23ce"[m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex c15164a9..4229989d 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -2026,12 +2026,56 @@[m [mstatic iBool setUrl_DocumentWidget_(iDocumentWidget *d, const iString *url) {[m return iFalse;[m }[m [m [31m-static void updateInputPromptMenuItems_(iWidget *menu) {[m [31m- setMenuItemLabelByIndex_Widget(menu,[m [31m- 2,[m [31m- !isPromptUrl_SiteSpec(&menu->data)[m [31m- ? "${menu.input.setprompt}"[m [31m- : "${menu.input.unsetprompt}");[m [32m+[m[32mstatic const iArray *updateInputPromptMenuItems_(iWidget *menu) {[m [32m+[m[32m const char *context = cstr_String(&menu->data);[m [32m+[m[32m const iWidget *buttons = pointerLabel_Command(context, "buttons");[m [32m+[m[32m const iString *url = string_Command(context, "url");[m [32m+[m[32m const char *precedingLine = suffixPtr_Command(context, "preceding");[m [32m+[m[32m const iBinding *bind = findCommand_Keys("input.precedingline");[m [32m+[m[32m /* Compose new menu items. */[m [32m+[m[32m iArray *items = collectNew_Array(sizeof(iMenuItem));[m [32m+[m[32m pushBackN_Array([m [32m+[m[32m items,[m [32m+[m[32m (iMenuItem[]){[m [32m+[m[32m { "${menu.input.precedingline}",[m [32m+[m[32m bind->key,[m [32m+[m[32m bind->mods,[m [32m+[m[32m format_CStr("!valueinput.set ptr:%p text:%s", buttons, precedingLine) },[m [32m+[m[32m { "---" },[m [32m+[m[32m { !isPromptUrl_SiteSpec(url) ? "${menu.input.setprompt}" : "${menu.input.unsetprompt}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!prompturl.toggle url:%s", cstr_String(url)) } },[m [32m+[m[32m 3);[m [32m+[m[32m /* Recently submitted input texts can be restored. */ {[m [32m+[m[32m const iStringArray *recentInput = recentlySubmittedInput_App();[m [32m+[m[32m if (!isEmpty_StringArray(recentInput)) {[m [32m+[m[32m pushBack_Array(items, &(iMenuItem){ "---" });[m [32m+[m[32m pushBack_Array(items,[m [32m+[m[32m &(iMenuItem){ "${menu.input.clear}", 0, 0, "!recentinput.clear" });[m [32m+[m[32m pushBack_Array(items, &(iMenuItem){ "```${menu.input.restore}" });[m [32m+[m[32m iReverseConstForEach(StringArray, i, recentInput) {[m [32m+[m[32m iString *label = collect_String(copy_String(i.value));[m [32m+[m[32m replace_String(label, "\n\n", " ");[m [32m+[m[32m replace_String(label, "\n", " ");[m [32m+[m[32m trim_String(label);[m [32m+[m[32m const size_t maxLen = 45;[m [32m+[m[32m if (length_String(label) > maxLen) {[m [32m+[m[32m truncate_String(label, maxLen);[m [32m+[m[32m trim_String(label);[m [32m+[m[32m appendCStr_String(label, "...");[m [32m+[m[32m }[m [32m+[m[32m pushBack_Array(items,[m [32m+[m[32m &(iMenuItem){ cstr_String(label),[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!valueinput.set ptr:%p text:%s",[m [32m+[m[32m buttons,[m [32m+[m[32m cstr_String(i.value)) });[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m return items;[m }[m [m iWidget *makeInputPrompt_DocumentWidget(iDocumentWidget *d, const iString *url, iBool isSensitive,[m [36m@@ -2080,55 +2124,21 @@[m [miWidget *makeInputPrompt_DocumentWidget(iDocumentWidget *d, const iString *url,[m addChildPos_Widget(buttons, iClob(lineBreak), front_WidgetAddPos);[m }[m /* Menu for additional actions, past entries. */ {[m [31m- const iBinding *bind = findCommand_Keys("input.precedingline");[m [31m- iArray *items = collectNew_Array(sizeof(iMenuItem));[m [31m- pushBackN_Array([m [31m- items,[m [31m- (iMenuItem[]){[m [31m- { "${menu.input.precedingline}",[m [31m- bind->key,[m [31m- bind->mods,[m [31m- format_CStr("!valueinput.set ptr:%p text:%s",[m [31m- buttons,[m [31m- cstr_String(&d->linePrecedingLink)) },[m [31m- { "---" },[m [31m- { "", 0, 0, format_CStr("!prompturl.toggle url:%s", cstr_String(url)) } },[m [31m- 3);[m [31m- /* Recently submitted input texts can be restored. */ {[m [31m- const iStringArray *recentInput = recentlySubmittedInput_App();[m [31m- if (!isEmpty_StringArray(recentInput)) {[m [31m- pushBack_Array(items, &(iMenuItem){ "---" });[m [31m- pushBack_Array(items,[m [31m- &(iMenuItem){ "${menu.input.clear}", 0, 0, "!recentinput.clear" });[m [31m- pushBack_Array(items, &(iMenuItem){ "```${menu.input.restore}" });[m [31m- iReverseConstForEach(StringArray, i, recentInput) {[m [31m- iString *label = collect_String(copy_String(i.value));[m [31m- replace_String(label, "\n\n", " ");[m [31m- replace_String(label, "\n", " ");[m [31m- trim_String(label);[m [31m- const size_t maxLen = 45;[m [31m- if (length_String(label) > maxLen) {[m [31m- truncate_String(label, maxLen);[m [31m- trim_String(label);[m [31m- appendCStr_String(label, "...");[m [31m- }[m [31m- pushBack_Array(items,[m [31m- &(iMenuItem){ cstr_String(label),[m [31m- 0,[m [31m- 0,[m [31m- format_CStr("!valueinput.set ptr:%p text:%s",[m [31m- buttons,[m [31m- cstr_String(i.value)) });[m [31m- }[m [31m- }[m [31m- }[m [32m+[m iLabelWidget *ellipsisButton =[m [31m- makeMenuButton_LabelWidget(midEllipsis_Icon, data_Array(items), size_Array(items));[m [31m- /* When opening, update the items to reflect the site-specific settings. */ {[m [31m- iWidget *menu = findChild_Widget(as_Widget(ellipsisButton), "menu");[m [31m- menu->updateMenuItems = updateInputPromptMenuItems_;[m [31m- set_String(&menu->data, url); /* needed when updating items */[m [31m- }[m [32m+[m[32m makeMenuButton_LabelWidget(midEllipsis_Icon, NULL, 0);[m [32m+[m[32m iWidget *menu = findChild_Widget(as_Widget(ellipsisButton), "menu");[m [32m+[m[32m /* When opening, update the items to reflect the site-specific settings. */[m [32m+[m[32m menu->updateMenuItems = updateInputPromptMenuItems_;[m [32m+[m[32m set_String(&menu->data,[m [32m+[m[32m collectNewFormat_String("context buttons:%p url:%s preceding:%s",[m [32m+[m[32m buttons,[m [32m+[m[32m cstr_String(canonicalUrl_String(url)),[m [32m+[m[32m cstr_String(&d->linePrecedingLink)));[m [32m+[m[32m // iWidget *menu = findChild_Widget(as_Widget(ellipsisButton), "menu");[m [32m+[m[32m // menu->updateMenuItems = updateInputPromptMenuItems_;[m [32m+[m[32m // set_String(&menu->data, url); /* needed when updating items */[m [32m+[m[32m //}[m if (deviceType_App() == desktop_AppDeviceType) {[m addChildPos_Widget(buttons, iClob(ellipsisButton), front_WidgetAddPos);[m }[m [36m@@ -4162,17 +4172,15 @@[m [mstatic iWidget *makeLinkContextMenu_DocumentWidget_(iDocumentWidget *d, const iG[m (iMenuItem[]){[m { "---" },[m { "${link.copy}", 0, 0, "document.copylink" },[m [31m- { bookmark_Icon " ${link.bookmark}",[m [31m- 0,[m [31m- 0,[m [31m- format_CStr([m [31m- "!bookmark.add title:%s url:%s", cstr_String(linkLabel), cstr_String(linkUrl)) },[m [32m+[m[32m { bookmark_Icon " ${link.bookmark}", 0, 0,[m [32m+[m[32m format_CStr("!bookmark.add title:%s url:%s", cstr_String(linkLabel), cstr_String(linkUrl)) },[m [32m+[m[32m { clipboard_Icon " ${link.snippet}", 0, 0,[m [32m+[m[32m format_CStr("!snippet.add content:%s", cstr_String(linkUrl)) },[m { "---" },[m [31m- { magnifyingGlass_Icon " ${link.searchurl}",[m [31m- 0, 0,[m [32m+[m[32m { magnifyingGlass_Icon " ${link.searchurl}", 0, 0,[m format_CStr("!searchurl address:%s", cstr_String(linkUrl)) },[m },[m [31m- 5);[m [32m+[m[32m 6);[m if (isNative && link->mediaType != download_MediaType && !equalCase_Rangecc(scheme, "file")) {[m pushBackN_Array(items,[m (iMenuItem[]){[m [36m@@ -4411,13 +4419,14 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m &items,[m (iMenuItem[]){[m { "${menu.copy}", 0, 0, "copy" },[m [31m- { "${menu.search}",[m [31m- 0,[m [31m- 0,[m [32m+[m[32m { "${menu.search}", 0, 0,[m format_CStr("search newtab:1 query:%s",[m cstr_String(selectedText_DocumentWidget_(d))) },[m [32m+[m[32m { "${menu.snippet.add}", 0, 0,[m [32m+[m[32m format_CStr("!snippet.add content:%s",[m [32m+[m[32m cstr_String(selectedText_DocumentWidget_(d))) },[m { "---", 0, 0, NULL } },[m [31m- 3);[m [32m+[m[32m 4);[m }[m #if defined (iPlatformApple) && defined (LAGRANGE_ENABLE_MAC_MENUS)[m pushBackN_Array([m [36m@@ -4444,27 +4453,23 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m (iMenuItem[]){[m { "---" },[m { reload_Icon " ${menu.reload}", reload_KeyShortcut, "navigate.reload" },[m [31m- { timer_Icon " ${menu.autoreload}", 0, 0, "document.autoreload.menu" },[m { "---" },[m { bookmark_Icon " ${menu.page.bookmark}", bookmarkPage_KeyShortcut, "bookmark.add" },[m { star_Icon " ${menu.page.subscribe}", subscribeToPage_KeyShortcut, "feeds.subscribe" },[m { "---" },[m [31m- { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" },[m [31m- { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" },[m [31m- { "${menu.page.upload.edit}", 0, 0, "document.upload copy:1" },[m [31m- { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" },[m { d->flags & viewSource_DocumentWidgetFlag ? "${menu.viewformat.gemini}"[m : "${menu.viewformat.plain}",[m 0, 0, "document.viewformat" },[m [32m+[m[32m { hammer_Icon " ${menu.tools}", 0, 0, "submenu id:toolsmenu" },[m { "---" },[m { "${menu.page.copyurl}", 0, 0, "document.copylink" }, },[m [31m- 14);[m [32m+[m[32m 10);[m if (isEmpty_Range(&d->selectMark)) {[m pushBackN_Array([m &items,[m (iMenuItem[]){[m [31m- { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" },[m [31m- { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } },[m [32m+[m[32m { "${menu.page.copysource}", 'c', KMOD_PRIMARY, "copy" },[m [32m+[m[32m { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" } },[m 2);[m }[m }[m [36m@@ -4479,7 +4484,7 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m { "${menu.select.par}", 0, 0, "document.select arg:3" },[m },[m 3);[m [31m- #endif[m [32m+[m[32m#endif[m postCommand_Root(w->root, "document.select arg:1");[m return iTrue;[m }[m [1mdiff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c[m [1mindex 962376ee..bf68bfc1 100644[m [1m--- a/src/ui/inputwidget.c[m [1m+++ b/src/ui/inputwidget.c[m [36m@@ -1868,7 +1868,7 @@[m [mstatic void markWordAtCursor_InputWidget_(iInputWidget *d) {[m }[m [m static void showClipMenu_InputWidget_(const iInputWidget *d, iInt2 coord) {[m [31m- iWidget *clipMenu = findWidget_App("clipmenu");[m [32m+[m[32m iWidget *clipMenu = findChild_Widget(root_Widget(constAs_Widget(d)), "clipmenu");[m if (isVisible_Widget(clipMenu)) {[m closeMenu_Widget(clipMenu);[m }[m [36m@@ -2379,6 +2379,13 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m copy_InputWidget_(d, argLabel_Command(command_UserEvent(ev), "cut"));[m return iTrue;[m }[m [32m+[m[32m else if (isCommand_UserEvent(ev, "input.delete") && isEditing_InputWidget_(d)) {[m [32m+[m[32m pushUndo_InputWidget_(d);[m [32m+[m[32m if (deleteMarked_InputWidget_(d)) {[m [32m+[m[32m contentsWereChanged_InputWidget_(d);[m [32m+[m[32m }[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m // else if (isFocused_Widget(d) && isCommand_UserEvent(ev, "copy")) {[m // copy_InputWidget_(d, iFalse);[m // return iTrue;[m [36m@@ -2419,6 +2426,10 @@[m [mstatic iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {[m selectAll_InputWidget(d);[m return iTrue;[m }[m [32m+[m[32m else if (isCommand_UserEvent(ev, "input.deselect") && isEditing_InputWidget_(d)) {[m [32m+[m[32m deselect_InputWidget(d);[m [32m+[m[32m return iTrue;[m [32m+[m[32m }[m else if (isCommand_UserEvent(ev, "theme.changed")) {[m if (d->buffered) {[m d->inFlags |= needUpdateBuffer_InputWidgetFlag;[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 228bc39f..afbcd29a 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -65,14 +65,12 @@[m [mstatic const iMenuItem desktopNavMenuItems_[] = {[m { "---" },[m { leftHalf_Icon " ${menu.sidebar.left}", leftSidebar_KeyShortcut, "sidebar.toggle" },[m { rightHalf_Icon " ${menu.sidebar.right}", rightSidebar_KeyShortcut, "sidebar2.toggle" },[m [31m- { "${menu.view.split}", SDLK_j, KMOD_PRIMARY, "submenu id:splitmenu" },[m { "${menu.zoom.in}", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" },[m { "${menu.zoom.out}", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" },[m { "${menu.zoom.reset}", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" },[m [32m+[m[32m { "${menu.view.split}", SDLK_j, KMOD_PRIMARY, "submenu id:splitmenu" },[m { "---" },[m [31m- { "${menu.feeds.entrylist}", 0, 0, "!open url:about:feeds" },[m [31m- { "${menu.downloads}", 0, 0, "downloads.open" },[m [31m- { export_Icon " ${menu.export}", 0, 0, "export" },[m [32m+[m[32m { package_Icon " ${menu.userdata}", 0, 0, "submenu id:userdatamenu" },[m { "---" },[m { gear_Icon " ${menu.preferences}", preferences_KeyShortcut, "preferences" },[m #if defined (LAGRANGE_ENABLE_WINSPARKLE)[m [36m@@ -85,6 +83,19 @@[m [mstatic const iMenuItem desktopNavMenuItems_[] = {[m { NULL }[m };[m [m [32m+[m[32mstatic const iMenuItem userDataMenuItems_[] = {[m [32m+[m[32m { "${menu.bookmarks.list}", 0, 0, "!open url:about:bookmarks" },[m [32m+[m[32m { "${menu.bookmarks.bytag}", 0, 0, "!open url:about:bookmarks?tags" },[m [32m+[m[32m { "${menu.bookmarks.bytime}", 0, 0, "!open url:about:bookmarks?created" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { "${menu.feeds.entrylist}", 0, 0, "!open url:about:feeds" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { "${menu.downloads}", 0, 0, "downloads.open" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { "${menu.export}", 0, 0, "export" },[m [32m+[m[32m { NULL }[m [32m+[m[32m};[m [32m+[m static const iMenuItem tabletNavMenuItems_[] = {[m { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new append:1" },[m { folder_Icon " ${menu.openfile}", SDLK_o, KMOD_PRIMARY, "file.open" },[m [36m@@ -1566,6 +1577,43 @@[m [mstatic iBool updateMobilePageMenuItems_(iWidget *menu, const char *cmd) {[m return handleMenuCommand_Widget(menu, cmd);[m }[m [m [32m+[m[32mvoid createClipMenu_Root(iRoot *d) {[m [32m+[m[32m iWidget *clipMenu = makeMenu_Widget(d->widget,[m [32m+[m[32m#if defined (iPlatformMobile)[m [32m+[m[32m (iMenuItem[]){[m [32m+[m[32m { ">>>" scissor_Icon " ${menu.cut}", 0, 0, "input.copy cut:1" },[m [32m+[m[32m { ">>>" clipCopy_Icon " ${menu.copy}", 0, 0, "input.copy" },[m [32m+[m[32m { ">>>" clipboard_Icon " ${menu.paste}", 0, 0, "input.paste" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { ">>>" delete_Icon " " uiTextCaution_ColorEscape "${menu.delete}", 0, 0, "input.delete" },[m [32m+[m[32m { ">>>" select_Icon " ${menu.selectall}", 0, 0, "input.selectall" },[m [32m+[m[32m { ">>>" undo_Icon " ${menu.undo}", 0, 0, "input.undo" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { "${menu.paste.snippet}", 0, 0, "snippetmenu" },[m [32m+[m[32m }, 9);[m [32m+[m[32m#else[m [32m+[m[32m (iMenuItem[]){[m [32m+[m[32m { scissor_Icon " ${menu.cut}", 0, 0, "input.copy cut:1" },[m [32m+[m[32m { clipCopy_Icon " ${menu.copy}", 0, 0, "input.copy" },[m [32m+[m[32m { clipboard_Icon " ${menu.paste}", 0, 0, "input.paste" },[m [32m+[m[32m { return_Icon " ${menu.paste.go}", 0, 0, "input.paste enter:1" },[m [32m+[m[32m { "${menu.paste.snippet}", 0, 0, "submenu id:snippetmenu" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { delete_Icon " " uiTextCaution_ColorEscape "${menu.delete}", 0, 0, "input.delete" },[m [32m+[m[32m { undo_Icon " ${menu.undo}", 0, 0, "input.undo" },[m [32m+[m[32m { "---" },[m [32m+[m[32m { select_Icon " ${menu.selectall}", 0, 0, "input.selectall" },[m [32m+[m[32m }, 10);[m [32m+[m[32m#endif[m [32m+[m[32m setId_Widget(clipMenu, "clipmenu");[m [32m+[m[32m if (deviceType_App() == phone_AppDeviceType) {[m [32m+[m[32m /* Small screen; conserve space by removing the Cancel item. */[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [32m+[m[32m }[m [32m+[m[32m}[m [32m+[m void recreateSnippetMenu_Root(iRoot *d) {[m const iStringArray *snipNames = names_Snippets();[m iArray *items = collectNew_Array(sizeof(iMenuItem));[m [36m@@ -1868,6 +1916,8 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m home_Icon, 0, 0, "navigate.home")),[m collapse_WidgetFlag),[m "navbar.action4");[m [32m+[m[32m setId_Widget(makeMenu_Widget(root, userDataMenuItems_, iElemCount(userDataMenuItems_)),[m [32m+[m[32m "userdatamenu");[m #if !defined (LAGRANGE_MAC_MENUBAR)[m /* Hamburger menu. */ {[m iLabelWidget *navMenu = makeMenuButton_LabelWidget([m [36m@@ -2076,40 +2126,8 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m { rightHalf_Icon " ${menu.sidebar.right}", 0, 0, "sidebar2.toggle" },[m },[m deviceType_App() == phone_AppDeviceType ? 1 : 2);[m [31m- iWidget *clipMenu = makeMenu_Widget(root,[m [31m-#if defined (iPlatformMobile)[m [31m- (iMenuItem[]){[m [31m- { ">>>" scissor_Icon " ${menu.cut}", 0, 0, "input.copy cut:1" },[m [31m- { ">>>" clipCopy_Icon " ${menu.copy}", 0, 0, "input.copy" },[m [31m- { ">>>" clipboard_Icon " ${menu.paste}", 0, 0, "input.paste" },[m [31m- { "---" },[m [31m- { ">>>" delete_Icon " " uiTextCaution_ColorEscape "${menu.delete}", 0, 0, "input.delete" },[m [31m- { ">>>" select_Icon " ${menu.selectall}", 0, 0, "input.selectall" },[m [31m- { ">>>" undo_Icon " ${menu.undo}", 0, 0, "input.undo" },[m [31m- { "---" },[m [31m- { "${menu.paste.snippet}", 0, 0, "snippetmenu" },[m [31m- }, 9);[m [31m-#else[m [31m- (iMenuItem[]){[m [31m- { scissor_Icon " ${menu.cut}", 0, 0, "input.copy cut:1" },[m [31m- { clipCopy_Icon " ${menu.copy}", 0, 0, "input.copy" },[m [31m- { clipboard_Icon " ${menu.paste}", 0, 0, "input.paste" },[m [31m- { return_Icon " ${menu.paste.go}", 0, 0, "input.paste enter:1" },[m [31m- { "${menu.paste.snippet}", 0, 0, "submenu id:snippetmenu" },[m [31m- { "---" },[m [31m- { delete_Icon " " uiTextCaution_ColorEscape "${menu.delete}", 0, 0, "input.delete" },[m [31m- { undo_Icon " ${menu.undo}", 0, 0, "input.undo" },[m [31m- { "---" },[m [31m- { select_Icon " ${menu.selectall}", 0, 0, "input.selectall" },[m [31m- }, 10);[m [31m-#endif[m [32m+[m[32m createClipMenu_Root(d);[m recreateSnippetMenu_Root(d);[m [31m- if (deviceType_App() == phone_AppDeviceType) {[m [31m- /* Small screen; conserve space by removing the Cancel item. */[m [31m- iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [31m- iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [31m- iRelease(removeChild_Widget(clipMenu, lastChild_Widget(clipMenu)));[m [31m- }[m iWidget *splitMenu = makeMenu_Widget(root, (iMenuItem[]){[m { "${menu.split.merge}", '1', 0, "ui.split arg:0" },[m { "${menu.split.swap}", SDLK_x, 0, "ui.split swap:1" },[m [36m@@ -2122,11 +2140,18 @@[m [mvoid createUserInterface_Root(iRoot *d) {[m { "${menu.split.vertical} 1:2", SDLK_f, 0, "ui.split arg:1 axis:1" },[m { "${menu.split.vertical} 2:1", SDLK_r, 0, "ui.split arg:2 axis:1" },[m }, 10);[m [32m+[m[32m iWidget *toolsMenu = makeMenu_Widget(root, (iMenuItem[]) {[m [32m+[m[32m { globe_Icon " ${menu.page.translate}", 0, 0, "document.translate" },[m [32m+[m[32m { upload_Icon " ${menu.page.upload}", 0, 0, "document.upload" },[m [32m+[m[32m { edit_Icon " ${menu.page.upload.edit}", 0, 0, "document.upload copy:1" },[m [32m+[m[32m { book_Icon " ${menu.page.import}", 0, 0, "bookmark.links confirm:1" },[m [32m+[m[32m { timer_Icon " ${menu.autoreload}", 0, 0, "document.autoreload.menu" }[m [32m+[m[32m }, 5);[m setFlags_Widget(splitMenu, disabledWhenHidden_WidgetFlag, iTrue); /* enabled when open */[m setId_Widget(tabsMenu, "doctabs.menu");[m setId_Widget(barMenu, "barmenu");[m [31m- setId_Widget(clipMenu, "clipmenu");[m setId_Widget(splitMenu, "splitmenu");[m [32m+[m[32m setId_Widget(toolsMenu, "toolsmenu");[m }[m /* Global keyboard shortcuts. */ {[m addAction_Widget(root, SDLK_h, KMOD_PRIMARY | KMOD_SHIFT, "navigate.home");[m [1mdiff --git a/src/ui/root.h b/src/ui/root.h[m [1mindex 9618d1b0..501123fc 100644[m [1m--- a/src/ui/root.h[m [1m+++ b/src/ui/root.h[m [36m@@ -35,6 +35,7 @@[m [miDeclareTypeConstruction(Root)[m /*----------------------------------------------------------------------------------------------*/[m [m void createUserInterface_Root (iRoot *);[m [32m+[m[32mvoid createClipMenu_Root (iRoot *);[m void recreateSnippetMenu_Root (iRoot *);[m [m void setCurrent_Root (iRoot *);[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex c956e38a..f48e91e0 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -276,11 +276,10 @@[m [mstatic const iPtrArray *listFeedEntries_SidebarWidget_(const iSidebarWidget *d)[m static const iMenuItem bookmarkModeMenuItems_[] = {[m { bookmark_Icon " ${menu.page.bookmark}", SDLK_d, KMOD_PRIMARY, "bookmark.add" },[m { "---" },[m [31m- { add_Icon " ${menu.newfolder}", 0, 0, "bookmark.addfolder" },[m [31m- { upDownArrow_Icon " ${menu.sort.alpha}", 0, 0, "bookmark.sortfolder" },[m [31m- { "---" },[m { rightAngle_Icon " ${menu.foldall}", 0, 0, "bookmark.foldall arg:1" },[m { downAngle_Icon " ${menu.unfoldall}", 0, 0, "bookmark.foldall arg:0" },[m [32m+[m[32m { upDownArrow_Icon " ${menu.sort.alpha}", 0, 0, "bookmark.sortfolder" },[m [32m+[m[32m { folder_Icon " ${menu.newfolder}", 0, 0, "bookmark.addfolder" },[m { "---" },[m { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" }[m };[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 480ef4bb..473215ef 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -2272,6 +2272,8 @@[m [miWindow *newExtra_Window(iWidget *rootWidget) {[m rootWidget->rect.pos = zero_I2();[m setDrawBufferEnabled_Widget(frameRoot, iFalse);[m setDrawBufferEnabled_Widget(rootWidget, iFalse);[m [32m+[m[32m createClipMenu_Root(root); /* needed for input widgets */[m [32m+[m[32m recreateSnippetMenu_Root(root);[m setCurrent_Window(oldWin);[m return win;[m }[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).