=> ed14d3467d6046ddfa66c3143a340428aeef66ae
[1mdiff --git a/po/en.po b/po/en.po[m [1mindex bff4c495..6647324e 100644[m [1m--- a/po/en.po[m [1m+++ b/po/en.po[m [36m@@ -148,6 +148,9 @@[m [mmsgstr "Identity"[m msgid "menu.title.help"[m msgstr "Help"[m [m [32m+[m[32mmsgid "menu.newwindow"[m [32m+[m[32mmsgstr "New Window"[m [32m+[m msgid "menu.newtab"[m msgstr "New Tab"[m [m [36m@@ -519,9 +522,6 @@[m [mmsgstr "%b. %d, %Y"[m msgid "feeds.today"[m msgstr "Today"[m [m [31m-msgid "feeds.entry.newtab"[m [31m-msgstr "Open Entry in New Tab"[m [31m-[m msgid "feeds.entry.markread"[m msgstr "Mark as Read"[m [m [36m@@ -558,6 +558,9 @@[m [mmsgstr "Open in New Tab"[m msgid "menu.opentab.background"[m msgstr "Open in Background Tab"[m [m [32m+[m[32mmsgid "menu.openwindow"[m [32m+[m[32mmsgstr "Open in New Window"[m [32m+[m msgid "menu.openfile"[m msgstr "Open File…"[m [m [36m@@ -870,6 +873,9 @@[m [mmsgstr "Open Link to the Side"[m msgid "link.side.newtab"[m msgstr "Open Link in New Tab to the Side"[m [m [32m+[m[32mmsgid "link.newwindow"[m [32m+[m[32mmsgstr "Open Link in New Window"[m [32m+[m msgid "link.browser"[m msgstr "Open Link in Default Browser"[m [m [1mdiff --git a/src/app.c b/src/app.c[m [1mindex 010c6d74..543467ef 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -1878,7 +1878,7 @@[m [mvoid postCommand_Root(iRoot *d, const char *command) {[m ev.user.data2 = d; /* all events are root-specific */[m ev.user.windowID = d ? id_Window(d->window) : 0; /* root-specific means window-specific */[m SDL_PushEvent(&ev);[m [31m- iWindow *win = get_Window();[m [32m+[m[32m iWindow *win = d ? d->window : NULL;[m #if defined (iPlatformAndroid)[m SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "%s[command] {%d} %s",[m app_.isLoadingPrefs ? "[Prefs] " : "",[m [36m@@ -1979,6 +1979,13 @@[m [msize_t windowIndex_App(const iMainWindow *win) {[m return indexOf_PtrArray(&app_.mainWindows, win); [m }[m [m [32m+[m[32miMainWindow *newMainWindow_App(void) {[m [32m+[m[32m iApp *d = &app_;[m [32m+[m[32m iMainWindow *win = new_MainWindow(initialWindowRect_App_(d, size_PtrArray(&d->mainWindows)));[m [32m+[m[32m addWindow_App(win);[m [32m+[m[32m return win;[m [32m+[m[32m}[m [32m+[m const iPtrArray *mainWindows_App(void) {[m return &app_.mainWindows;[m }[m [36m@@ -3038,7 +3045,18 @@[m [miBool handleCommand_App(const char *cmd) {[m return iTrue; /* invalid command */[m }[m if (findWidget_App("prefs")) {[m [31m- postCommand_App("prefs.dismiss"); [m [32m+[m[32m postCommand_App("prefs.dismiss");[m [32m+[m[32m }[m [32m+[m[32m if (argLabel_Command(cmd, "newwindow")) {[m [32m+[m[32m const iRangecc gotoheading = range_Command(cmd, "gotoheading");[m [32m+[m[32m const iRangecc gotourlheading = range_Command(cmd, "gotourlheading");[m [32m+[m[32m postCommandf_Root(get_Root(), "window.new%s%s%s%s url:%s",[m [32m+[m[32m isEmpty_Range(&gotoheading) ? "" : " gotoheading:",[m [32m+[m[32m isEmpty_Range(&gotoheading) ? "" : cstr_Rangecc(gotoheading),[m [32m+[m[32m isEmpty_Range(&gotourlheading) ? "" : " gotourlheading:",[m [32m+[m[32m isEmpty_Range(&gotourlheading) ? "" : cstr_Rangecc(gotourlheading),[m [32m+[m[32m urlArg);[m [32m+[m[32m return iTrue;[m }[m iString *url = collectNewCStr_String(urlArg);[m const iBool noProxy = argLabel_Command(cmd, "noproxy") != 0;[m [36m@@ -3187,7 +3205,12 @@[m [miBool handleCommand_App(const char *cmd) {[m addWindow_App(newWin); /* takes ownership */[m SDL_ShowWindow(newWin->base.win);[m setCurrent_Window(newWin);[m [31m- postCommand_Root(newWin->base.roots[0], "~navigate.home");[m [32m+[m[32m if (hasLabel_Command(cmd, "url")) {[m [32m+[m[32m postCommandf_Root(newWin->base.roots[0], "~open %s", cmd + 11 /* all arguments passed on */);[m [32m+[m[32m }[m [32m+[m[32m else {[m [32m+[m[32m postCommand_Root(newWin->base.roots[0], "~navigate.home");[m [32m+[m[32m }[m postCommand_Root(newWin->base.roots[0], "~window.unfreeze");[m return iTrue;[m }[m [36m@@ -3745,21 +3768,7 @@[m [mvoid revealPath_App(const iString *path) {[m }[m [m iObjectList *listDocuments_App(const iRoot *rootOrNull) {[m [31m- iWindow *win = get_Window();[m [31m- iObjectList *docs = new_ObjectList();[m [31m- iForIndices(i, win->roots) {[m [31m- iRoot *root = win->roots[i];[m [31m- if (!root) continue;[m [31m- if (!rootOrNull || root == rootOrNull) {[m [31m- const iWidget *tabs = findChild_Widget(root->widget, "doctabs");[m [31m- iForEach(ObjectList, i, children_Widget(findChild_Widget(tabs, "tabs.pages"))) {[m [31m- if (isInstance_Object(i.object, &Class_DocumentWidget)) {[m [31m- pushBack_ObjectList(docs, i.object);[m [31m- }[m [31m- }[m [31m- }[m [31m- }[m [31m- return docs;[m [32m+[m[32m return listDocuments_MainWindow(get_MainWindow(), rootOrNull);[m }[m [m iStringSet *listOpenURLs_App(void) {[m [1mdiff --git a/src/app.h b/src/app.h[m [1mindex 63a477a5..5f7b506f 100644[m [1m--- a/src/app.h[m [1m+++ b/src/app.h[m [36m@@ -129,6 +129,7 @@[m [mvoid setActiveWindow_App (iMainWindow *win);[m void closeWindow_App (iMainWindow *win);[m size_t numWindows_App (void);[m size_t windowIndex_App (const iMainWindow *win);[m [32m+[m[32miMainWindow *newMainWindow_App (void);[m const iPtrArray *mainWindows_App(void);[m void addPopup_App (iWindow *popup);[m void removePopup_App (iWindow *popup);[m [1mdiff --git a/src/defs.h b/src/defs.h[m [1mindex be5280fa..c3480bc2 100644[m [1m--- a/src/defs.h[m [1m+++ b/src/defs.h[m [36m@@ -157,8 +157,9 @@[m [miLocalDef int acceptKeyMod_ReturnKeyBehavior(int behavior) {[m #define bookmark_Icon "\U0001f516"[m #define folder_Icon "\U0001f4c1"[m #define file_Icon "\U0001f5ce"[m [31m-#define openTab_Icon "\u2750"[m [31m-#define openTabBg_Icon "\u2b1a"[m [32m+[m[32m#define openWindow_Icon "\u2b1a" //"\U0001F5d4"[m [32m+[m[32m#define openTab_Icon add_Icon[m [32m+[m[32m#define openTabBg_Icon "\u2750" //"\u2b1a"[m #define openExt_Icon "\u27a0"[m #define add_Icon "\u2795"[m #define page_Icon "\U00010117"[m [1mdiff --git a/src/gmutil.c b/src/gmutil.c[m [1mindex e862b18a..b32722ac 100644[m [1m--- a/src/gmutil.c[m [1m+++ b/src/gmutil.c[m [36m@@ -780,7 +780,7 @@[m [miRangecc mediaTypeWithoutParameters_Rangecc(iRangecc mime) {[m return part;[m }[m [m [31m-const iString *feedEntryOpenCommand_String(const iString *url, int newTab) {[m [32m+[m[32mconst iString *feedEntryOpenCommand_String(const iString *url, int newTab, int newWindow) {[m if (!isEmpty_String(url)) {[m iString *cmd = collectNew_String();[m const size_t fragPos = indexOf_String(url, '#');[m [36m@@ -788,15 +788,20 @@[m [mconst iString *feedEntryOpenCommand_String(const iString *url, int newTab) {[m iString *head = newRange_String([m (iRangecc){ constBegin_String(url) + fragPos + 1, constEnd_String(url) });[m format_String(cmd,[m [31m- "open fromsidebar:1 newtab:%d gotourlheading:%s url:%s",[m [32m+[m[32m "open fromsidebar:1 newtab:%d newwindow:%d gotourlheading:%s url:%s",[m newTab,[m [32m+[m[32m newWindow,[m cstr_String(head),[m cstr_Rangecc((iRangecc){ constBegin_String(url),[m constBegin_String(url) + fragPos }));[m delete_String(head);[m }[m else {[m [31m- format_String(cmd, "open fromsidebar:1 newtab:%d url:%s", newTab, cstr_String(url));[m [32m+[m[32m format_String(cmd,[m [32m+[m[32m "open fromsidebar:1 newtab:%d newwindow:%d url:%s",[m [32m+[m[32m newTab,[m [32m+[m[32m newWindow,[m [32m+[m[32m cstr_String(url));[m }[m return cmd;[m }[m [1mdiff --git a/src/gmutil.h b/src/gmutil.h[m [1mindex 01eb8e52..e4284cfd 100644[m [1m--- a/src/gmutil.h[m [1m+++ b/src/gmutil.h[m [36m@@ -151,4 +151,4 @@[m [miRangecc mediaTypeWithoutParameters_Rangecc (iRangecc mime);[m const iString * findContainerArchive_Path (const iString *path);[m [m [m [31m-const iString * feedEntryOpenCommand_String (const iString *url, int newTab); /* checks fragment */[m [32m+[m[32mconst iString * feedEntryOpenCommand_String (const iString *url, int newTab, int newWindow); /* checks fragment */[m [1mdiff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c[m [1mindex 76c26e27..99039ff5 100644[m [1m--- a/src/ui/documentwidget.c[m [1m+++ b/src/ui/documentwidget.c[m [36m@@ -5071,10 +5071,9 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m iArray items;[m init_Array(&items, sizeof(iMenuItem));[m if (d->contextLink) {[m [31m- /* Context menu for a link. */[m [32m+[m[32m /* Construct the link context menu, depending on what kind of link was clicked. */[m interactingWithLink_DocumentWidget_(d, d->contextLink->linkId); /* perhaps will be triggered */[m const iString *linkUrl = linkUrl_GmDocument(view->doc, d->contextLink->linkId);[m [31m-// const int linkFlags = linkFlags_GmDocument(d->doc, d->contextLink->linkId);[m const iRangecc scheme = urlScheme_String(linkUrl);[m const iBool isGemini = equalCase_Rangecc(scheme, "gemini");[m iBool isNative = iFalse;[m [36m@@ -5086,39 +5085,48 @@[m [mstatic iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e[m format_CStr("```%s", cstr_String(infoText)),[m 0, 0, NULL });[m }[m [31m- if (willUseProxy_App(scheme) || isGemini ||[m [32m+[m[32m if (isGemini ||[m [32m+[m[32m willUseProxy_App(scheme) ||[m [32m+[m[32m equalCase_Rangecc(scheme, "data") ||[m equalCase_Rangecc(scheme, "file") ||[m equalCase_Rangecc(scheme, "finger") ||[m equalCase_Rangecc(scheme, "gopher")) {[m isNative = iTrue;[m /* Regular links that we can open. */[m [31m- pushBackN_Array([m [31m- &items,[m [31m- (iMenuItem[]){ { openTab_Icon " ${link.newtab}",[m [31m- 0,[m [31m- 0,[m [31m- format_CStr("!open newtab:1 origin:%s url:%s",[m [31m- cstr_String(id_Widget(w)),[m [31m- cstr_String(linkUrl)) },[m [31m- { openTabBg_Icon " ${link.newtab.background}",[m [31m- 0,[m [31m- 0,[m [31m- format_CStr("!open newtab:2 origin:%s url:%s",[m [31m- cstr_String(id_Widget(w)),[m [31m- cstr_String(linkUrl)) },[m [31m- { "${link.side}",[m [31m- 0,[m [31m- 0,[m [31m- format_CStr("!open newtab:4 origin:%s url:%s",[m [31m- cstr_String(id_Widget(w)),[m [31m- cstr_String(linkUrl)) },[m [31m- { "${link.side.newtab}",[m [31m- 0,[m [31m- 0,[m [31m- format_CStr("!open newtab:5 origin:%s url:%s",[m [31m- cstr_String(id_Widget(w)),[m [31m- cstr_String(linkUrl)) } },[m [31m- 4);[m [32m+[m[32m pushBackN_Array(&items,[m [32m+[m[32m (iMenuItem[]){[m [32m+[m[32m { openTab_Icon " ${link.newtab}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!open newtab:1 origin:%s url:%s",[m [32m+[m[32m cstr_String(id_Widget(w)),[m [32m+[m[32m cstr_String(linkUrl)) },[m [32m+[m[32m { openTabBg_Icon " ${link.newtab.background}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!open newtab:2 origin:%s url:%s",[m [32m+[m[32m cstr_String(id_Widget(w)),[m [32m+[m[32m cstr_String(linkUrl)) },[m [32m+[m[32m { "${link.side}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!open newtab:4 origin:%s url:%s",[m [32m+[m[32m cstr_String(id_Widget(w)),[m [32m+[m[32m cstr_String(linkUrl)) },[m [32m+[m[32m { "${link.side.newtab}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!open newtab:5 origin:%s url:%s",[m [32m+[m[32m cstr_String(id_Widget(w)),[m [32m+[m[32m cstr_String(linkUrl)) },[m [32m+[m[32m { openWindow_Icon " ${link.newwindow}",[m [32m+[m[32m 0,[m [32m+[m[32m 0,[m [32m+[m[32m format_CStr("!open newwindow:1 origin:%s url:%s",[m [32m+[m[32m cstr_String(id_Widget(w)),[m [32m+[m[32m cstr_String(linkUrl)) },[m [32m+[m[32m },[m [32m+[m[32m 5);[m if (deviceType_App() == phone_AppDeviceType) {[m removeN_Array(&items, size_Array(&items) - 2, iInvalidSize);[m }[m [1mdiff --git a/src/ui/lookupwidget.c b/src/ui/lookupwidget.c[m [1mindex f14170ad..dc3264a2 100644[m [1m--- a/src/ui/lookupwidget.c[m [1m+++ b/src/ui/lookupwidget.c[m [36m@@ -568,7 +568,7 @@[m [mstatic void presentResults_LookupWidget_(iLookupWidget *d) {[m cstr_String(&res->label),[m uiText_ColorEscape,[m cstr_String(&res->meta));[m [31m- const iString *cmd = feedEntryOpenCommand_String(&res->url, 0);[m [32m+[m[32m const iString *cmd = feedEntryOpenCommand_String(&res->url, 0, 0);[m if (cmd) {[m set_String(&item->command, cmd);[m }[m [1mdiff --git a/src/ui/root.c b/src/ui/root.c[m [1mindex 7e4b4863..9dee50ae 100644[m [1m--- a/src/ui/root.c[m [1m+++ b/src/ui/root.c[m [36m@@ -56,7 +56,8 @@[m [mSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */[m #if defined (iPlatformPcDesktop)[m /* TODO: Submenus wouldn't hurt here. */[m static const iMenuItem navMenuItems_[] = {[m [31m- { add_Icon " ${menu.newtab}", 't', KMOD_PRIMARY, "tabs.new" },[m [32m+[m[32m { openWindow_Icon " ${menu.newwindow}", SDLK_n, KMOD_PRIMARY, "window.new" },[m [32m+[m[32m { add_Icon " ${menu.newtab}", SDLK_t, KMOD_PRIMARY, "tabs.new" },[m { "${menu.openlocation}", SDLK_l, KMOD_PRIMARY, "navigate.focus" },[m { "---" },[m { download_Icon " " saveToDownloads_Label, SDLK_s, KMOD_PRIMARY, "document.save" },[m [1mdiff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c[m [1mindex 73023a4f..0322b2a9 100644[m [1m--- a/src/ui/sidebarwidget.c[m [1m+++ b/src/ui/sidebarwidget.c[m [36m@@ -414,9 +414,13 @@[m [mstatic void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct[m }[m d->menu = makeMenu_Widget([m as_Widget(d),[m [31m- (iMenuItem[]){ { openTab_Icon " ${feeds.entry.newtab}", 0, 0, "feed.entry.opentab" },[m [32m+[m[32m (iMenuItem[]){ { openTab_Icon " ${menu.opentab}", 0, 0, "feed.entry.open newtab:1" },[m [32m+[m[32m { openTabBg_Icon " ${menu.opentab.background}", 0, 0, "feed.entry.open newtab:2" },[m [32m+[m[32m { openWindow_Icon " ${menu.openwindow}", 0, 0, "feed.entry.open newwindow:1" },[m [32m+[m[32m { "---", 0, 0, NULL },[m { circle_Icon " ${feeds.entry.markread}", 0, 0, "feed.entry.toggleread" },[m { bookmark_Icon " ${feeds.entry.bookmark}", 0, 0, "feed.entry.bookmark" },[m [32m+[m[32m { "${menu.copyurl}", 0, 0, "feed.entry.copyurl" },[m { "---", 0, 0, NULL },[m { page_Icon " ${feeds.entry.openfeed}", 0, 0, "feed.entry.openfeed" },[m { edit_Icon " ${feeds.edit}", 0, 0, "feed.entry.edit" },[m [36m@@ -424,7 +428,7 @@[m [mstatic void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct[m { "---", 0, 0, NULL },[m { check_Icon " ${feeds.markallread}", SDLK_a, KMOD_SHIFT, "feeds.markallread" },[m { reload_Icon " ${feeds.refresh}", SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh" } },[m [31m- 10);[m [32m+[m[32m 13);[m d->modeMenu = makeMenu_Widget([m as_Widget(d),[m (iMenuItem[]){[m [36m@@ -491,6 +495,7 @@[m [mstatic void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct[m as_Widget(d),[m (iMenuItem[]){ { openTab_Icon " ${menu.opentab}", 0, 0, "bookmark.open newtab:1" },[m { openTabBg_Icon " ${menu.opentab.background}", 0, 0, "bookmark.open newtab:2" },[m [32m+[m[32m { openWindow_Icon " ${menu.openwindow}", 0, 0, "bookmark.open newwindow:1" },[m { "---", 0, 0, NULL },[m { edit_Icon " ${menu.edit}", 0, 0, "bookmark.edit" },[m { copy_Icon " ${menu.dup}", 0, 0, "bookmark.dup" },[m [36m@@ -502,11 +507,11 @@[m [mstatic void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct[m { "---", 0, 0, NULL },[m { delete_Icon " " uiTextCaution_ColorEscape "${bookmark.delete}", 0, 0, "bookmark.delete" },[m { "---", 0, 0, NULL },[m [31m- { add_Icon " ${menu.newfolder}", 0, 0, "bookmark.addfolder" },[m [32m+[m[32m { folder_Icon " ${menu.newfolder}", 0, 0, "bookmark.addfolder" },[m { upDownArrow_Icon " ${menu.sort.alpha}", 0, 0, "bookmark.sortfolder" },[m { "---", 0, 0, NULL },[m { reload_Icon " ${bookmarks.reload}", 0, 0, "bookmarks.reload.remote" } },[m [31m- 17);[m [32m+[m[32m 18);[m d->modeMenu = makeMenu_Widget([m as_Widget(d),[m (iMenuItem[]){ { bookmark_Icon " ${menu.page.bookmark}", SDLK_d, KMOD_PRIMARY, "bookmark.add" },[m [36m@@ -571,13 +576,17 @@[m [mstatic void updateItemsWithFlags_SidebarWidget_(iSidebarWidget *d, iBool keepAct[m d->menu = makeMenu_Widget([m as_Widget(d),[m (iMenuItem[]){[m [32m+[m[32m { openTab_Icon " ${menu.opentab}", 0, 0, "history.open newtab:1" },[m [32m+[m[32m { openTabBg_Icon " ${menu.opentab.background}", 0, 0, "history.open newtab:2" },[m [32m+[m[32m { openWindow_Icon " ${menu.openwindow}", 0, 0, "history.open newwindow:1" },[m [32m+[m[32m { "---" },[m { "${menu.copyurl}", 0, 0, "history.copy" },[m { bookmark_Icon " ${sidebar.entry.bookmark}", 0, 0, "history.addbookmark" },[m { "---", 0, 0, NULL },[m { close_Icon " ${menu.forgeturl}", 0, 0, "history.delete" },[m { "---", 0, 0, NULL },[m { delete_Icon " " uiTextCaution_ColorEscape "${history.clear}", 0, 0, "history.clear confirm:1" },[m [31m- }, 6);[m [32m+[m[32m }, 10);[m d->modeMenu = makeMenu_Widget([m as_Widget(d),[m (iMenuItem[]){[m [36m@@ -981,7 +990,7 @@[m [mstatic void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si[m }[m case feeds_SidebarMode: {[m postCommandString_Root(get_Root(),[m [31m- feedEntryOpenCommand_String(&item->url, openTabMode_Sym(modState_Keys())));[m [32m+[m[32m feedEntryOpenCommand_String(&item->url, openTabMode_Sym(modState_Keys()), 0));[m break;[m }[m case bookmarks_SidebarMode:[m [36m@@ -1641,8 +1650,11 @@[m [mstatic iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)[m else if (startsWith_CStr(cmd, "feed.entry.") && d->mode == feeds_SidebarMode) {[m const iSidebarItem *item = d->contextItem;[m if (item) {[m [31m- if (isCommand_Widget(w, ev, "feed.entry.opentab")) {[m [31m- postCommandString_Root(get_Root(), feedEntryOpenCommand_String(&item->url, 1));[m [32m+[m[32m if (isCommand_Widget(w, ev, "feed.entry.open")) {[m [32m+[m[32m const char *cmd = command_UserEvent(ev);[m [32m+[m[32m postCommandString_Root(get_Root(), feedEntryOpenCommand_String(&item->url,[m [32m+[m[32m argLabel_Command(cmd, "newtab"),[m [32m+[m[32m argLabel_Command(cmd, "newwindow")));[m return iTrue;[m }[m if (isCommand_Widget(w, ev, "feed.entry.toggleread")) {[m [1mdiff --git a/src/ui/window.c b/src/ui/window.c[m [1mindex 6f680cd4..b0de0557 100644[m [1m--- a/src/ui/window.c[m [1m+++ b/src/ui/window.c[m [36m@@ -1567,6 +1567,23 @@[m [mvoid setKeyboardHeight_MainWindow(iMainWindow *d, int height) {[m }[m }[m [m [32m+[m[32miObjectList *listDocuments_MainWindow(iMainWindow *d, const iRoot *rootOrNull) {[m [32m+[m[32m iObjectList *docs = new_ObjectList();[m [32m+[m[32m iForIndices(i, d->base.roots) {[m [32m+[m[32m iRoot *root = d->base.roots[i];[m [32m+[m[32m if (!root) continue;[m [32m+[m[32m if (!rootOrNull || root == rootOrNull) {[m [32m+[m[32m const iWidget *tabs = findChild_Widget(root->widget, "doctabs");[m [32m+[m[32m iForEach(ObjectList, i, children_Widget(findChild_Widget(tabs, "tabs.pages"))) {[m [32m+[m[32m if (isInstance_Object(i.object, &Class_DocumentWidget)) {[m [32m+[m[32m pushBack_ObjectList(docs, i.object);[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m }[m [32m+[m[32m return docs;[m [32m+[m[32m}[m [32m+[m void checkPendingSplit_MainWindow(iMainWindow *d) {[m if (d->splitMode != d->pendingSplitMode) {[m setSplitMode_MainWindow(d, d->pendingSplitMode);[m [1mdiff --git a/src/ui/window.h b/src/ui/window.h[m [1mindex c7d59380..c3c34e1b 100644[m [1m--- a/src/ui/window.h[m [1m+++ b/src/ui/window.h[m [36m@@ -187,6 +187,7 @@[m [mvoid setTitle_MainWindow (iMainWindow *, const iString *title[m void setSnap_MainWindow (iMainWindow *, int snapMode);[m void setFreezeDraw_MainWindow (iMainWindow *, iBool freezeDraw);[m void setKeyboardHeight_MainWindow (iMainWindow *, int height);[m [32m+[m[32miObjectList *listDocuments_MainWindow (iMainWindow *, const iRoot *rootOrNull);[m void setSplitMode_MainWindow (iMainWindow *, int splitMode);[m void checkPendingSplit_MainWindow (iMainWindow *);[m void swapRoots_MainWindow (iMainWindow *);[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).