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 46856e22..ebb61c86 100644
--- a/src/app.c
+++ b/src/app.c
@@ -1935,6 +1935,7 @@ iDocumentWidget *newTab_App(const iDocumentWidget *duplicateOf, iBool switchToNe
1935 } 1935 }
1936 appendTabPage_Widget(tabs, as_Widget(doc), "", 0, 0); 1936 appendTabPage_Widget(tabs, as_Widget(doc), "", 0, 0);
1937 iRelease(doc); /* now owned by the tabs */ 1937 iRelease(doc); /* now owned by the tabs */
1938 addTabCloseButton_Widget(tabs, as_Widget(doc), "tabs.close");
1938 addChild_Widget(findChild_Widget(tabs, "tabs.buttons"), iClob(newTabButton)); 1939 addChild_Widget(findChild_Widget(tabs, "tabs.buttons"), iClob(newTabButton));
1939 if (switchToNew) { 1940 if (switchToNew) {
1940 postCommandf_App("tabs.switch page:%p", doc); 1941 postCommandf_App("tabs.switch page:%p", doc);
@@ -2719,7 +2720,7 @@ iBool handleCommand_App(const char *cmd) {
2719 else if (equal_Command(cmd, "tabs.close")) { 2720 else if (equal_Command(cmd, "tabs.close")) {
2720 iWidget *tabs = findWidget_App("doctabs"); 2721 iWidget *tabs = findWidget_App("doctabs");
2721#if defined (iPlatformMobile) 2722#if defined (iPlatformMobile)
2722 /* Can't close the last on mobile. */ 2723 /* Can't close the last tab on mobile. */
2723 if (tabCount_Widget(tabs) == 1 && numRoots_Window(get_Window()) == 1) { 2724 if (tabCount_Widget(tabs) == 1 && numRoots_Window(get_Window()) == 1) {
2724 postCommand_App("navigate.home"); 2725 postCommand_App("navigate.home");
2725 return iTrue; 2726 return iTrue;