summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/app.c b/src/app.c
index b7db6dce..de3f5d74 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1889,6 +1889,7 @@ iDocumentWidget *newTab_App(const iDocumentWidget *duplicateOf, iBool switchToNe
1889 } 1889 }
1890 appendTabPage_Widget(tabs, as_Widget(doc), "", 0, 0); 1890 appendTabPage_Widget(tabs, as_Widget(doc), "", 0, 0);
1891 iRelease(doc); /* now owned by the tabs */ 1891 iRelease(doc); /* now owned by the tabs */
1892 addTabCloseButton_Widget(tabs, as_Widget(doc), "tabs.close");
1892 addChild_Widget(findChild_Widget(tabs, "tabs.buttons"), iClob(newTabButton)); 1893 addChild_Widget(findChild_Widget(tabs, "tabs.buttons"), iClob(newTabButton));
1893 if (switchToNew) { 1894 if (switchToNew) {
1894 postCommandf_App("tabs.switch page:%p", doc); 1895 postCommandf_App("tabs.switch page:%p", doc);
@@ -2586,7 +2587,7 @@ iBool handleCommand_App(const char *cmd) {
2586 else if (equal_Command(cmd, "tabs.close")) { 2587 else if (equal_Command(cmd, "tabs.close")) {
2587 iWidget *tabs = findWidget_App("doctabs"); 2588 iWidget *tabs = findWidget_App("doctabs");
2588#if defined (iPlatformMobile) 2589#if defined (iPlatformMobile)
2589 /* Can't close the last on mobile. */ 2590 /* Can't close the last tab on mobile. */
2590 if (tabCount_Widget(tabs) == 1 && numRoots_Window(get_Window()) == 1) { 2591 if (tabCount_Widget(tabs) == 1 && numRoots_Window(get_Window()) == 1) {
2591 postCommand_App("navigate.home"); 2592 postCommand_App("navigate.home");
2592 return iTrue; 2593 return iTrue;